CLI Commands
Every command and option for nitrostack-cli and nitrostack-py.
The one place to look up a command in either CLI. For what each command does, see its page in NitroStack CLI.
Commands
Every command in both CLIs, in one table per language.
| Command | Purpose |
|---|---|
init <name> | Create a project from a template |
dev | Development mode with hot reload |
build | Compile for production |
start | Start the production server |
install | Install root and widget dependencies |
upgrade | Upgrade NitroStack packages |
generate <type> <name> | Generate modules, tools, guards, and more |
cursor | Configure Cursor to use the server |
pack | Create a deployment zip |
Install with npm install -g @nitrostack/cli, or run any command with npx @nitrostack/cli.
Entry: nitrostack-py or python -m nitrostack.cli.main.
| Command | Purpose |
|---|---|
init [name] | Scaffold (--template, --skip-install, --force, --port, --widget) |
dev | Hot reload (--port, --widget) |
start | Production (--port, --widget) |
pack | Wheel (--dry-run, --include-env) |
generate <type> <name> | tool module guard pipe interceptor filter service |
install | Deps (--production) |
upgrade | Pin/bump (--version, --dry-run, --allow-downgrade) |
validate | Lint project |
register | Claude Desktop (--name, --file) |
There is no build command.
TypeScript options
Each command's page explains what it does, with examples and every option's default. This table is the quick lookup.
| Command | Options |
|---|---|
init | --preset, --template, --description, --author, --skip-install, --force |
dev | --port |
build | --output |
start | --port |
pack | -o, --output, --dry-run, --include-env, --no-sync-gitignore |
install | --skip-widgets, --production |
upgrade | --dry-run |
generate | --module, --output, --force, --skip-related |
cursor
cursor configures Cursor to discover and connect to your MCP server.
nitrostack-cli cursor [options]| Option | Description | Default |
|---|---|---|
-g, --global | Install to ~/.cursor/mcp.json | false |
-l, --local | Install to .cursor/mcp.json | true |
-t, --type <type> | Connection type (command, legacy-sse, streamable-http) | command |
-u, --url <url> | Custom HTTP URL | Auto |
-p, --port <port> | Port for default HTTP URL | 3000 |
--force | Force overwrite existing configuration | false |
npm scripts
Projects created with init include these scripts:
{
"scripts": {
"dev": "nitrostack-cli dev",
"build": "nitrostack-cli build",
"start": "nitrostack-cli start",
"upgrade": "nitrostack-cli upgrade",
"install:all": "nitrostack-cli install"
}
}Run them with npm:
npm run dev # Start development
npm run build # Build for production
npm start # Start production server
npm run upgrade # Upgrade packages
npm run install:all # Install all dependenciesExit codes
Every command exits with one of these codes, so scripts can check the result:
| Code | Description |
|---|---|
0 | Success |
1 | General error |
Environment variables
Variables the CLI and the server read:
| Variable | Description | Default |
|---|---|---|
NODE_ENV | Environment mode | development |
MCP_SERVER_PORT | MCP server port | 3000 |
WIDGET_PORT | Widget server port | 3001 |
LOG_LEVEL | Logging level | info |
