CLI reference
Two binaries: khaelor (the interactive agent) and
khaelord (the autonomous daemon).
khaelor#
| Flag | Meaning |
|---|---|
--model <id> | Anthropic model id for this run. |
--aux-model <id> | Cheaper model used for context compaction summaries. |
--thinking <mode> | off · adaptive · always. |
--max-output-tokens <n> | Output ceiling per model response. |
--gate <mode> | Phase-gate rigor: strict · auto (default) · off. |
-p, --print "<prompt>" | Headless single turn: run, print the final answer, exit. Permission asks resolve to deny. |
--resume <session-id> | Resume a session (resume = exact replay of its log). |
--splash | Show the full gradient-sweep splash (~600 ms, any key skips). |
--doctor-tui | Print the detected terminal capabilities — colors, unicode, OSC 8/52 — with the reason for each, then exit. Attach it to display bug reports. |
--debug | Developer logs to ~/.khaelor/logs/. The TUI stays clean; keys are never logged. |
-v, --version / -h, --help | Version / help. |
khaelord#
khaelord start # foreground; detach with nohup / launchd / systemd
khaelord stop | status
khaelord goal add "<description>" [--type maintain|achieve|watch]
[--schedule "<cron>"|heartbeat] [--check "<cmd>"]
[--budget <usd>] [--runs <n>] [--escalation notify|draft-pr|auto-merge-if-verified]
khaelord goal list | pause <id> | resume <id>
khaelord approvals # pending asynchronous approvals
khaelord approve <id> | deny <id>
Full semantics: The daemon. The daemon reads
.khaelor/daemon/config.json (budget, activeHours, heartbeatMinutes, models, channels,
pricing) and exposes a JSON-line control socket at .khaelor/daemon/daemon.sock.
Environment#
ANTHROPIC_API_KEY | Required. Read from the environment on every start; never stored, never logged, rejected if found in config files. |
NO_COLOR | Full monochrome degradation — every state keeps a symbol or word. |
TERM, COLORTERM | Drive the truecolor → 256 → 16 → mono ladder (see --doctor-tui). |
Exit behavior#
--printexits 0 on a completed turn, 1 on failure, 2 on bad arguments — and writes an honest usage summary (real tokens) to stderr.- Interactive quit stops background processes, flushes and closes the session log. Ctrl+C twice force-quits; the log's torn-line recovery handles the rest on resume.
Previous← Configuration
NextArchitecture →