TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/dvlkit/nuxe/llms.txt
Use this file to discover all available pages before exploring further.
nuxe CLI is the main interface for developing and deploying Nuxe applications. It ships as the nuxe binary inside the @dvlkit/nuxe package and exposes three sub-commands — dev, build, and start — each mapped directly to an underlying runtime function. create-nuxe is a separate scaffolding tool that bootstraps a new project from scratch without requiring an existing Nuxe installation.
nuxe dev
Starts a Vite-powered development server with SSR and Hot Module Replacement enabled. The server reads yournuxe.config.ts (if present) to determine the port, falling back to 3000. Pages, layouts, components, and composables are all hot-reloaded as you edit them.
The dev server runs in middleware mode — Vite handles the request pipeline
directly.
NODE_ENV is set to development automatically if it has not
already been set. NUXE_DEV is set to true for the lifetime of the
process.nuxe build
Builds your application for production. Nuxe runs a Vite multi-environment build that produces output inside.output/:
| Directory | Contents |
|---|---|
.output/client/ | Static assets, client-side JS bundles, and CSS |
.output/server/ | Nitro server entry point (index.mjs) |
.output/server/ssr/ | SSR build artifacts copied from the Nitro Vite SSR stage |
.output/public/ | Pre-rendered static HTML pages (only present when routes opt in) |
routeRules: { prerender: true }, the build pipeline will pre-render those routes to static HTML files in .output/public/ automatically.
nuxe start
Serves the production build produced bynuxe build. It loads the Nitro server bundle at .output/server/index.mjs, sets NODE_ENV to production, and begins listening on the configured port.
nuxe start exits immediately with an actionable error:
nuxe start must always be preceded by nuxe build in the same environment.
The production server reads the compiled output — it does not recompile on
start.nuxe —version
Prints the version of@dvlkit/nuxe that is currently installed.
create-nuxe
create-nuxe is a standalone scaffolding tool that generates a ready-to-run Nuxe project. You do not need an existing project or a global Nuxe installation to use it — your package manager downloads and runs it on demand.
Interactive prompts
create-nuxe walks you through four prompts before writing any files:
- Project name — the directory to create and the
namefield inpackage.json. Only letters, numbers, dashes, and underscores are accepted. Skipped if you pass the name as a CLI argument. - Dev port — the port written into
nuxe.config.tsunderserver.port. Defaults to3000. - Include demo pages and composable example — when
true, the scaffolded project includes example pages, components, and a composable underapp/pages/,app/components/, andapp/composables/. Whenfalse, a minimalapp/app.vuewith just<RouterView />is written instead. Defaults totrue. - Add Tailwind CSS v4 — when
true,@tailwindcss/viteis added as a Vite plugin innuxe.config.ts,app/assets/css/main.cssis created with@import "tailwindcss", and the relevant packages are added todevDependencies. Defaults totrue.
What gets scaffolded
After answering the prompts,create-nuxe generates the following inside a new directory named after your project:
package.json— with pinned versions of@dvlkit/nuxe,vue,vue-router, andtypescriptresolved from the npm registry at scaffold timenuxe.config.ts— minimal config with your chosen port (and optional Tailwind plugin)app/app.vue— root componentapp/pages/,app/components/,app/composables/— demo content (if selected)app/assets/css/main.css— Tailwind entry point (if selected)
Next steps
Once scaffolding is complete, the CLI prints the commands needed to get started:Environment variables
These environment variables are read by the CLI and the runtime server:| Variable | Description | Default |
|---|---|---|
PORT | The port Nuxe listens on. Resolved from server.port in nuxe.config.ts; set automatically before the server starts. | 3000 |
NODE_ENV | Node environment. Set to development by nuxe dev (if not already defined) and always set to production by nuxe start. | — |
NUXE_BASE_URL | Base URL used for server-side fetch calls. Automatically set to the listening URL in dev; defaults to http://localhost:<PORT> in production. | http://localhost:3000 |
NUXE_DEV | Set to true while the dev server is running; set to false by nuxe start. | — |
NUXE_SILENT | Suppress framework log output when set. Reserved — not forwarded to runtime config. | — |