nuxt add

Source
Add Nuxt modules and layers to your application.
Terminal
npx nuxt add <MODULENAME...> [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [--skipInstall] [--skipConfig] [--dev] [--packageManager=<npm|pnpm|yarn|bun|deno|aube|nub>]

The add command installs Nuxt modules and layers into your application. It is the same command as nuxt module add, with layers included.

Arguments

ArgumentDescription
MODULENAME...Specify one or more modules or layers 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

When running the command, it will:

  • install the package as a dependency using your package manager, unless you pass --skipInstall
  • add it to your package.json file
  • register it in your nuxt.config file, in modules for a module and in extends for a layer, unless you pass --skipConfig

Example:

Terminal
npx nuxt add pinia

Several packages can be added at once, and the modules will be resolved against the Nuxt version your project uses:

Terminal
npx nuxt add @nuxt/image @nuxt/fonts

Run it without a name to browse the available modules interactively.

nuxt add <template> <name> is deprecated. Use nuxt add-template to scaffold files.
Read more about searching for and removing modules.