nuxi Command Generator
Generate nuxi commands to scaffold, develop, build, and manage Nuxt 3 projects
Getting Started with nuxi
## What is nuxi?
`nuxi` is the command-line interface for Nuxt 3+. It scaffolds new projects, runs the dev server, builds for production, generates a static site, and performs maintenance tasks like upgrading Nuxt or analyzing bundle size.
## How to Use
1. **Pick an action**: `init`, `dev`, `build`, `generate`, `preview`, `upgrade`, `info`, `cleanup`, `analyze`, or `typecheck`. 2. **Set a target**: For `init`, enter the project directory name. 3. **Set options**: port (`-p`) for `dev`, `--package-manager` to pin npm/pnpm/yarn/bun. 4. **Copy & Run**: Most commands run inside an existing Nuxt project; `init` creates a new one.
Common Actions & Options
### `init` Scaffold a new project Create a fresh Nuxt app in a new directory: `nuxi init my-app`.
### `dev` Development server Start the hot-reloading dev server on the default port 3000. Override with `-p`: `nuxi dev -p 4000`.
### `build` / `generate` Production output `build` produces a Node server bundle (`.output/server`) for SSR hosting; `generate` pre-renders the whole site to static HTML in `.output/public` for static hosting.
### `preview` Run the production build Serve the `.output` produced by `build` or `generate` locally to verify it before deploying.
### `upgrade` / `info` / `cleanup` `upgrade` bumps the Nuxt version; `info` prints the project's environment and versions; `cleanup` removes build caches (`.nuxt`, `node_modules/.cache`).
### `analyze` / `typecheck` `analyze` builds the project and opens a bundle analyzer; `typecheck` runs `vue-tsc` to type-check the whole project.
### `--package-manager=NAME` Pin the package manager (npm, pnpm, yarn, bun) for `init` and other install-aware commands.
▶build vs generate — which should I use?
▶How do I run the dev server on a different port?
▶How do I create a project with pnpm instead of npm?
If this tool has been helpful to you, consider buying me a coffee.
Buy me a coffee