nebutra CLI
The unified Nebutra command-line tool — status, dev, db, and codegen inside a scaffolded Sailor project.
The nebutra CLI is your day-to-day tool inside a project scaffolded by
create-sailor. Per the Sailor Convergence ADR (2026-09-24), the public
package now serves the template buyer only — operator tooling (admin, community, growth,
stats) and the unfinished ecosystem surface were removed, create no longer wraps
create-sailor (there is one creation entry point), and add was replaced by sync against a
declared capability list.
Installation
# Inside the monorepo — no install needed
pnpm exec nebutra --help
# Global install
npm install -g nebutra@latestGlobal flags
--verbose Enable verbose output
--quiet Suppress non-essential output
--format <type> Output format: json, table, plain
--yes Skip all interactive prompts (Agent mode)
--no-interactive Alias for --yes
--no-color Disable colored output--yes is automatically implied in non-TTY environments (CI, piped output, agent sandboxes).
Lifecycle: login, status, sync
nebutra login
Authorizes this machine with your Nebutra account via device flow (modelled on gh/vercel), not
a template-project feature — it authenticates the buyer identity used for template updates and
licensing.
nebutra login # opens a browser, prints a user code, blocks until approved
nebutra login --json # prints {verification_uri, verification_uri_complete, user_code,
# expires_in, interval} and exits 0 immediately — no blocking
nebutra login --poll --json # resumes the pending code from the --json call above and blocks
# to completion
nebutra login --no-browser # print the URL instead of trying to open oneThe session token is stored in the OS keychain (falling back to
~/.config/nebutra/credentials.json, mode 0600). Set NEBUTRA_TOKEN to skip the stored token
entirely (CI). There is no silent refresh — once the stored token's expiry passes, re-run
nebutra login.
nebutra whoami # show the identity this machine is authorized as
nebutra logout # clear the stored token
nebutra logout --all # clear ALL local nebutra config, not just the auth tokennebutra link / nebutra unlink
nebutra link [project-id] # link the current project to a Nebutra project id
nebutra unlink # remove the project link from nebutra.config.json
nebutra unlink --force # delete the entire nebutra.config.jsonnebutra status
The machine interface for capability readiness. Reads nebutra.config.json's declared
capabilities list and, for each one, checks whether a live provider's env keys are all present:
nebutra status
nebutra status --jsonEach capability reports one of three states:
| State | Meaning |
|---|---|
live | A real provider's required env keys are all set |
local-fallback | No provider configured; a local implementation is running instead (dev/console/memory) |
missing-key | No provider configured and no local fallback exists — the capability does not run |
Output also includes the next action (which env var(s) to set) for anything not live. Agents
should read status, act on the next hint, then re-read.
nebutra sync
Reconciles .env.example / .env.local against nebutra.config.json's declared capability list
— capabilities only, no providers; providers are resolved from whichever env keys are present
at runtime. This replaces the old nebutra add, which used to write a provider choice directly.
nebutra sync # add any missing env keys for declared capabilities to .env.example,
# create .env.local if missing
nebutra sync --dry-run # preview additions without writing (exit code 10)
nebutra sync --jsonsync is idempotent — keys already present anywhere in .env.example are left untouched.
Project setup
nebutra init
nebutra init
nebutra init --dry-run # preview without writing files (exit code 10)
nebutra init --if-not-exists # skip if nebutra.config.json already existsnebutra doctor
Checks Node version, nebutra.config.json/package.json presence, .env presence, and monorepo
layout drift (legacy apps/api-gateway/ vs backends/gateway/, uncategorized packages/<name>/).
nebutra doctorDatabase
nebutra db generate # Regenerate Prisma client
nebutra db migrate # Run pending migrations
nebutra db push # Push schema to database (no migration file)
nebutra db seed # Populate test data
nebutra db studio # Launch Prisma Studio GUI
nebutra db reset --yes # ⚠️ Reset entire database
nebutra db status # Show migration statusFlags: --dry-run, --yes, --format <json|plain>
Infra
Docker Compose infrastructure (PostgreSQL, Redis, and any profile-gated extras):
nebutra infra up # Start the full stack
nebutra infra up --lite # PostgreSQL + Redis only
nebutra infra up --profile <name>
nebutra infra down
nebutra infra status
nebutra infra logs [service]
nebutra infra reset --yes # ⚠️ Remove all containers and volumesFlags: --dry-run, --yes, --lite, --profile <name>, --format <json|plain>
Environment variables
nebutra env validate # Check required vars from .env.example are set
nebutra env template # Generate .env.local interactively from .env.example
nebutra env template --yes # Non-interactive
nebutra env diff # Compare .env.local vs .env.example
nebutra env show # Display current vars (KEY/TOKEN/SECRET/PASSWORD masked)Flags: --dry-run, --yes, --format <json|plain>
Dev, build, lint, typecheck
nebutra dev # Start dev servers (turbo dev)
nebutra dev --app=web # Start a single app
nebutra build # Build all apps
nebutra build --strict # Build with UI governance verification
nebutra lint # Biome lint
nebutra lint --fix
nebutra typecheckAll four accept --app <name> and --dry-run (exit code 10).
Testing
nebutra test # Unit tests (Vitest)
nebutra test --watch
nebutra test --coverage
nebutra test e2e # Playwright E2E
nebutra test e2e --ui
nebutra test e2e --ci
nebutra test size # Bundle size check
nebutra test size --why # Detailed breakdown
nebutra test arch # Architecture conformance testsThere is a separate top-level nebutra e2e <suite> for named Playwright suites, each with its own
config:
nebutra e2e smoke # e2e/playwright.config.ts
nebutra e2e golden # e2e/playwright.golden.config.ts
nebutra e2e smoke --dry-runCodegen
nebutra generate app my-blog # Next.js app scaffold
nebutra generate package notifications # @nebutra/<name> package scaffold
nebutra generate route projects # Hono route in backends/gateway
nebutra generate component PricingCard \
--variants "primary,outlined" --sizes "sm,md,lg"Alias: nebutra gen. All accept --dry-run and --yes.
Brand, theme, i18n
nebutra brand init
nebutra brand apply
nebutra brand palette --primary=#7C3AED --secondary=#F59E0B
nebutra brand sync
nebutra brand verify
nebutra theme list # List design languages (Brand Packages)
nebutra theme inspect <id> # Show one design language's governance manifest
nebutra i18n sync
nebutra i18n validate
nebutra i18n add <locale>
nebutra i18n statusSailor Studio (a project's look, in one code)
Per ADR 2026-09-27 Sailor Studio, a project's look — base
design language plus a small set of knob overrides — is a short preset code, applied with exactly
one of two commands. Nobody hand-edits the design system after init.
nebutra apply --preset <code> # put a preset on this project
nebutra apply --preset <code> --only theme # change only the theme group
nebutra apply --preset <code> --only fonts # change only the fonts group
nebutra apply --preset <code> --no-build # write the preset without rebuilding tokens
nebutra studio schema # print the preset JSON Schema
nebutra studio preview <preset> # validate a preset, print the Studio review link
nebutra studio preview <preset> --open # also open it in the browser
nebutra studio pull <preset> # put a preset (code, JSON, file, or Studio link) on this projectcreate-sailor <dir> --preset <code> accepts the same code at scaffold time; omit it and the look
is the factory default — the scaffold still asks nothing.
AI
nebutra ai provider list # Supported/enabled runtime AI providers
nebutra ai provider enable openai anthropic
nebutra ai provider disable deepseek
nebutra ai gateway init # Local AI gateway governance block
nebutra ai gateway status
nebutra ai route set <name> ...
nebutra ai route list
nebutra ai models # Configured models/providers
nebutra ai agents # Available agents in the project
nebutra ai test "hello world" # Requires a running API gateway
nebutra ai configUI component contracts
nebutra ui search [query] # Search the agent-readable @nebutra/ui component contract
nebutra ui component <name> # Print one component's contract
nebutra ui validate [name] # Validate production evidence
nebutra ui migrate <name> # Dry-run codemod / migration hintsPlatform
nebutra services status
nebutra services logs <service>
nebutra services restart <service>
nebutra services scale <service> <n>
nebutra secrets list --tenant org_123
nebutra secrets set <key> --tenant org_123 --value ...
nebutra secrets get <key> --tenant org_123
nebutra secrets rotate <key> --tenant org_123
nebutra secrets audit --tenant org_123
nebutra secrets verify --tenant org_123secrets manages application-layer encrypted secrets via @nebutra/vault (AWS KMS + HKDF envelope
encryption).
License
nebutra license activate <key>
nebutra license statuslicense is an internal check on the logged-in identity (see nebutra login), not a separate
provisioning flow.
Utilities
nebutra completions bash|zsh|fish # Install shell completions
nebutra mcp # Start the MCP context server for Cursor/Windsurf/Claude Code
nebutra schema # Command schema (Agent-friendly)
nebutra schema --all # Full schema as JSON
nebutra schema --list # List all command names
nebutra schema --exit-codes # Exit codes reference
nebutra upgrade # Upgrade the CLI itself (alias: self-update)Agent mode
Every command accepts --yes for non-interactive execution:
nebutra init --yes
nebutra db migrate --yes
nebutra generate app analytics --yes--yes is automatically implied in non-TTY environments (piped output, CI).
Dry-run mode
--dry-run previews without side effects and exits with code 10:
nebutra init --dry-run
nebutra sync --dry-run
nebutra generate app my-blog --dry-run
nebutra db migrate --dry-run
nebutra infra up --dry-runHow is this guide?
Last updated on