TUI

The TUI is a rich, Bubble Tea-powered interface with real-time streaming, tool cards, session management, and a live context usage progress bar in the status footer.


Keybindings

KeyAction
EnterSend message (or Steer the running agent)
Shift+EnterInsert newline
Ctrl+EnterQueue follow-up message (runs after agent finishes)
Ctrl+CAbort the current agent run and clear the input editor
EscCancel streaming / Close modal / Abort current turn
Ctrl+OToggle tool call output expansion
Ctrl+POpen model selection modal (cycling via --models flag)
↑/↓Navigate prompt history (if at start/end of editor) / Scroll viewport
F1Show help modal

Slash Commands

CommandDescription
/newStart a fresh session
/resume <id>Resume a session by ID or partial UUID (fuzzy search enabled)
/branch [idx]Create a new child session branching from a specific message index (defaults to last)
/forkDuplicate current session into a new independent session (no parent link)
/rebaseInteractive rebase: select specific messages to keep in a new session
/merge <id>Merge another session’s history into the current one with a synthesis turn
/tree [-g|-p]Open session tree modal. Flags: --global (-g) or --project (-p)
/import <path>Import a session from a JSONL file
/export <path>Export the current session to a JSONL file
/model <p/m>Switch model mid-conversation (e.g. /model anthropic/claude-sonnet-4-6)
/statsView session statistics and token usage
/configView and edit active configuration
/contextView detailed context window usage
/compactManually trigger a context compaction
/skill:<name> [args]Invoke a skill
/prompt:<name>Expand a prompt template into the editor
/exitQuit (alias: /quit)

Session Tree Modal (/tree)

KeyAction
↑/↓ / PgUp/PgDnNavigate the session list
EnterResume the selected session (or branch from it if it’s an interior node)
BCreate a new branch from the selected session
FCreate an independent fork of the selected session
RStart an interactive rebase from the selected session’s history
EscClose modal

Bang Commands

Bang commands execute a shell command and inject the output into the conversation:

!ls -la          # Execute shell command, paste output into editor
!!cat README.md  # Execute shell command, send output directly to agent
  • !cmd — pastes stdout into the editor so you can review before sending
  • !!cmd — sends stdout directly to the agent without review

At-File Attachments

Type @ in the input to fuzzy-search and attach file contents to your prompt:

Tell me what this does @src/agent/loop.go

The file content is embedded inline in the message sent to the agent.