Copied to clipboard

nuxi

A Nuxt CLI (nicknamed Nuxi) provides a no dependency experience for easily scaffolding your Nuxt projects.

init

The init command initializes a fresh Nuxt project using unjs/giget.
Specify template name or git repository to use as a template. Format is gh:org/name to use a custom github template.

Add

Quick add components, pages, and plugins to your Nuxt project.
Default current working directory.

nuxi dev

The root directory of the application to bundle.
Point to another .env file to load, relative to the root directory.
Copy URL to clipboard.

Build

The build command creates a .output directory with all your application, server and dependencies ready for production.
Point to another .env file to load, relative to the root directory.
The root directory of the application to bundle.

generate

The generate command pre-renders every route of your application and stores the result in plain HTML files that you can deploy on any static hosting services. The command triggers the nuxi build command with the prerender argument set to true
Point to another .env file to load, relative to the root directory.
The root directory of the application to bundle.

Analyze

The analyze command builds Nuxt and analyzes the production bundle (experimental).

preview

The preview command starts a server to preview your Nuxt application after running the build command. The start command is an alias for preview.
Point to another .env file to load, relative to the root directory.
The root directory of the application to bundle.

prepare

The prepare command creates a .nuxt directory in your application and generates types. This can be useful in a CI environment or as a postinstall command in your package.json.
The root directory of the application to bundle.

typecheck

The typecheck command runs vue-tsc to check types throughout your app.
The root directory of the application to bundle.

upgrade

The upgrade command upgrades Nuxt 3 to the latest version.

Cleanup

The cleanup command removes common generated Nuxt files and caches.
The root directory of the application to bundle.

info

The info command logs information about the current or specified Nuxt project.

Example

  • # Generates `components/TheHeader.vue`
    npx nuxi add component TheHeader
    
  • # Generates `composables/foo.ts`
    npx nuxi add composable foo