Reference

CLI

oke and create-oke commands — scaffold, develop, ship, and operate an okengine app.

The CLI is how you scaffold, run, and operate an app. create-oke writes the project; oke is the day-to-day binary (dev loop, schema, vault, docker, doctor).

For developers who already know the model — look up a command, its flags, and what it writes.

The one rule

Prefer the CLI for environment wiring (oke dev, oke db, oke docker). Put behavior in Flows and oke.config.ts — never invent a ninth element or hand-edit the Manifest.

Smallest Example

Scaffold an app

bunx create-oke@latest notes --yes
cd notes

Run the dev loop

bun run dev

bun run dev is the portable form (bunx oke dev is the same). Bare oke needs node_modules/.bin on PATH — PowerShell does not add it.

Compose comes up (pull / create / start progress streams into the boot status lines), the backend listens on 6530, Console on 6533, app MCP on 6535, docs MCP on 6536. Open http://localhost:6533. Quit with Ctrl+C.

On a TTY, after schema push, oke dev also:

  1. Prompts one-by-one for any Vault boot gaps (writes .env.local) — e.g. OPENROUTER_API_KEY when create-oke / oke ai setup / Keel declared the OpenRouter contract without a value.
  2. Asks to run oke db seed when a seed module exists and .oke/state.json has not recorded that seed identity yet. Run oke db seed anytime later.

Progressive Patterns

oke dev                 # watch · Console · client types · Docker Compose
oke test                # bun test with PGLite posture
oke doctor              # secrets · ports · schema drift
oke doctor --diff       # CI gate: undeclared contract breaks

Port Map

PortSurfaceWho starts it
6530Backend APIoke dev / oke start
6533Developer Consoleoke dev
6535App MCPoke dev
6536Docs MCP (read-only)oke dev

Override app / console / mcp listen ports in oke.config.ts ports — see Configuration.

oke Commands

CommandPurposeKey flags / subs
devWatch · hot reload · Console · client types (Docker Compose)--docker|-d [roles], --no-db-push, --entry|-e
testRun bun test with PGLite test posture
startProduction entry (Docker CMD)--entry|-e, --port|-p
doctorSecrets · ports · stub/domain schema drift--manifest, --diff, --before, --after, --base, --json
stackPreview images / tags / ports (writes nothing)--config, --json
schemaCore + plugin tables → .oke/schema/oke.tsgenerate (--check, --manifest, --out)
dbDomain schemapush · generate · migrate · seed · studio · search-backfill
clientAmbient types for a separate frontend repoadd <url> (--out)
vaultSecretsset · list · import · key · init · status · seal · unseal · rotate · rotate-master · audit · purge-expired · backup · restore
dockerDerive compose · clean leftover stacks--prod|-p, --out, --config, --manifest; sub clean
imagesList / pin digestslist · pin
buildTree-shaken bundle--target|-t bun|node|edge, --entry, --outdir
evalPrompt eval sets (CI gate)--manifest
aiConfigure AI driver + modelssetup (--provider, --chat, --vision, --embed, --yes)
branchFork journaled state<name>, --at|-a
replayRe-invoke a past Flow from Runs--request-id|-r, --entry, --dry-run, --live
privacyCrypto-shred subject dataerase (--subject|-s)
upgradeBreaking-change codemods + diff--apply|-a
consoleConsole helpersclaim-code (--json)
gatesGate catalogue from Manifestlist (--manifest, --json)
completionShell completion scriptbash · zsh · fish
modeDeprecatedoke dev always uses Docker Compose--help

Bare oke (TTY) opens the interactive board; oke --help prints the catalogue.

oke db detail

Shared flags on push / generate / migrate / studio: --config\|-c, --env name (dev · test · prod). Seed adds --force, --entry. Search-backfill adds --batch n and a <table> positional.

oke db push --env dev
oke db migrate --env prod
oke db seed --force
oke db search-backfill notes --batch 500

create-oke

FlagMeaning
-t, --template <id>standard (default) or advanced
--sql <id>Store SQL dialect — only postgres (test stays pglite)
-y, --yesNo prompts; defaults + bun install (no oke dev)
--install / --no-installRun or skip bun install after scaffold
--agents-md / --no-agents-mdWrite AGENTS.md (default on)
--ai / --no-ai / --ai skipConfigure or skip AI setup
--locales <tags>Extra languages beyond English (e.g. ar or ar,fr)
--pgdog / --no-pgdogPin PgDog in front of Postgres
--proxy <id> / --no-proxynone · caddy · traefik · nginx
-h, --helpShow help

Troubleshooting

Learn more

Next

On this page