@nextvm/cli
The nextvm command-line tool. A thin wrapper over @nextvm/build, @nextvm/db, @nextvm/registry, and @nextvm/migration.
Install
bash
pnpm add -D @nextvm/cliThis adds a nextvm binary to node_modules/.bin/. Use it directly in your scripts:
json
{
"scripts": {
"dev": "nextvm dev",
"build": "nextvm build",
"test": "vitest run",
"validate": "nextvm validate"
}
}Commands
| Command | Status | See |
|---|---|---|
nextvm create <name> | ✅ full | create |
nextvm add <name> [--full|--blank] | ✅ full | add |
nextvm validate | ✅ full | validate |
nextvm docs | ✅ full | docs |
nextvm build | ✅ full | build |
nextvm dev | ✅ full | dev |
nextvm db:migrate | ✅ full | db |
nextvm db:rollback | ✅ full | db |
nextvm db:generate | ⚠ stub | db |
nextvm db:seed | ⚠ stub | db |
nextvm migrate:from esx|qbcore | ✅ full | migrate-from |
nextvm registry:search <query> | ✅ full | registry |
nextvm registry:publish | ✅ full | registry |
nextvm deploy | ⚠ stub | deploy |
nextvm perf | ⚠ stub | perf |
The stubs (db:generate, db:seed, deploy, perf) print clear "not yet implemented" messages with the reason — they're either deferred to (SaaS hosting) or pending sub-features that need backend services.
Programmatic API
The CLI also exports createCli() and runCli() for embedding:
typescript
import { createCli, runCli } from '@nextvm/cli'
// Run with custom argv
await runCli(['nextvm', 'build', '--quiet'])
// Or build the commander Program for further customization
const program = createCli()
program.addCommand(myCustomCommand)
program.parseAsync()