Commands & keyboard
Everything is reachable three ways: a slash command, the Ctrl+K palette, or a direct key. You never have to memorize anything — the palette lists it all.
The slash palette#
Type / as the first character of the composer to open the slash palette.
Typing filters fuzzily; ↑/↓ navigate; Enter runs;
Tab completes without running; Esc closes.
❯ /se
┌─────────────────────────────────────────────────────┐
/sessions browse and resume sessions
/new start a new session
/resume resume the most recent session
└────────────────────────────────────────────────────┘
↑↓ navigate · Enter run · Esc close
All commands#
/model — model selector
Shows the current Anthropic model and configured alternatives; applies immediately to the
session and updates the status bar. Inside the panel, t cycles the thinking mode
(off / adaptive / always) and o cycles the
output token budget.
┌─ model ────────────────────────────────────────────┐
current claude-sonnet-4-5 thinking adaptive
─────────────────────────────────────────────────
❯ claude-sonnet-4-5 default · fast
claude-opus-4-5 deepest reasoning
claude-haiku-4-5 cheapest · aux model
─────────────────────────────────────────────────
t thinking: adaptive · o output budget: 16000
└────────────────────────────────────────────────────┘
↑↓ select · Enter apply · t/o cycle · Esc close
Model ids are never hard-coded — the list comes from your
configuration and aliases. From the shell:
khaelor --model <id>.
/config — configuration panel
A keyboard-navigable view over the same settings the config files expose (the files stay
directly editable). p toggles whether an edit writes user scope
(~/.khaelor/config.json) or project scope (.khaelor/config.json) —
the target is always shown before writing. Secrets are never displayed: the API key row reads
set via environment ✓. See Configuration.
/permissions — permission rules
Lists every effective permission rule with its source (default, user, project, session), shows which rule matched recent decisions, and supports deleting or reordering project rules. It is the audit-friendly mirror of the config files. See Permissions.
/context — context inspector
Shows exactly what occupies the model's context window — system prompt, project instructions, conversation, tool observations, repository context, checkpoint, reserved output — with real token counts, plus which files are materially represented and why. Press c inside to compact immediately.
┌─ context · 41,382 / 200,000 tokens · 21% ───────────┐
system prompt 3,120
project instructions 1,240
conversation 24,988
tool observations 9,414
repository context 1,620
checkpoint — (no compaction yet)
reserved output 16,000
└────────────────────────────────────────────────────┘
Enter file detail · c compact now · Esc close
/sessions — session picker
Browse this project's sessions with titles, ages, real costs, and git branches. Enter resumes, n starts new, r renames, x deletes, / filters. See Sessions.
/resume — resume the most recent session
Replays the most recent session's event log: the transcript reprints into scrollback,
file-state tracking is rebuilt, and even a permission prompt that was pending when you quit
reappears. Starting khaelor in a project with an interrupted session also hints:
Interrupted session from 12 min ago · /resume to continue.
/new — start a new session
Begins a fresh session (new event log, fresh context) in the same project. The old session
remains in /sessions.
/rename — rename the session
Sets the session title shown in /sessions. Sessions otherwise receive a title
derived from your first request.
/clear — clear the conversation
Clears the visible conversation and the working context for a clean start while staying in
the same project. Use /new when you want the previous transcript preserved as its
own resumable session.
/compact — compact the context now
Manually triggers context compaction: the older conversation is distilled into a structured
checkpoint (objective, completed work, important files, decisions, failed attempts, running
processes, next steps) and raw evidence that still matters is preserved. KHAELOR also compacts
automatically under context pressure — /compact just does it on your schedule.
Inspect the resulting checkpoint in /context.
/cost — session cost
Token usage and dollars from actual API usage metadata — input, output, cache
writes, cache reads (with hit rate). If pricing for your configured model is unknown, the
dollar column honestly reads n/a rather than inventing an estimate.
┌─ cost · this session ─────────────────────────────┐
input tokens 182,455 $0.27
output tokens 24,110 $0.18
cache write 41,020 $0.08
cache read 512,300 $0.08 (90% hit)
─────────────────────────────────────────────
total $0.61
└────────────────────────────────────────────────────┘
/status — session status
A one-shot summary of the session: working directory, git branch and dirty state, model and thinking mode, context utilization, cost so far, and running background processes.
Autonomy & audit commands (v2)
| Command | What it does |
|---|---|
/phase | Show the current phase (understand / design / implement) and force a transition — logged as a user override. See Phase gates. |
/verify | Run the project's verify checks now (typecheck, tests, lint) and record the real results. |
/fork | Branch this session at a checkpoint. See Fork, replay, sdiff. |
/replay | Re-run a session's user turns with the current model, sandboxed in a worktree. |
/sdiff | Structured diff between two session runs. |
/memory | The auto-maintained project memory with per-entry provenance. |
/spawn | Run a subtask in an isolated git worktree with attenuated capabilities. |
/tasks | The subtask board: phase, diff stats, verify state per task. |
/merge | Supervised --no-ff merge of a finished subtask branch; conflicts abort cleanly. |
/goals | Daemon goals and status. See The daemon. |
/diff — the diff viewer
Opens the full-screen diff viewer (the one alternate-screen surface in KHAELOR) showing the session's cumulative changes — only what KHAELOR changed, never your pre-existing working-tree diff. Side-by-side on terminals wider than 120 columns, unified below that, with syntax highlighting and per-file counts.
/diff · 3 files · +64 −21 2/3
─────────────────────────────────────────────────────────────────
src/session/store.ts +18 −6
▸src/context/engine.ts +31 −12
src/tools/edit.ts +15 −3
────────────────────────────────────────────────────────────────
↑↓/jk scroll · ]/[ next/prev file · Tab file list · u unified · q close
With an empty composer, d is the quick version: it prints the unified diff of the most recent edit inline, without leaving the conversation.
/processes — background processes
Everything running in the background — dev servers, watchers, adopted long commands:
PROCESSES
● p3 npm run dev running 04:32
● p4 pytest running 00:18
○ p1 npm test exited code 0
↑↓ select · Enter tail output · s stop · Esc close
Enter prints the selected process's recent output into the conversation; s stops it (SIGTERM, then SIGKILL after a grace period, whole process group).
/help — list commands
Prints every registered command with its slash name, description, and bound key.
/quit — exit
Exits KHAELOR. The session is already persisted (it always is — every event is journaled as it happens). Background processes are stopped on session end, with notice. Ctrl+D on an empty composer does the same; Ctrl+C twice within one second also quits.
The universal palette — Ctrl+K#
Ctrl+K opens the universal command palette from anywhere. It is sourced from the same command registry that powers keys and slash commands, so every action appears with its slash form and live key binding:
┌────────────────────────────────────────────────────┐
❯ diff_
──────────────────────────────────────────────────
View diff /diff d
Compact context /compact
Show processes /processes
└───────────────────────────────────────────────────┘
↑↓ navigate · Enter run · Esc close
Complete keyboard reference#
Binding precedence: an open overlay captures keys first; then single-key actions (only when the composer is empty); then composer bindings; then global bindings.
Global
| Key | Action |
|---|---|
| Esc | Interrupt the agent run · else close the open overlay · else clear completion/selection |
| Ctrl+K | Universal command palette |
| Ctrl+T | Cycle live tool detail for the current turn (collapsed ↔ 12-line tail) |
| Ctrl+C | Clear the composer; pressed twice within 1 s, quits |
| Ctrl+D | Quit (empty composer only) |
| Ctrl+L | Repaint the live region (recover from external screen corruption) |
| Ctrl+Z | Suspend to the shell; restores cleanly on fg |
Composer
| Key | Action |
|---|---|
| Enter | Submit (or queue as a steering message while the agent runs) |
| Shift+Enter / Ctrl+J | Insert newline (Ctrl+J works in every terminal; trailing \ + Enter also continues) |
| ← →, Ctrl+B Ctrl+F | Move by character |
| Alt+←/→, Alt+B Alt+F | Move by word |
| Ctrl+A / Ctrl+E | Line start / line end |
| ↑ / ↓ | Line up/down in a multiline buffer; prompt history at the buffer edges |
| Ctrl+R | Incremental history search |
| Backspace / Ctrl+H | Delete character back |
| Ctrl+W / Alt+Backspace | Delete word back |
| Alt+D | Delete word forward |
| Ctrl+U | Delete to line start (or discard the queued steering message when the composer is empty) |
| Ctrl+_ | Undo |
| Tab | Accept the selected completion |
| Ctrl+G | Edit the buffer in $EDITOR |
| / (first char) | Slash palette |
| @ | Fuzzy file-mention search |
| ! (first char) | Shell mode for one command |
Single-key actions (composer empty)
| Key | Action |
|---|---|
| d | Print the diff of the most recent edit |
| a | After shell-mode output: add that output to the agent's context |
Overlays and pickers (uniform)
| Key | Action |
|---|---|
| ↑/↓ (Ctrl+P/Ctrl+N) | Navigate |
| typing | Fuzzy filter |
| Enter | Select / apply |
| Tab | Complete without executing (slash palette) |
| Esc | Close |
Permission panel
| Key | Action |
|---|---|
| Enter | Allow once |
| A | Always allow in this project (persists the shown pattern) |
| Esc | Deny (with an optional one-line reason) |
| Tab | Expand details: every capability request, matched rules, resolved paths |
/diff viewer (alternate screen)
| Key | Action |
|---|---|
| ↑↓ / j k | Scroll |
| PgUp/PgDn, Ctrl+U/Ctrl+D | Half-page scroll |
| ] / [ | Next / previous file |
| Tab | File list |
| u | Toggle unified / side-by-side |
| g / G | Top / bottom |
| q / Esc | Close, conversation untouched |