Skip to content

CLI

Kumiko has two command-line surfaces. Which one you use depends on where you work:

  • In your app you use the published @cosmicdrift/kumiko-cli package, the package scripts that kumiko new app writes, and a few binaries from the framework packages. This is all an app developer needs.
  • In the framework repository (kumiko-framework) contributors use bun kumiko <verb>. Most of its commands start Docker services, run guards or manage the framework’s own test databases. They do not exist in an app.

Create an app and add features with the published CLI:

Terminal window
bunx @cosmicdrift/kumiko-cli@latest new app my-app
bunx @cosmicdrift/kumiko-cli add feature notes
bunx @cosmicdrift/kumiko-cli check

Day to day you run the scripts in the app’s package.json:

ScriptRunsPurpose
bun devbun --watch bin/dev.tsDev server with the welcome banner
bun run bootbin/main.ts in dry-run modeValidate features and env without a database
bun run testbun test with the unit bunfigUnit tests
bun run test:integrationkumiko-testing integrationIntegration tests against Postgres
bun run schema:generate <name>kumiko-schema generateWrite a SQL migration
bun run schema:applykumiko-schema applyApply pending migrations
bun run buildkumiko-buildProduction build into dist/ and dist-server/
bun run startbin/main.tsRun the production server
CommandComes fromPage
kumiko new app, kumiko add feature@cosmicdrift/kumiko-clinew, add
kumiko check@cosmicdrift/kumiko-clicheck
kumiko project, kumiko consumer@cosmicdrift/kumiko-cliproject, consumer
kumiko agent lint@cosmicdrift/kumiko-cliagent
kumiko sync-managed, kumiko ports@cosmicdrift/kumiko-clisync-managed, ports
kumiko api-docs@cosmicdrift/kumiko-cliapi-docs
kumiko-upgrade@cosmicdrift/kumiko-cli, @cosmicdrift/kumiko-dev-serverupgrade
kumiko-schema, kumiko-build, kumiko-init-deploy@cosmicdrift/kumiko-dev-serverschema, build, init-deploy
kumiko-testing@cosmicdrift/kumiko-testingTesting standard

bun run build also bundles a small CLI into dist-server/kumiko.js. It only knows schema and consumer and needs no dev dependencies:

Terminal window
bun /app/kumiko.js schema apply
bun /app/kumiko.js consumer list

See Deploy: Docker.

The commands below live in kumiko-framework/bin/. Run them from a framework checkout as bun kumiko <verb>. The pages marked framework repository only describe commands an app does not have.

Terminal window
bun kumiko dev # boot Postgres, Redis, Meilisearch and MinIO (docker compose up -d)
bun kumiko doctor # is everything healthy?
bun kumiko create myFeature # scaffold a new feature workspace
bun kumiko test # run unit tests (bun:test)
bun kumiko check # full quality pass (lint + types + guards + tests)
bun kumiko stop # bring services down (volumes stay)

Running kumiko with no arguments opens an interactive TUI (Ink-based) for discovering commands. Pipe-friendly contexts (CI, scripts) fall back to a plain help screen.

Commands are grouped into two roles:

  • app-dev, the default. Hides framework-maintenance commands.
  • maintainer, auto-detected inside the framework workspace. Adds ES-ops, code mods, CI guards, AI-eval delegation.

Override with --as <role>:

Terminal window
kumiko events prune --as maintainer

Maintainer-only unless you pass --as maintainer:

  • kumiko ci:guards, CI job splitter
  • kumiko eval, L2 AI eval (delegates to the enterprise evaluation package)
Terminal window
kumiko help # role-filtered command list
kumiko help <command> # per-command usage + docs URL
kumiko <command> --help # same as `kumiko help <command>`
kumiko docs <command> # open the docs page for one command

Each command is a single file under kumiko-framework/bin/commands/ that registers itself via defineCommand at import time. Adding a new command is a one-file change plus a side-effect import in bin/commands/index.ts.