Nuxt CLI

Source
The Nuxt CLI runs, builds and inspects your Nuxt application from the command line.

@nuxt/cli is the nuxt command: it runs the dev server, builds your application for production, scaffolds files, manages modules and answers questions about your project. It is a dependency of nuxt, so a Nuxt project already has it.

Terminal
npx nuxt dev

The binary is installed as nuxt, and also as nuxi, nuxi-ng and nuxt-cli for compatibility with older setups. Scaffolding a new project is a separate package, create-nuxt, so that it can be run without a project to install into.

nuxi is a third package: a standalone CLI with no dependencies, for running commands outside a project or installing globally.

Requirements

The CLI runs on Node v22.19+, v24.11+ or v26+, and imports TypeScript configuration natively on those versions. Nuxt 2 and @nuxt/bridge are not supported.

Running commands

Inside a project, your package manager runs the version the project depends on:

Terminal
pnpm nuxt dev
npm exec nuxt dev
yarn nuxt dev
bun nuxt dev

Outside a project, or installed globally, npx nuxi runs the same commands. It hands each one over to the @nuxt/cli installed in the project when there is one, so the code that runs matches the version of Nuxt it sits alongside rather than whatever is on your machine. It falls back to its own bundled commands when there is no project CLI, when the project's copy predates v3.26, or when the project's copy does not know the command, so a project pinned to an older release still gets newer commands.

Global options

--cwd may be passed before the command name as well as after it, which is useful in a monorepo:

Terminal
npx nuxt --cwd apps/web dev

Commands that take a ROOTDIR positional treat an explicit --cwd as an override of it. --help on any command prints its arguments and options, and --version prints the CLI version.

Mistyped commands and flags

An unrecognised command is matched against the ones that exist, and an unrecognised flag against the ones the command declares. In an interactive terminal you are offered the correction to run instead; otherwise it is reported as a warning, so a misspelled flag no longer looks like a flag that simply had no effect.

Project commands

A command the CLI does not provide is looked up as a nuxt-<command> binary in your project, so a dependency can add a command of its own. This is how nuxt build-module works: it runs the nuxt-build-module binary that @nuxt/module-builder installs.

Shell completions

nuxt complete <shell> prints a completion script, powered by @bomb.sh/tab. It completes commands, flags and some flag values: ports and hosts for nuxt dev, Nitro presets for nuxt build --preset, and log levels.

npx nuxt complete zsh > "${fpath[1]}/_nuxt"

powershell is also supported, and create-nuxt complete <shell> has its own script which completes starter template names.

Completions work through your package manager too (pnpm nuxt <Tab>), if you install tab's package manager completions.

Update notifications

Once a day the CLI checks in the background whether a newer Nuxt release exists and, if so, prints a short nudge to run nuxt upgrade once the command has finished. The latest dist-tag is read from the registry configured in your .npmrc and cached in your user-level .nuxtrc.

The nudge is not shown for prereleases, and not for a patch release within the same minor unless you are at least five patches behind. The check is skipped in CI, on StackBlitz, and when the output is not a terminal.

Set NUXT_IGNORE_UPDATE_CHECK=1 or NO_UPDATE_NOTIFIER=1 to skip it for one run, or add updateCheck.enabled=false to your user-level .nuxtrc to opt out for good.

Networks and proxies

Commands that reach the network (installing a module, searching modules, downloading a template, checking for updates) report why a request failed rather than the raw error, and suggest the retry that is likely to work. Behind a proxy that re-signs TLS traffic that means NODE_EXTRA_CA_CERTS, pointing at your organisation's root certificate.

Node only reads proxy environment variables when NODE_USE_ENV_PROXY is set, and the CLI passes that setting on to the processes it spawns, so a package manager install started by nuxt add sees the same proxy configuration you do.

Prereleases

Every commit on main is published to the nightly channel:

Terminal
npm install -D @nuxt/cli-nightly
npx @nuxt/cli-nightly dev

create-nuxt-nightly scaffolds with it, and npm create nuxt@latest -- --nightly scaffolds a project against the Nuxt nightly channel.

Builds for an individual pull request are published by pkg.pr.new and linked from the pull request itself, which is the quickest way to check whether a fix works before it is released.