CLI Reference
Complete command reference for the NNO CLI (`nno`).
CLI Reference
The NNO CLI (nno) provides namespaced commands for platform management, feature development, and marketplace operations.
nno <namespace> <command> [options]Installation
pnpm add -g @neutrino-io/clinno --versionAuthentication
Core commands — not namespaced.
nno login
Authenticate with the NNO platform.
nno login
nno login --token <api-token>| Flag | Alias | Type | Description |
|---|---|---|---|
--token | -t | string | NNO API token for CI/non-interactive use |
Notes:
--tokenstores credentials immediately and is intended for CI pipelines.- Interactive login requires the NNO CLI Service (coming in P5-4).
Examples:
# CI / non-interactive
nno login --token $NNO_API_TOKENnno logout
Sign out from the NNO platform by clearing the stored credentials file.
nno logoutNo flags.
nno whoami
Display the currently authenticated user, platform, and role.
nno whoamiNo flags.
Example output:
i Authenticated as [email protected]
i Platform: r4xk9m2zt5
i Role: platform-adminWarns if no credentials are stored or if the token has expired.
Project Management
Commands for local development, building, validation, and deployment of a Neutrino platform project. These commands operate locally against Wrangler and Vite — no NNO auth required.
nno project check
Validate project config for the target environment.
nno project check
nno project check --env stg| Flag | Alias | Type | Default | Description |
|---|---|---|---|---|
--env | -e | string | local | Target environment: local, dev, stg, or prod |
Checks performed:
| ID | Check | Severity |
|---|---|---|
| P01 | wrangler.toml exists for each service | Error |
| P02 | [env.<target>] section defined in wrangler.toml (non-local) | Error |
| P03 | No placeholder D1 IDs (local-dev-db, REPLACE_WITH_REAL_ID) in non-local env | Error |
| P04 | PLATFORM_ID and TENANT_ID are valid 10-char [a-z0-9] NanoIDs | Error |
| P05 | VITE_AUTH_API_URL present in env file | Warning |
| P06 | Wrangler CLI available; prompts to verify secrets | Warning/Info |
Exit codes: 0 success, 2 errors found.
Example:
nno project check --env stg
✓ P01 wrangler.toml found (auth, billing)
✓ P02 [env.stg] defined in all service configs
✓ P03 D1 IDs populated (no placeholders)
✓ P04 PLATFORM_ID=r4xk9m2zt5, TENANT_ID=n7wp3fy8q1
⚠ P05 VITE_AUTH_API_URL not set in .env.stg
0 errors, 1 warning(s) — project is deployable with caveatsnno project dev
Start all NNO services for local development using concurrently.
nno project devNo flags.
Starts the following services in parallel:
| Service | Command |
|---|---|
iam | NODE_ENV=development wrangler dev |
registry | NODE_ENV=development wrangler dev |
billing | NODE_ENV=development wrangler dev |
provisioning | NODE_ENV=development wrangler dev |
stack-registry | NODE_ENV=development wrangler dev |
cli-svc | NODE_ENV=development wrangler dev |
gateway | NODE_ENV=development wrangler dev |
console | pnpm dev |
All services are killed if any one exits (success or failure).
nno project build
Build the console shell for the target environment.
nno project build
nno project build --env prod| Flag | Alias | Type | Default | Description |
|---|---|---|---|---|
--env | -e | string | stg | Target environment: stg or prod |
Runs pnpm --filter console build --mode <env>. Output goes to apps/console/dist/.
Example:
nno project build --env prod
# → Building console for env: prod
# ✓ Build complete → apps/console/dist/nno project deploy
Deploy the platform console to Cloudflare Pages via the NNO CLI Service.
nno project deploy <platform-id>
nno project deploy <platform-id> --env prod| Argument | Type | Required | Description |
|---|---|---|---|
platform-id | positional | Yes | Platform ID to deploy |
| Flag | Type | Default | Description |
|---|---|---|---|
--env | string | dev | Target environment: dev, stg, or prod |
Calls POST /api/v1/platforms/<platform-id>/deploy on the NNO CLI Service and polls for deployment completion (up to 5 minutes). Reads NNO_CLI_SERVICE_URL and NNO_CLI_API_KEY from environment variables.
Example:
nno project deploy r4xk9m2zt5 --env stg
# Triggering deployment for platform r4xk9m2zt5 (stg)...
# Deployment started: dep_9x2m4k7p1q
# URL: https://r4xk9m2zt5-stg.pages.dev
# Polling for completion...
# Status: deploy — success
# Deployment completeFeature Development
Commands for scaffolding, developing, testing, validating, and submitting feature packages to the NNO Marketplace.
nno feature init
Scaffold a new feature package.
nno feature init <name>
nno feature init analytics --no-service
nno feature init crm --dir ./packages/crm| Argument | Type | Required | Description |
|---|---|---|---|
name | positional | Yes | Feature name in kebab-case |
| Flag | Type | Default | Description |
|---|---|---|---|
--no-service | boolean | false | Skip Hono service scaffold |
--dir | string | ./<name> | Target output directory |
Generates the full feature scaffold:
<name>/
├── src/
│ ├── feature.ts ← FeatureDefinition
│ ├── routes/index.tsx ← Page component
│ └── index.tsx ← Package entry
├── nno.config.ts
├── package.json
├── tsconfig.json
├── README.md
└── service/ ← Hono Worker (omitted with --no-service)
├── src/index.ts
└── wrangler.toml.templateExample:
nno feature init analytics
# cd analytics
# pnpm install
# nno feature devnno feature dev
Start the local feature development environment.
nno feature dev
nno feature dev --no-service
nno feature dev --platform r4xk9m2zt5 --env stg| Flag | Type | Default | Description |
|---|---|---|---|
--no-service | boolean | false | Skip starting the Wrangler service |
--platform | string | — | Connect to a real NNO platform by ID |
--env | string | dev | Target environment when using --platform: dev or stg |
Default mode starts the NNO Mock Shell at localhost:5100 and the feature Vite dev server at localhost:5180. With --platform, the mock shell connects to the real NNO auth service.
Port assignments:
| Process | Default Port |
|---|---|
| NNO Mock Shell | 5100 |
| Feature Vite dev | 5180 |
| Feature Wrangler service | 8790 |
nno feature test
Run feature tests with Vitest.
nno feature test
nno feature test --watch
nno feature test --coverage
nno feature test --service-only
nno feature test --ui-only| Flag | Type | Default | Description |
|---|---|---|---|
--watch | boolean | false | Watch mode |
--coverage | boolean | false | Generate coverage report |
--service-only | boolean | false | Run service tests only |
--ui-only | boolean | false | Run UI tests only |
nno feature build
Build the feature package for distribution using tsup.
nno feature build
nno feature build --analyze| Flag | Type | Default | Description |
|---|---|---|---|
--analyze | boolean | false | Analyze bundle size (passes --metafile to tsup) |
Output goes to dist/.
nno feature validate
Validate a feature package for NNO compatibility. Must pass before nno feature submit.
nno feature validate
nno feature validate ./packages/analytics| Argument | Type | Required | Description |
|---|---|---|---|
path | positional | No | Path to feature package (default: .) |
Validation checks:
| ID | Rule | Severity |
|---|---|---|
| V01 | package.json exists | Error |
| V02 | package.json has "neutrino": {"type": "feature"} | Error |
| V03 | featureManifest is exported from src/index.ts | Error |
| V04 | TypeScript compiles without errors | Error |
| V05 | Permission keys follow {featureId}:{action} format | Error |
Exit codes: 0 all checks passed, 1 one or more checks failed.
Example:
nno feature validate
# Validating feature at /projects/analytics...
#
# ✓ package.json exists
# ✓ package.json has "neutrino": {"type": "feature"}
# ✓ exports featureManifest
# ✓ TypeScript compiles without errors
# ✓ Permission keys follow {featureId}:{action} format
#
# Result: 5 passed, 0 failednno feature submit
Submit the feature package to the NNO Marketplace. (Requires NNO CLI Service — coming in P5-4.)
nno feature submit
nno feature submit --message "Initial submission"
nno feature submit --private
nno feature submit --dry-run| Flag | Alias | Type | Default | Description |
|---|---|---|---|---|
--message | -m | string | — | Submission message |
--private | — | boolean | false | Private submission (not listed publicly) |
--dry-run | — | boolean | false | Prepare bundle without uploading |
Requires authentication (nno login) and a passing nno feature validate.
nno feature status
Check marketplace submission status. (Requires NNO CLI Service — coming in P5-4.)
nno feature status
nno feature status <submission-id>| Argument | Type | Required | Description |
|---|---|---|---|
id | positional | No | Submission ID to query (omit to list all pending) |
Statuses: PENDING → IN_REVIEW → APPROVED | REJECTED
Marketplace
Commands for browsing the NNO Marketplace catalogue and managing submissions. These commands require the NNO CLI Service (coming in P5-4).
nno marketplace list
Browse the NNO Marketplace catalogue.
nno marketplace list
nno marketplace list --type domain
nno marketplace list --search payments| Flag | Type | Description |
|---|---|---|
--type | string | Filter by feature type: core, domain, or client |
--search | string | Search term |
nno marketplace approve
Approve a marketplace submission. NNO operator only.
nno marketplace approve <submission-id>
nno marketplace approve sub_9x2m4k7p1q --note "Looks good"| Argument | Type | Required | Description |
|---|---|---|---|
id | positional | Yes | Submission ID to approve |
| Flag | Alias | Type | Default | Description |
|---|---|---|---|---|
--note | -n | string | — | Approval note |
--private | — | boolean | false | Keep listing private after approval |
nno marketplace reject
Reject a marketplace submission. NNO operator only.
nno marketplace reject <submission-id> --reason "Missing featureManifest export"| Argument | Type | Required | Description |
|---|---|---|---|
id | positional | Yes | Submission ID to reject |
| Flag | Alias | Type | Required | Description |
|---|---|---|---|---|
--reason | -r | string | Yes | Rejection reason |
Plugin System
The NNO CLI uses a plugin-based namespace registry. Each domain (project, feature, marketplace) is a self-contained NnoPlugin registered at startup.
NnoPlugin interface (packages/cli/src/types.ts):
import type { SubCommandsDef } from 'citty'
export interface NnoPlugin {
/** Namespace name — becomes the top-level subcommand (e.g. 'project'). */
name: string
/** Short description shown in `nno --help`. */
description?: string
/** Citty subcommands for this namespace. */
commands: SubCommandsDef
}Authoring an external plugin:
import { definePlugin, registerPlugin } from '@neutrino-io/cli/plugin'
import { defineCommand } from 'citty'
export const analyticsPlugin = definePlugin({
name: 'analytics',
description: 'Analytics management commands',
commands: {
report: defineCommand({
meta: { name: 'report', description: 'Generate analytics report' },
async run() {
// ...
},
}),
},
})
// Register before runMain in your entry point
registerPlugin(analyticsPlugin)Built-in namespaces: project, feature, marketplace.
Planned namespaces (Phase 2): platform, ops.
Exit Codes
| Code | Meaning |
|---|---|
0 | Success |
1 | General error (network, auth, unexpected) |
2 | Validation / check failure |
3 | Build failure |
4 | Submission rejected by server |
Environment Variables
| Variable | Used by | Description |
|---|---|---|
NNO_CLI_SERVICE_URL | nno project deploy | NNO CLI Service base URL (default: http://localhost:8787) |
NNO_CLI_API_KEY | nno project deploy | API key for the NNO CLI Service |
Credentials are stored in ~/.nno/credentials.json after nno login.