Logo VitNode

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.

Run the VitNode CLI
bun run vitnode dev

Generated projects already call it from their package.json scripts, so pnpm dev and pnpm start run vitnode dev and vitnode start for you.

Commands

CommandWhat it doesGuide
vitnode devStart the development environmentRun in development
vitnode buildBuild for production and report bundle sizesBuild and start
vitnode startStart the production serverBuild and start
vitnode plugin listList the plugins your app usesPlugins
vitnode plugin validateCheck plugins the way your app will load themPlugins
vitnode db generateWrite a migration for schema changesDatabase
vitnode db migrateApply pending migrations and seed initial dataDatabase
vitnode db statusShow the connection and what is pendingDatabase
vitnode db pushSync the schema directly, in development onlyDatabase
vitnode i18n <command>Add, check, sync and translate languagesInternationalization

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 hasIt is a
vite.config.ts (or .mts, .js...)App
src/vitnode.api.config.tsAPI 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.

Next steps