NNO Docs

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/cli
nno --version

Authentication

Core commands — not namespaced.

nno login

Authenticate with the NNO platform.

nno login
nno login --token <api-token>
FlagAliasTypeDescription
--token-tstringNNO API token for CI/non-interactive use

Notes:

  • --token stores 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_TOKEN

nno logout

Sign out from the NNO platform by clearing the stored credentials file.

nno logout

No flags.


nno whoami

Display the currently authenticated user, platform, and role.

nno whoami

No flags.

Example output:

i Authenticated as [email protected]
i Platform: r4xk9m2zt5
i Role: platform-admin

Warns 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
FlagAliasTypeDefaultDescription
--env-estringlocalTarget environment: local, dev, stg, or prod

Checks performed:

IDCheckSeverity
P01wrangler.toml exists for each serviceError
P02[env.<target>] section defined in wrangler.toml (non-local)Error
P03No placeholder D1 IDs (local-dev-db, REPLACE_WITH_REAL_ID) in non-local envError
P04PLATFORM_ID and TENANT_ID are valid 10-char [a-z0-9] NanoIDsError
P05VITE_AUTH_API_URL present in env fileWarning
P06Wrangler CLI available; prompts to verify secretsWarning/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 caveats

nno project dev

Start all NNO services for local development using concurrently.

nno project dev

No flags.

Starts the following services in parallel:

ServiceCommand
iamNODE_ENV=development wrangler dev
registryNODE_ENV=development wrangler dev
billingNODE_ENV=development wrangler dev
provisioningNODE_ENV=development wrangler dev
stack-registryNODE_ENV=development wrangler dev
cli-svcNODE_ENV=development wrangler dev
gatewayNODE_ENV=development wrangler dev
consolepnpm 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
FlagAliasTypeDefaultDescription
--env-estringstgTarget 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
ArgumentTypeRequiredDescription
platform-idpositionalYesPlatform ID to deploy
FlagTypeDefaultDescription
--envstringdevTarget 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 complete

Feature 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
ArgumentTypeRequiredDescription
namepositionalYesFeature name in kebab-case
FlagTypeDefaultDescription
--no-servicebooleanfalseSkip Hono service scaffold
--dirstring./<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.template

Example:

nno feature init analytics
# cd analytics
# pnpm install
# nno feature dev

nno feature dev

Start the local feature development environment.

nno feature dev
nno feature dev --no-service
nno feature dev --platform r4xk9m2zt5 --env stg
FlagTypeDefaultDescription
--no-servicebooleanfalseSkip starting the Wrangler service
--platformstringConnect to a real NNO platform by ID
--envstringdevTarget 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:

ProcessDefault Port
NNO Mock Shell5100
Feature Vite dev5180
Feature Wrangler service8790

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
FlagTypeDefaultDescription
--watchbooleanfalseWatch mode
--coveragebooleanfalseGenerate coverage report
--service-onlybooleanfalseRun service tests only
--ui-onlybooleanfalseRun UI tests only

nno feature build

Build the feature package for distribution using tsup.

nno feature build
nno feature build --analyze
FlagTypeDefaultDescription
--analyzebooleanfalseAnalyze 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
ArgumentTypeRequiredDescription
pathpositionalNoPath to feature package (default: .)

Validation checks:

IDRuleSeverity
V01package.json existsError
V02package.json has "neutrino": {"type": "feature"}Error
V03featureManifest is exported from src/index.tsError
V04TypeScript compiles without errorsError
V05Permission keys follow {featureId}:{action} formatError

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 failed

nno 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
FlagAliasTypeDefaultDescription
--message-mstringSubmission message
--privatebooleanfalsePrivate submission (not listed publicly)
--dry-runbooleanfalsePrepare 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>
ArgumentTypeRequiredDescription
idpositionalNoSubmission ID to query (omit to list all pending)

Statuses: PENDINGIN_REVIEWAPPROVED | 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
FlagTypeDescription
--typestringFilter by feature type: core, domain, or client
--searchstringSearch term

nno marketplace approve

Approve a marketplace submission. NNO operator only.

nno marketplace approve <submission-id>
nno marketplace approve sub_9x2m4k7p1q --note "Looks good"
ArgumentTypeRequiredDescription
idpositionalYesSubmission ID to approve
FlagAliasTypeDefaultDescription
--note-nstringApproval note
--privatebooleanfalseKeep listing private after approval

nno marketplace reject

Reject a marketplace submission. NNO operator only.

nno marketplace reject <submission-id> --reason "Missing featureManifest export"
ArgumentTypeRequiredDescription
idpositionalYesSubmission ID to reject
FlagAliasTypeRequiredDescription
--reason-rstringYesRejection 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

CodeMeaning
0Success
1General error (network, auth, unexpected)
2Validation / check failure
3Build failure
4Submission rejected by server

Environment Variables

VariableUsed byDescription
NNO_CLI_SERVICE_URLnno project deployNNO CLI Service base URL (default: http://localhost:8787)
NNO_CLI_API_KEYnno project deployAPI key for the NNO CLI Service

Credentials are stored in ~/.nno/credentials.json after nno login.

On this page