CLI
VitNode CLI
The vitnode command runs, builds and starts VitNode apps, validates plugins, manages database migrations and translations.
vitnode is the command-line tool for VitNode projects. It ships with @vitnode/core, so every VitNode app and plugin already has it. You do not install anything extra.
bun run vitnode devGenerated projects already call it from their package.json scripts, so pnpm dev and pnpm start run vitnode dev and vitnode start for you.
Commands
| Command | What it does | Guide |
|---|---|---|
vitnode dev | Start the development environment | Run in development |
vitnode build | Build for production and report bundle sizes | Build and start |
vitnode start | Start the production server | Build and start |
vitnode plugin list | List the plugins your app uses | Plugins |
vitnode plugin validate | Check plugins the way your app will load them | Plugins |
vitnode db generate | Write a migration for schema changes | Database |
vitnode db migrate | Apply pending migrations and seed initial data | Database |
vitnode db status | Show the connection and what is pending | Database |
vitnode db push | Sync the schema directly, in development only | Database |
vitnode i18n <command> | Add, check, sync and translate languages | Internationalization |
To create a plugin, use the project generator: create-vitnode-app --plugin. See Create a plugin.
Run vitnode alone (or vitnode --help) for a short overview, vitnode <command> --help for a command's options, and vitnode --version for the installed @vitnode/core version.
How the CLI picks your project
dev, build and start act on the project in the current folder. The CLI walks up to the nearest package.json and checks, in this order:
| The folder has | It is a |
|---|---|
vite.config.ts (or .mts, .js...) | App |
src/vitnode.api.config.ts | API app |
tsconfig.build.json and package.json exports into ./dist/src/ | Plugin package |
Run it at a monorepo root and the CLI stops with a hint to cd into your app, such as apps/web, instead of guessing which project you meant.
Works with your tools, not instead of them
The CLI drives the tools your project already uses: Vite through its JavaScript API, TanStack Start through your vite.config.ts, and your project's own drizzle-kit. You can still run vite or drizzle-kit directly. vitnode adds the database bootstrap, plugin checks and readable output around them.