Vite
Scaffold a Vite workspace with Vanilla TypeScript, React, Vue, or Svelte.
You can run this directly from an empty location; scaffold starter base is not a prerequisite. Nova creates the monorepo root and the first Vite workspace together.
Why Use This Command?
- Selects one reviewed framework layer—Vanilla TypeScript, React, Vue, or Svelte—without copying an upstream preset wholesale.
- Auto-detects monorepo or workspace mode so the same command works whether you're starting fresh or adding to an existing project.
- Provides
dev,prod,check,build, andcleanscript groups whose top-level commands delegate to adjacentname:*steps through Nova's script runner; the child steps run Vite and TypeScript directly. - Optionally adds an auto-updating service worker and a supervised static service in the repository-wide s6 image.
- Composes Nova's ESLint and TSConfig framework presets, enables all Nova rules, and includes Vitest for every framework choice.
Requirements
- Node.js runtime — Use any Node.js LTS release.
- Empty directory (monorepo mode) or monorepo root (workspace mode) — The command auto-detects which mode to use.
Usage
Options
| Flag | Description |
|---|---|
-d, --dry-run | Run without writing any files. |
--install | Install dependencies after scaffolding; this is the default. |
--no-install | Skip dependency installation. |
--name <name> | Project slug when creating a new monorepo; omit at an existing root. |
--non-interactive | Use flags and defaults without opening prompts. |
--workspace-name <name> | Workspace directory name. |
--output <dir> | Output directory. |
--framework <vanilla|react|vue|svelte> | Framework layer; defaults to vanilla. |
--pwa | Add an auto-updating progressive web app service worker. |
--docker-image | Add the production build directory to the repository-wide s6 image. |
Output Structure
{project-slug}/
├── package.json
├── nova.config.json
├── apps/
│ └── {workspace-name}/
│ ├── package.json
│ ├── vite.config.mts
│ ├── tsconfig.json
│ ├── index.html
│ ├── config/
│ │ ├── eslint-framework.mts
│ │ ├── framework-plugins.ts
│ │ └── pwa-plugins.ts
│ └── src/
│ ├── main.ts
│ └── {framework component}
└── packages/
With --docker-image, Nova adds root .dockerignore, Dockerfile, and compose.yml entry points plus private assembly files under packages/docker. The built Vite site runs as a supervised static service inside the repository's one s6 image.
See Docker Images for the shared runtime and layout contract.
Config Fields
| Field | Description |
|---|---|
project.name.slug | Required in workspace mode and used to derive the package and registered workspace name. In monorepo mode, written from --name or the project-name answer. |
project.name.title | Written in monorepo mode, title-cased from the project slug. |
workspaces | A workspaces entry is written for the new workspace: name ({projectSlug}-app-{workspaceName}), role (app), and policy (trackable). |
How It Works
Interactive Wizard
When run without flags, Nova collects every answer before it writes files:
Monorepo mode (no package.json found):
- Project name — Enter a slug for your monorepo (e.g.
my-vite-app). - Workspace name — Enter a slug for the workspace directory (default:
vite). - Framework — Choose Vanilla TypeScript, React, Vue, or Svelte (default: Vanilla TypeScript).
- Progressive web app — Choose whether to add the service worker (default: no).
- Docker image — Choose whether to package the static build (default: no).
The new project is created in ./{project-name} by default and never directly in the current directory.
Workspace mode (package.json with workspaces found):
- Workspace name — Enter a slug for the workspace directory (default:
vite). - Output directory — Confirm the workspace path (default:
./apps/{workspace-name}). - Framework — Choose Vanilla TypeScript, React, Vue, or Svelte (default: Vanilla TypeScript).
- Progressive web app — Choose whether to add the service worker (default: no).
- Docker image — Choose whether to package the static build (default: no).
Nova reads the project slug from the root nova.config.json; it does not ask you to rename the project or package.
After collecting the answers, Nova displays the complete plan and asks for one confirmation. It then writes the scaffold and installs dependencies unless you pass --no-install. Project-level generators remain separate commands that you can run after configuring nova.config.json.
Non-Interactive Mode
Agents and automation should add --non-interactive. A new monorepo needs --name, --workspace-name, and --output. An existing monorepo needs only --workspace-name and --output; omit --name because Nova reads the root project slug.
Naming, Registration, and Safety
For project slug my-vite-app and workspace slug web, Nova names the package my-vite-app-app-web. The same name is written to the workspace package.json and its nova.config.json entry. If the root workspaces globs do not include the selected output, Nova adds that exact relative path to the root package.json.
Before writing, Nova requires a readable root package.json and nova.config.json, keeps the output inside the monorepo, rejects duplicate paths and names, and lists any template files it would overwrite. --dry-run performs these checks without changing the project.
Next Steps
After scaffolding, consider running generators to add project files like .editorconfig, LICENSE, and README.md. The root .gitignore is already generated by the scaffold.