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/commands.html5Description: Every slash command with examples, the Ctrl+K universal palette, and the complete keyboard reference.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>Commands & keyboard — KHAELOR</title>14<meta name="description" content="All KHAELOR slash commands, the universal command palette, and the full keyboard reference.">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>KHAELOR</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 </div>38 <div class="group"><div class="group-title">Using KHAELOR</div>39 <a href="/docs/usage.html">The TUI</a>40 <a href="/docs/commands.html">Commands & keyboard</a>41 <a href="/docs/tools.html">Tools</a>42 <a href="/docs/sessions.html">Sessions</a>43 </div>44 <div class="group"><div class="group-title">Control</div>45 <a href="/docs/permissions.html">Permissions</a>46 <a href="/docs/configuration.html">Configuration</a>47 </div>48 <div class="group"><div class="group-title">Help</div>49 <a href="/docs/faq.html">FAQ & troubleshooting</a>50 </div>51</aside>5253<article class="content">5455<h1>Commands & keyboard</h1>56<p class="lead">Everything is reachable three ways: a slash command, the <kbd>Ctrl+K</kbd>57palette, or a direct key. You never have to memorize anything — the palette lists it all.</p>5859<h2 id="slash">The slash palette<a class="anchor" href="#slash">#</a></h2>60<p>Type <code>/</code> as the first character of the composer to open the slash palette.61Typing filters fuzzily; <kbd>↑</kbd>/<kbd>↓</kbd> navigate; <kbd>Enter</kbd> runs;62<kbd>Tab</kbd> completes without running; <kbd>Esc</kbd> closes.</p>63<pre class="term" data-no-copy><code> <span class="t-accent">❯</span> /se64 ┌─────────────────────────────────────────────────────┐65 <span class="t-b">/se</span>ssions <span class="t-dim">browse and resume sessions</span>66 /new <span class="t-dim">start a new session</span>67 /re<span class="t-b">s</span>um<span class="t-b">e</span> <span class="t-dim">resume the most recent session</span>68 └────────────────────────────────────────────────────┘69 <span class="t-dim">↑↓ navigate · Enter run · Esc close</span></code></pre>7071<h2 id="all-commands">All commands<a class="anchor" href="#all-commands">#</a></h2>7273<h3 id="cmd-model"><code>/model</code> — model selector</h3>74<p>Shows the current Anthropic model and configured alternatives; applies immediately to the75session and updates the status bar. Inside the panel, <kbd>t</kbd> cycles the thinking mode76(<code>off</code> / <code>adaptive</code> / <code>always</code>) and <kbd>o</kbd> cycles the77output token budget.</p>78<pre class="term" data-no-copy><code> ┌─ model ────────────────────────────────────────────┐79 <span class="t-dim">current claude-sonnet-4-5 thinking adaptive</span>80 <span class="t-dim">─────────────────────────────────────────────────</span>81 <span class="t-accent">❯</span> claude-sonnet-4-5 <span class="t-dim">default · fast</span>82 claude-opus-4-5 <span class="t-dim">deepest reasoning</span>83 claude-haiku-4-5 <span class="t-dim">cheapest · aux model</span>84 <span class="t-dim">─────────────────────────────────────────────────</span>85 <span class="t-dim">t thinking: adaptive · o output budget: 16000</span>86 └────────────────────────────────────────────────────┘87 <span class="t-dim">↑↓ select · Enter apply · t/o cycle · Esc close</span></code></pre>88<p>Model ids are never hard-coded — the list comes from your89<a href="/docs/configuration.html#model">configuration and aliases</a>. From the shell:90<code>khaelor --model <id></code>.</p>9192<h3 id="cmd-config"><code>/config</code> — configuration panel</h3>93<p>A keyboard-navigable view over the same settings the config files expose (the files stay94directly editable). <kbd>p</kbd> toggles whether an edit writes user scope95(<code>~/.khaelor/config.json</code>) or project scope (<code>.khaelor/config.json</code>) —96the target is always shown before writing. Secrets are never displayed: the API key row reads97<code>set via environment ✓</code>. See <a href="/docs/configuration.html">Configuration</a>.</p>9899<h3 id="cmd-permissions"><code>/permissions</code> — permission rules</h3>100<p>Lists every effective permission rule with its source (default, user, project, session),101shows which rule matched recent decisions, and supports deleting or reordering project rules.102It is the audit-friendly mirror of the config files. See103<a href="/docs/permissions.html">Permissions</a>.</p>104105<h3 id="cmd-context"><code>/context</code> — context inspector</h3>106<p>Shows exactly what occupies the model's context window — system prompt, project107instructions, conversation, tool observations, repository context, checkpoint, reserved output108— with real token counts, plus which files are materially represented and why. Press109<kbd>c</kbd> inside to compact immediately.</p>110<pre class="term" data-no-copy><code> ┌─ context · 41,382 / 200,000 tokens · 21% ───────────┐111 <span class="t-dim">system prompt 3,120</span>112 <span class="t-dim">project instructions 1,240</span>113 <span class="t-dim">conversation 24,988</span>114 <span class="t-dim">tool observations 9,414</span>115 <span class="t-dim">repository context 1,620</span>116 <span class="t-dim">checkpoint — (no compaction yet)</span>117 <span class="t-dim">reserved output 16,000</span>118 └────────────────────────────────────────────────────┘119 <span class="t-dim">Enter file detail · c compact now · Esc close</span></code></pre>120121<h3 id="cmd-sessions"><code>/sessions</code> — session picker</h3>122<p>Browse this project's sessions with titles, ages, real costs, and git branches.123<kbd>Enter</kbd> resumes, <kbd>n</kbd> starts new, <kbd>r</kbd> renames, <kbd>x</kbd> deletes,124<kbd>/</kbd> filters. See <a href="/docs/sessions.html">Sessions</a>.</p>125126<h3 id="cmd-resume"><code>/resume</code> — resume the most recent session</h3>127<p>Replays the most recent session's event log: the transcript reprints into scrollback,128file-state tracking is rebuilt, and even a permission prompt that was pending when you quit129reappears. Starting <code>khaelor</code> in a project with an interrupted session also hints:130<code>Interrupted session from 12 min ago · /resume to continue</code>.</p>131132<h3 id="cmd-new"><code>/new</code> — start a new session</h3>133<p>Begins a fresh session (new event log, fresh context) in the same project. The old session134remains in <code>/sessions</code>.</p>135136<h3 id="cmd-rename"><code>/rename</code> — rename the session</h3>137<p>Sets the session title shown in <code>/sessions</code>. Sessions otherwise receive a title138derived from your first request.</p>139140<h3 id="cmd-clear"><code>/clear</code> — clear the conversation</h3>141<p>Clears the visible conversation and the working context for a clean start while staying in142the same project. Use <code>/new</code> when you want the previous transcript preserved as its143own resumable session.</p>144145<h3 id="cmd-compact"><code>/compact</code> — compact the context now</h3>146<p>Manually triggers context compaction: the older conversation is distilled into a structured147checkpoint (objective, completed work, important files, decisions, failed attempts, running148processes, next steps) and raw evidence that still matters is preserved. KHAELOR also compacts149automatically under context pressure — <code>/compact</code> just does it on your schedule.150Inspect the resulting checkpoint in <code>/context</code>.</p>151152<h3 id="cmd-cost"><code>/cost</code> — session cost</h3>153<p>Token usage and dollars from <em>actual API usage metadata</em> — input, output, cache154writes, cache reads (with hit rate). If pricing for your configured model is unknown, the155dollar column honestly reads <code>n/a</code> rather than inventing an estimate.</p>156<pre class="term" data-no-copy><code> ┌─ cost · this session ─────────────────────────────┐157 <span class="t-dim">input tokens 182,455 $0.27</span>158 <span class="t-dim">output tokens 24,110 $0.18</span>159 <span class="t-dim">cache write 41,020 $0.08</span>160 <span class="t-dim">cache read 512,300 $0.08 (90% hit)</span>161 <span class="t-dim">─────────────────────────────────────────────</span>162 <span class="t-b">total $0.61</span>163 └────────────────────────────────────────────────────┘</code></pre>164165<h3 id="cmd-status"><code>/status</code> — session status</h3>166<p>A one-shot summary of the session: working directory, git branch and dirty state, model and167thinking mode, context utilization, cost so far, and running background processes.</p>168169<h3 id="cmd-diff"><code>/diff</code> — the diff viewer</h3>170<p id="diff-viewer">Opens the full-screen diff viewer (the one alternate-screen surface in171KHAELOR) showing the session's cumulative changes — only what KHAELOR changed, never your172pre-existing working-tree diff. Side-by-side on terminals wider than 120 columns, unified173below that, with syntax highlighting and per-file counts.</p>174<pre class="term" data-no-copy><code> <span class="t-b">/diff · 3 files · +64 −21</span> <span class="t-dim">2/3</span>175 <span class="t-dim">─────────────────────────────────────────────────────────────────</span>176 src/session/store.ts <span class="t-dim">+18 −6</span>177 <span class="t-accent">▸</span>src/context/engine.ts <span class="t-dim">+31 −12</span>178 src/tools/edit.ts <span class="t-dim">+15 −3</span>179 <span class="t-dim">────────────────────────────────────────────────────────────────</span>180 <span class="t-dim">↑↓/jk scroll · ]/[ next/prev file · Tab file list · u unified · q close</span></code></pre>181<p>With an empty composer, <kbd>d</kbd> is the quick version: it prints the unified diff of182the most recent edit inline, without leaving the conversation.</p>183184<h3 id="cmd-processes"><code>/processes</code> — background processes</h3>185<p>Everything running in the background — dev servers, watchers, adopted long commands:</p>186<pre class="term" data-no-copy><code> <span class="t-b">PROCESSES</span>187 <span class="t-ok">●</span> p3 npm run dev running 04:32188 <span class="t-ok">●</span> p4 pytest running 00:18189 <span class="t-dim">○ p1 npm test exited code 0</span>190 <span class="t-dim">↑↓ select · Enter tail output · s stop · Esc close</span></code></pre>191<p><kbd>Enter</kbd> prints the selected process's recent output into the conversation;192<kbd>s</kbd> stops it (SIGTERM, then SIGKILL after a grace period, whole process group).</p>193194<h3 id="cmd-help"><code>/help</code> — list commands</h3>195<p>Prints every registered command with its slash name, description, and bound key.</p>196197<h3 id="cmd-quit"><code>/quit</code> — exit</h3>198<p>Exits KHAELOR. The session is already persisted (it always is — every event is journaled as199it happens). Background processes are stopped on session end, with notice. <kbd>Ctrl+D</kbd>200on an empty composer does the same; <kbd>Ctrl+C</kbd> twice within one second also quits.</p>201202<h2 id="palette">The universal palette — <kbd>Ctrl+K</kbd><a class="anchor" href="#palette">#</a></h2>203<p><kbd>Ctrl+K</kbd> opens the universal command palette from anywhere. It is sourced from the204same command registry that powers keys and slash commands, so every action appears with its205slash form and live key binding:</p>206<pre class="term" data-no-copy><code> ┌────────────────────────────────────────────────────┐207 <span class="t-accent">❯</span> diff_208 <span class="t-dim">──────────────────────────────────────────────────</span>209 View diff <span class="t-dim">/diff d</span>210 Compact context <span class="t-dim">/compact</span>211 Show processes <span class="t-dim">/processes</span>212 └───────────────────────────────────────────────────┘213 <span class="t-dim">↑↓ navigate · Enter run · Esc close</span></code></pre>214215<h2 id="keyboard">Complete keyboard reference<a class="anchor" href="#keyboard">#</a></h2>216<p>Binding precedence: an open overlay captures keys first; then single-key actions (only when217the composer is empty); then composer bindings; then global bindings.</p>218219<h3 id="keys-global">Global</h3>220<table>221 <tr><th>Key</th><th>Action</th></tr>222 <tr><td><kbd>Esc</kbd></td><td class="wrap">Interrupt the agent run · else close the open overlay · else clear completion/selection</td></tr>223 <tr><td><kbd>Ctrl+K</kbd></td><td class="wrap">Universal command palette</td></tr>224 <tr><td><kbd>Ctrl+T</kbd></td><td class="wrap">Cycle live tool detail for the current turn (collapsed ↔ 12-line tail)</td></tr>225 <tr><td><kbd>Ctrl+C</kbd></td><td class="wrap">Clear the composer; pressed twice within 1 s, quits</td></tr>226 <tr><td><kbd>Ctrl+D</kbd></td><td class="wrap">Quit (empty composer only)</td></tr>227 <tr><td><kbd>Ctrl+L</kbd></td><td class="wrap">Repaint the live region (recover from external screen corruption)</td></tr>228 <tr><td><kbd>Ctrl+Z</kbd></td><td class="wrap">Suspend to the shell; restores cleanly on <code>fg</code></td></tr>229</table>230231<h3 id="keys-composer">Composer</h3>232<table>233 <tr><th>Key</th><th>Action</th></tr>234 <tr><td><kbd>Enter</kbd></td><td class="wrap">Submit (or queue as a steering message while the agent runs)</td></tr>235 <tr><td><kbd>Shift+Enter</kbd> / <kbd>Ctrl+J</kbd></td><td class="wrap">Insert newline (<kbd>Ctrl+J</kbd> works in every terminal; trailing <code>\</code> + <kbd>Enter</kbd> also continues)</td></tr>236 <tr><td><kbd>←</kbd> <kbd>→</kbd>, <kbd>Ctrl+B</kbd> <kbd>Ctrl+F</kbd></td><td class="wrap">Move by character</td></tr>237 <tr><td><kbd>Alt+←/→</kbd>, <kbd>Alt+B</kbd> <kbd>Alt+F</kbd></td><td class="wrap">Move by word</td></tr>238 <tr><td><kbd>Ctrl+A</kbd> / <kbd>Ctrl+E</kbd></td><td class="wrap">Line start / line end</td></tr>239 <tr><td><kbd>↑</kbd> / <kbd>↓</kbd></td><td class="wrap">Line up/down in a multiline buffer; prompt history at the buffer edges</td></tr>240 <tr><td><kbd>Ctrl+R</kbd></td><td class="wrap">Incremental history search</td></tr>241 <tr><td><kbd>Backspace</kbd> / <kbd>Ctrl+H</kbd></td><td class="wrap">Delete character back</td></tr>242 <tr><td><kbd>Ctrl+W</kbd> / <kbd>Alt+Backspace</kbd></td><td class="wrap">Delete word back</td></tr>243 <tr><td><kbd>Alt+D</kbd></td><td class="wrap">Delete word forward</td></tr>244 <tr><td><kbd>Ctrl+U</kbd></td><td class="wrap">Delete to line start (or discard the queued steering message when the composer is empty)</td></tr>245 <tr><td><kbd>Ctrl+_</kbd></td><td class="wrap">Undo</td></tr>246 <tr><td><kbd>Tab</kbd></td><td class="wrap">Accept the selected completion</td></tr>247 <tr><td><kbd>Ctrl+G</kbd></td><td class="wrap">Edit the buffer in <code>$EDITOR</code></td></tr>248 <tr><td><kbd>/</kbd> (first char)</td><td class="wrap">Slash palette</td></tr>249 <tr><td><kbd>@</kbd></td><td class="wrap">Fuzzy file-mention search</td></tr>250 <tr><td><kbd>!</kbd> (first char)</td><td class="wrap">Shell mode for one command</td></tr>251</table>252253<h3 id="keys-single">Single-key actions (composer empty)</h3>254<table>255 <tr><th>Key</th><th>Action</th></tr>256 <tr><td><kbd>d</kbd></td><td class="wrap">Print the diff of the most recent edit</td></tr>257 <tr><td><kbd>a</kbd></td><td class="wrap">After shell-mode output: add that output to the agent's context</td></tr>258</table>259260<h3 id="keys-overlays">Overlays and pickers (uniform)</h3>261<table>262 <tr><th>Key</th><th>Action</th></tr>263 <tr><td><kbd>↑</kbd>/<kbd>↓</kbd> (<kbd>Ctrl+P</kbd>/<kbd>Ctrl+N</kbd>)</td><td class="wrap">Navigate</td></tr>264 <tr><td>typing</td><td class="wrap">Fuzzy filter</td></tr>265 <tr><td><kbd>Enter</kbd></td><td class="wrap">Select / apply</td></tr>266 <tr><td><kbd>Tab</kbd></td><td class="wrap">Complete without executing (slash palette)</td></tr>267 <tr><td><kbd>Esc</kbd></td><td class="wrap">Close</td></tr>268</table>269270<h3 id="keys-permission">Permission panel</h3>271<table>272 <tr><th>Key</th><th>Action</th></tr>273 <tr><td><kbd>Enter</kbd></td><td class="wrap">Allow once</td></tr>274 <tr><td><kbd>A</kbd></td><td class="wrap">Always allow in this project (persists the shown pattern)</td></tr>275 <tr><td><kbd>Esc</kbd></td><td class="wrap">Deny (with an optional one-line reason)</td></tr>276 <tr><td><kbd>Tab</kbd></td><td class="wrap">Expand details: every capability request, matched rules, resolved paths</td></tr>277</table>278279<h3 id="keys-diff"><code>/diff</code> viewer (alternate screen)</h3>280<table>281 <tr><th>Key</th><th>Action</th></tr>282 <tr><td><kbd>↑↓</kbd> / <kbd>j</kbd> <kbd>k</kbd></td><td class="wrap">Scroll</td></tr>283 <tr><td><kbd>PgUp</kbd>/<kbd>PgDn</kbd>, <kbd>Ctrl+U</kbd>/<kbd>Ctrl+D</kbd></td><td class="wrap">Half-page scroll</td></tr>284 <tr><td><kbd>]</kbd> / <kbd>[</kbd></td><td class="wrap">Next / previous file</td></tr>285 <tr><td><kbd>Tab</kbd></td><td class="wrap">File list</td></tr>286 <tr><td><kbd>u</kbd></td><td class="wrap">Toggle unified / side-by-side</td></tr>287 <tr><td><kbd>g</kbd> / <kbd>G</kbd></td><td class="wrap">Top / bottom</td></tr>288 <tr><td><kbd>q</kbd> / <kbd>Esc</kbd></td><td class="wrap">Close, conversation untouched</td></tr>289</table>290291<div class="pager">292 <div><span class="label">Previous</span><a href="/docs/usage.html">← The TUI</a></div>293 <div class="next"><span class="label">Next</span><a href="/docs/tools.html">Tools →</a></div>294</div>295296</article>297</div></main>298299<footer class="site-footer"><div class="inner">300 <span>KHAELOR — Simon-Pierre Boucher · <a href="mailto:contact@spboucher.ai">contact@spboucher.ai</a></span>301 <span>Anthropic-powered · terminal-native by design</span>302</div></footer>303304</body>305</html>306