Commands
Built-in interactive TUI slash commands and default keybindings.
Slash Commands
Section titled “Slash Commands”| Command | Aliases | Description |
|---|---|---|
/clear |
None | Clear transcript and conversation history |
/clear-screen [N] |
None | Redraw the terminal and hide earlier turns, keeping the most recent N turns (default 2) and history |
/compact [focus] |
None | Compact older conversation history into a summary, optionally focusing on specific details (see Compaction) |
/copy [code [n]] |
None | Copy the last assistant message or a fenced code block to the system clipboard via OSC 521 |
/export [path] |
None | Export the conversation transcript to a Markdown file (defaults to ox-export-<session-or-timestamp>.md)2 |
/fork [turn] |
None | Fork the active session, optionally up to a zero-based user turn index |
/help |
None | Show available slash commands and keybindings |
/palette |
None | Open searchable command palette |
/quit |
/exit, /q |
Exit the TUI |
/resume [id] |
None | Open fullscreen searchable session picker to browse, preview, resume (Enter), fork (Ctrl+F), rename (Ctrl+R), or delete (Ctrl+D) sessions, or switch directly to id |
/rewind [--no-prefill] |
None | Open fullscreen transcript rewind mode to jump between user turns (←/→), scroll (↑/↓), expand tool calls (Ctrl+O), rewind (Enter), or fork (f). Prefills composer unless --no-prefill |
/stats [day|week|month|all] |
None | Show token usage statistics for the selected period (default all, overridable by plugins) |
Active plugins can register additional slash commands and override /stats (other core built-ins cannot be shadowed). When a plugin advertises stats, /stats dispatches asynchronously to that plugin via command/invoke, falling back to the built-in summary when no plugin provides stats.
Command Palette
Section titled “Command Palette”Open the searchable command palette with /palette (or Ctrl+Shift+P / Cmd+Shift+P) to filter commands and inspect their keybinding hints.
Transcript Rewind
Section titled “Transcript Rewind”Open fullscreen transcript rewind mode with /rewind [--no-prefill] (or Esc Esc) to jump between user turns (←/→), scroll (↑/↓), expand tool calls (Ctrl+O), rewind (Enter), or fork (f).
Input Triggers and Local Shell
Section titled “Input Triggers and Local Shell”Trigger prefixes are configurable under [tui.input.triggers] in config.toml (see TUI).
| Prefix | Scope | Behavior |
|---|---|---|
/cmd |
Line-start | Execute a slash command (completion popup shows [cmd] candidates) |
!cmd |
Line-start | Execute sh -c <cmd> locally in cwd (bounded to 64 KiB) and inject output into context when shell_inject_default = true |
!!cmd |
Line-start | Execute sh -c <cmd> locally and invert shell_inject_default (local-only by default) |
@path |
Inline | Workspace file completion (skips .git, target, and node_modules) |
$name |
Inline | Skill completion and submit-time expansion for known user_invocable skills (unknown tokens like $HOME stay untouched) |
When skill and command share the same prefix (for example skill = "/" alongside command = "/"), line-start completion merges [cmd] and [skill] candidates into one popup (commands win exact name collisions), while mid-prompt completion shows only [skill] candidates.
While the non-blocking completion popup is open, Up and Down navigate candidates, Tab or Enter inserts the highlighted candidate, and Esc dismisses the popup.
Keybindings
Section titled “Keybindings”| Key | Action Name | Description |
|---|---|---|
Left |
move-cursor-left |
Move cursor left by one character |
Right |
move-cursor-right |
Move cursor right by one character |
Ctrl+Left, Alt+Left |
move-word-left |
Move cursor left by one word |
Ctrl+Right, Alt+Right |
move-word-right |
Move cursor right by one word |
Home, Ctrl+A, Cmd+Left |
move-line-start |
Move cursor to the start of the current line |
End, Ctrl+E, Cmd+Right |
move-line-end |
Move cursor to the end of the current line |
Ctrl+Home, Cmd+Up |
move-cursor-home |
Move cursor to the start of the input buffer |
Ctrl+End, Cmd+Down |
move-cursor-end |
Move cursor to the end of the input buffer |
Backspace |
backspace |
Delete character before the cursor |
Delete |
delete |
Delete character at the cursor |
Ctrl+Backspace, Ctrl+W, Alt+Backspace |
kill-word-left |
Kill the word before the cursor |
Ctrl+Delete, Alt+Delete |
kill-word-right |
Kill the word after the cursor |
Ctrl+U, Cmd+Backspace |
kill-to-line-start |
Kill text to the start of the current line |
Ctrl+K |
kill-to-line-end |
Kill text to the end of the current line |
Ctrl+Y |
yank |
Yank the most recently killed text at the cursor |
Ctrl+P |
history-prev |
Navigate to the previous prompt in session history |
Ctrl+N |
history-next |
Navigate to the next prompt in session history |
Ctrl+R |
reverse-search |
Open interactive reverse search over session prompt history |
Enter |
submit |
Submit prompt or slash command (or queue steering when the agent is busy) |
Ctrl+Enter |
steer-interrupt |
Interrupt the active turn and inject the current input as steering |
Shift+Enter, Ctrl+J, Alt+Enter |
insert-newline |
Insert a literal newline in the input buffer |
Up |
scroll-up |
Scroll transcript up by 1 line |
Down |
scroll-down |
Scroll transcript down by 1 line |
PageUp |
page-up |
Scroll transcript up by one page |
PageDown |
page-down |
Scroll transcript down by one page |
Ctrl+Shift+P, Cmd+Shift+P |
open-palette |
Open searchable command palette (same as /palette) |
Ctrl+G, Ctrl+X Ctrl+E |
open-editor |
Open the current input buffer in $VISUAL / $EDITOR (default vi) |
Esc Esc |
open-rewind |
Open fullscreen transcript rewind mode (same as /rewind) |
Ctrl+L |
clear-screen |
Redraw the terminal and hide earlier turns while keeping recent turns and history (same as /clear-screen) |
Ctrl+O |
toggle-expand |
Toggle expanded tool call details |
Esc |
dismiss-overlay |
Dismiss active overlay or completion popup |
Ctrl+C |
quit |
Quit |
Ctrl+D |
quit-if-empty |
Delete character at cursor, or quit when the input buffer is empty |
Customizing Keybindings
Section titled “Customizing Keybindings”Override default keybindings under [keybindings] in config.toml by mapping any kebab-case action name from the table above to a single key string, a list of key strings, or [] to unbind the action. Each configured action replaces all default bindings for that action.
[keybindings]quit = "Ctrl+Q"open-palette = ["Ctrl+Shift+P", "Cmd+Shift+P"]open-editor = "Ctrl+X Ctrl+E"toggle-expand = []Separate multi-chord sequences with spaces. Modifier names are case-insensitive and accept Ctrl (Control), Alt (Opt, Option, Meta), Shift, and Cmd (Super, Command, Win).
Footnotes
Section titled “Footnotes”-
OSC 52 clipboard writes work out of the box in Ghostty, Kitty, WezTerm, Alacritty, and VS Code local terminals, require enabling clipboard write in iTerm2 and
allow-passthrough onintmux, and are unsupported in Apple Terminal.app. ↩ -
/export [path]writes user messages, assistant replies, collapsible<details>tool calls, and local shell commands as GitHub Flavored Markdown, skipping thinking blocks, system notices, and rendered help or stats panels. Relative paths resolve against the active working directory, and missing parent directories are created automatically. ↩