create nuxt

Source
The init command initializes a fresh Nuxt project.
Terminal
npm create nuxt@latest [DIR] -- [--cwd=<directory>] [--logLevel=<silent|info|verbose>] [-t, --template=<template-name>] [-f, --force] [--offline] [--preferOffline] [--install] [--gitInit] [--shell] [--packageManager=<npm|pnpm|yarn|bun|deno|aube|nub>] [-M, --modules=<module-names>] [--nightly=<dist-tag>]

The create-nuxt command initializes a fresh Nuxt project using unjs/giget. It asks which template to start from, whether to install modules, and which package manager to use, then installs dependencies and prints the commands to run next.

nuxt init was removed from @nuxt/cli. Use npm create nuxt@latest, or the equivalent for your package manager.

Arguments

ArgumentDescription
DIR=""Project directory

Options

OptionDefaultDescription
--cwd=<directory>.Specify the directory to create the project in
--logLevel=<silent|info|verbose>Specify build-time log level
-t, --template=<template-name>Template name
-f, --forceOverride existing directory
--offlineForce offline mode
--preferOfflinePrefer offline mode
--installtrueInstall dependencies once the project has been scaffolded
--no-installSkip installing dependencies
--gitInitInitialize git repository
--no-gitInitSkip git repository initialization
--shellStart shell after installation in project directory
--packageManager=<npm|pnpm|yarn|bun|deno|aube|nub>Package manager choice
-M, --modules=<module-names>Nuxt modules to install (comma separated without spaces)
--no-modulesSkip module installation prompt
--nightly=<dist-tag>Use Nuxt nightly release channel (a nuxt-nightly dist tag, defaulting to latest)

Non-interactive use

Without a terminal to prompt in, the answers it would have asked for have to be passed as arguments: the directory, --template, --packageManager and --gitInit. Anything missing is reported along with the available templates, and the command exits with 2.

Terminal
npm create nuxt@latest my-app -- --template minimal --packageManager pnpm --no-gitInit
The -- is needed with npm create, which reads anything flag-shaped after the initializer as npm's own config and warns Unknown cli config instead of passing it on. Other package managers forward the whole command line as it is, so pass the flags to them directly: pnpm create nuxt@latest my-app --template minimal.

Environment Variables