spb/khaelor Public
KHAELOR — a terminal-native autonomous engineering agent powered by Anthropic.
TypeScript 82.9%
HTML 14.9%
CSS 1.1%
JavaScript 0.7%
1<!doctype html>2<!--3KHAELOR4File: website/public/docs/cli.html5Description: Docs — Every khaelor and khaelord flag and subcommand, with environment variables and exit behavior.6Author: Simon-Pierre Boucher7Contact: contact@spboucher.ai8-->9<html lang="en">10<head>11<meta charset="utf-8">12<meta name="viewport" content="width=device-width, initial-scale=1">13<title>CLI reference — KHAELOR docs</title>14<meta name="description" content="Every khaelor and khaelord flag and subcommand, with environment variables and exit behavior.">15<link rel="stylesheet" href="/styles.css">16<script>17(function(){try{var t=localStorage.getItem("khaelor-theme");if(!t&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches)t="light";if(t==="light")document.documentElement.setAttribute("data-theme","light");}catch(e){}})();18</script>19<script defer src="/site.js"></script>20</head>21<body>2223<header class="site-header"><div class="inner">24 <a class="wordmark" href="/"><span class="glyph">❯</span><span class="g-ember">KHAELOR</span></a>25 <nav>26 <a href="/docs/getting-started.html">Docs</a>27 <a href="/#install">Install</a>28 <button id="theme-toggle" type="button" aria-label="Toggle color theme">light</button>29 </nav>30</div></header>3132<main class="page"><div class="docs-layout">3334<aside class="sidebar">35 <div class="group"><div class="group-title">Start</div>36 <a href="/docs/getting-started.html">Getting started</a>37 <a href="/docs/cookbook.html">Cookbook</a>38 </div>39 <div class="group"><div class="group-title">Using KHAELOR</div>40 <a href="/docs/usage.html">The TUI</a>41 <a href="/docs/commands.html">Commands & keyboard</a>42 <a href="/docs/tools.html">Tools</a>43 <a href="/docs/sessions.html">Sessions</a>44 </div>45 <div class="group"><div class="group-title">Autonomy</div>46 <a href="/docs/phases.html">Phase gates</a>47 <a href="/docs/verification.html">Verification</a>48 <a href="/docs/worktrees.html">Parallel worktrees</a>49 <a href="/docs/daemon.html">The daemon</a>50 </div>51 <div class="group"><div class="group-title">Intelligence</div>52 <a href="/docs/repograph.html">Semantic index</a>53 <a href="/docs/memory.html">Project memory</a>54 <a href="/docs/context.html">Context engine</a>55 <a href="/docs/fork-replay.html">Fork · replay · sdiff</a>56 </div>57 <div class="group"><div class="group-title">Control</div>58 <a href="/docs/permissions.html">Permissions</a>59 <a href="/docs/configuration.html">Configuration</a>60 <a href="/docs/cli.html">CLI reference</a>61 </div>62 <div class="group"><div class="group-title">Internals</div>63 <a href="/docs/architecture.html">Architecture</a>64 <a href="/docs/events.html">The event model</a>65 <a href="/docs/theming.html">Theming & terminal</a>66 </div>67 <div class="group"><div class="group-title">Help</div>68 <a href="/docs/faq.html">FAQ & troubleshooting</a>69 </div>70</aside>7172<article class="content">7374<h1>CLI reference</h1>75<p class="lead">Two binaries: <code>khaelor</code> (the interactive agent) and76<code>khaelord</code> (the autonomous daemon).</p>7778<h2 id="khaelor">khaelor<a class="anchor" href="#khaelor">#</a></h2>79<table>80 <tr><th>Flag</th><th>Meaning</th></tr>81 <tr><td><code>--model <id></code></td><td class="wrap">Anthropic model id for this run.</td></tr>82 <tr><td><code>--aux-model <id></code></td><td class="wrap">Cheaper model used for context compaction summaries.</td></tr>83 <tr><td><code>--thinking <mode></code></td><td class="wrap">off · adaptive · always.</td></tr>84 <tr><td><code>--max-output-tokens <n></code></td><td class="wrap">Output ceiling per model response.</td></tr>85 <tr><td><code>--gate <mode></code></td><td class="wrap">Phase-gate rigor: strict · auto (default) · off.</td></tr>86 <tr><td><code>-p, --print "<prompt>"</code></td><td class="wrap">Headless single turn: run, print the final answer, exit. Permission asks resolve to deny.</td></tr>87 <tr><td><code>--resume <session-id></code></td><td class="wrap">Resume a session (resume = exact replay of its log).</td></tr>88 <tr><td><code>--splash</code></td><td class="wrap">Show the full gradient-sweep splash (~600 ms, any key skips).</td></tr>89 <tr><td><code>--doctor-tui</code></td><td class="wrap">Print the detected terminal capabilities — colors, unicode, OSC 8/52 — with the reason for each, then exit. Attach it to display bug reports.</td></tr>90 <tr><td><code>--debug</code></td><td class="wrap">Developer logs to <code>~/.khaelor/logs/</code>. The TUI stays clean; keys are never logged.</td></tr>91 <tr><td><code>-v, --version</code> / <code>-h, --help</code></td><td class="wrap">Version / help.</td></tr>92</table>9394<h2 id="khaelord">khaelord<a class="anchor" href="#khaelord">#</a></h2>95<pre><code>khaelord start # foreground; detach with nohup / launchd / systemd96khaelord stop | status9798khaelord goal add "<description>" [--type maintain|achieve|watch]99 [--schedule "<cron>"|heartbeat] [--check "<cmd>"]100 [--budget <usd>] [--runs <n>] [--escalation notify|draft-pr|auto-merge-if-verified]101khaelord goal list | pause <id> | resume <id>102103khaelord approvals # pending asynchronous approvals104khaelord approve <id> | deny <id></code></pre>105<p>Full semantics: <a href="/docs/daemon.html">The daemon</a>. The daemon reads106<code>.khaelor/daemon/config.json</code> (budget, activeHours, heartbeatMinutes, models, channels,107pricing) and exposes a JSON-line control socket at <code>.khaelor/daemon/daemon.sock</code>.</p>108109<h2 id="env">Environment<a class="anchor" href="#env">#</a></h2>110<table>111 <tr><td><code>ANTHROPIC_API_KEY</code></td><td class="wrap">Required. Read from the environment on every start; never stored, never logged, rejected if found in config files.</td></tr>112 <tr><td><code>NO_COLOR</code></td><td class="wrap">Full monochrome degradation — every state keeps a symbol or word.</td></tr>113 <tr><td><code>TERM</code>, <code>COLORTERM</code></td><td class="wrap">Drive the truecolor → 256 → 16 → mono ladder (see <code>--doctor-tui</code>).</td></tr>114</table>115116<h2 id="exit">Exit behavior<a class="anchor" href="#exit">#</a></h2>117<ul>118 <li><code>--print</code> exits 0 on a completed turn, 1 on failure, 2 on bad arguments — and119 writes an honest usage summary (real tokens) to stderr.</li>120 <li>Interactive quit stops background processes, flushes and closes the session log.121 <kbd>Ctrl+C</kbd> twice force-quits; the log's torn-line recovery handles the rest on resume.</li>122</ul>123124<div class="pager">125 <div><span class="label">Previous</span><a href="/docs/configuration.html">← Configuration</a></div>126 <div class="next"><span class="label">Next</span><a href="/docs/architecture.html">Architecture →</a></div>127</div>128129</article>130</div></main>131132<footer class="site-footer"><div class="inner">133 <span>KHAELOR — Simon-Pierre Boucher · <a href="mailto:contact@spboucher.ai">contact@spboucher.ai</a></span>134 <span>Anthropic-powered · terminal-native by design</span>135</div></footer>136137</body>138</html>139