Running ka with no subcommand starts the TUI. Everything else is a subcommand.
| Flag |
Effect |
-c, --continue |
Continue the newest strand (this terminal’s waypoint preferred) |
--session <ID|name> |
Resume a session by id (prefix ok), memorable name (/name), or strand file path |
--model <SEL> |
Model selector override (vendor/model@effort) |
--mode <MODE> |
Permission mode override (guarded | accept-edits | free | plan, plus the needs-approval / full-access aliases) |
--disable <SPECS> |
Disable features at startup (comma-separated or repeatable): agents | skills | mcp | hooks | web | lsp | debug, or one item as mcp:<server>, skill:<name>, tool:<hand>, agent:<name> (see feature toggles) |
--enable <SPECS> |
Re-enable over a [features] disable (same grammar) |
--sandbox <off | fs> |
Sandbox mode override |
-i, --interactive-prompt <PROMPT> |
Run one prompt before the TUI opens, landed in the session; the TUI resumes on that strand (composes with -c / --session; TUI-only) |
--config <PATH> |
Extra strict-TOML config layer (repeatable) |
--dialects <PATH> |
Extra dialect catalog overlay (repeatable) |
--no-discovery |
Skip local-endpoint discovery probes |
--trust |
Trust this directory’s .ka/ka.toml (decision is stored) |
--safe-mode |
Disable all customizations (AGENTS.md, MEMORY.md, skills, agents, commands, hooks, MCP, LSP), keeping built-ins, config, and auth |
--version |
Version, carries the git hash |
| Command |
What it does |
ka |
TUI, fresh session |
ka -c |
TUI, continue this terminal’s latest session |
ka --session <id|name> |
TUI, resume by id prefix or session name |
ka sessions [--json] |
List sessions for this directory (ids, names, titles, cost, tokens) |
ka rewind [N] |
Drop the last N user turns of the newest strand |
ka export [-o out.md] [--html] [--session ID] |
Export a strand as readable markdown, or a self-contained offline HTML page |
ka undo |
Restore the latest file snapshot of the newest session here |
| Command |
What it does |
ka run [PROMPT] |
One headless turn (see headless) |
ka serve [--addr ADDR] [--token T] |
HTTP/SSE session server (see serve) |
ka attach [ID] [--addr ADDR] [--token T] |
Observe a live ka serve session read-only over SSE (no write path) |
ka acp |
Agent Client Protocol over stdio (see ACP) |
| Command |
What it does |
ka models [--no-discovery] |
Catalog + local Ollama/LM Studio probes |
ka providers |
Provider registry with API-key env status |
| Command |
What it does |
ka init |
Generate a starter AGENTS.md from a quick repo scan |
ka config schema |
JSON schema for ka.toml layers (editor integration) |
ka config print |
The resolved configuration |
ka doctor [--net] [--json] |
Environment health checks |
ka update [--channel stable|edge] [--check] |
Check for / install a signed release update |
| Command |
What it does |
ka mcp |
Probe configured [[mcp]] servers and list their tools |
ka agents |
List discovered markdown agents (.ka/agents/*.md and friends) |
ka install <skill|agent|command|rule> <git-url | path> [--force] |
Install a customization into the user layer (ka skill install … is the skill alias; no registry, installing is the trust act) |
ka install list [kind] / ka install remove <kind> <name> |
List / remove installed customizations |
ka skill install <git-url | path> |
Install a user skill from a git URL or a local directory (needs a SKILL.md; --force overwrites) |
ka skill list / ka skill remove <name> |
List / remove installed user skills (~/.config/ka/skills) |
ka import claude <settings.json> [--project | --user] [--dry-run] |
Convert Claude Code permission rules into ka [[rules]] (prints the conversion and skips, then strict-validates the write; deny → ask → allow order preserves claude precedence) |
| Command |
What it does |
ka shell-integration |
Print a shell snippet for .zshrc/.bashrc: after each run, the just-exited session’s resume command lands in the live shell’s history, so ↑ + Enter reopens it |
ka completions <bash|zsh|fish> |
Shell completions, generated from the live CLI parser |
| Command |
What it does |
ka index |
Rebuild the full-text search index over all strands |
ka search <query> [--session ID] [--limit N] |
FTS5 query across sessions |
| Flag |
Effect |
--print text |
Final answer only (default) |
--print ndjson |
ka’s own event stream, NDJSON |
--print stream-json |
Claude-Code-compatible event shapes |
--schema <PATH> |
JSON schema the reply must satisfy (structured output) |
-c / --session <ID> |
Continue a strand headlessly |
With no prompt argument, ka run reads the prompt from stdin. Exit codes: 0 ok, 1 error, 2 aborted (and 42 for rejected input, e.g. a reply that failed --schema validation).
| Variable |
Effect |
KA_MODEL |
Model selector, overrides config layers |
KA_MODE |
Permission mode, overrides config layers |
KA_SAFEMODE |
Same as --safe-mode |
KA_DATA_DIR |
Relocate the data directory (strands, spills, snapshots) |