nuxt module

Source
Search, add and remove modules in your Nuxt application with the command line.

Nuxt provides a few utilities to work with Nuxt modules seamlessly.

nuxt module add

Terminal
npx nuxt module add <MODULENAME...> [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [--skipInstall] [--skipConfig] [--dev] [--packageManager=<npm|pnpm|yarn|bun|deno|aube|nub>]

Arguments

ArgumentDescription
MODULENAME...Specify one or more modules to install by name, separated by spaces

Options

OptionDefaultDescription
--cwd=<directory>.Specify the root directory of your Nuxt project
--logLevel=<silent|info|verbose>Specify build-time log level
--skipInstallSkip npm install
--skipConfigSkip nuxt.config.ts update
--devInstall modules as dev dependencies
--packageManager=<npm|pnpm|yarn|bun|deno|aube|nub>Package manager to install with

The command lets you install Nuxt modules in your application with no manual work.

When running the command, it will:

  • install the module as a dependency using your package manager
  • add it to your package.json file
  • update your nuxt.config file

Example:

Installing the Pinia module

Terminal
npx nuxt module add pinia

Run it without a module name to pick from the modules compatible with your Nuxt version.

nuxt add is the same command, and also accepts layers.

nuxt module remove

Terminal
npx nuxt module remove [MODULENAME...] [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [--skipInstall] [--skipConfig]

Arguments

ArgumentDescription
MODULENAME...Specify one or more modules to remove by name, separated by spaces

Options

OptionDefaultDescription
--cwd=<directory>.Specify the root directory of your Nuxt project
--logLevel=<silent|info|verbose>Specify build-time log level
--skipInstallSkip dependency uninstall
--skipConfigSkip nuxt.config.ts update

The command uninstalls the package and removes it from the modules array in your nuxt.config.

Example:

Terminal
npx nuxt module remove pinia

Run it without a module name to pick from the modules the project currently uses.

Terminal
npx nuxt module search <QUERY> [--cwd=<directory>] [--nuxtVersion=<3|4|4.2.0>] [--json]

Arguments

ArgumentDescription
QUERYkeywords to search for

Options

OptionDefaultDescription
--cwd=<directory>.Specify the root directory of your Nuxt project
--nuxtVersion=<3|4|4.2.0>Filter by Nuxt version and list compatible modules only (auto detected by default)
--jsonPrint output as JSON

The command searches for Nuxt modules matching your query that are compatible with your Nuxt version, showing each module's description with the matched text highlighted.

Example:

Terminal
npx nuxt module search pinia

Use --json to get the results as machine-readable JSON.