Skip to main content
Interactive mode is Pi’s default interface, providing a full terminal UI with an editor, commands, keyboard shortcuts, and visual feedback.

Interface Layout

The interface from top to bottom:
1

Startup Header

Shows shortcuts (/hotkeys for all), loaded AGENTS.md files, prompt templates, skills, and extensions
2

Messages

Your messages, assistant responses, tool calls and results, notifications, errors, and extension UI
3

Editor

Where you type; border color indicates thinking level
4

Footer

Working directory, session name, total token/cache usage, cost, context usage, current model
The editor can be temporarily replaced by other UI, like built-in /settings or custom UI from extensions. Extensions can also add:
  • Widgets above/below the editor
  • Status lines in the footer
  • Custom overlays
  • Custom headers

Editor Features

File References

Type @ to fuzzy-search project files:
The autocomplete shows matching files as you type. Selected files are included in your message context.

Path Completion

Press Tab to complete file and directory paths:

Multi-line Input

  • Shift+Enter - New line (Ctrl+Enter on Windows Terminal)
  • Enter - Submit message

Images

Paste from clipboard:
  • Ctrl+V to paste (Alt+V on Windows)
  • Supports PNG, JPEG, BMP formats
  • Automatic conversion to supported formats
Drag and drop:
  • Drag image files onto the terminal window
  • Works in terminals that support file drag-and-drop

Bash Commands

Run shell commands directly from the editor:
Runs command and sends output to LLM
Use !! for commands that produce large output or when you just want to run something without context pollution.

Standard Editing

Supports standard keybindings:
  • Ctrl+W - Delete word
  • Ctrl+U - Delete to start of line
  • Ctrl+K - Delete to end of line
  • Ctrl+A - Move to start of line
  • Ctrl+E - Move to end of line
  • Alt+Left/Right - Move by word
  • Ctrl+Z (in input) - Undo
  • Ctrl+Y - Redo
See the full list in the source at packages/tui/src/components/editor.ts.

Commands

Type / in the editor to trigger commands. Autocomplete shows available commands with descriptions.

Built-in Commands

Extension Commands

Extensions can register custom commands:
Extension commands appear in autocomplete alongside built-in commands.

Skill Commands

Skills register as /skill:name commands:
Toggle skill commands in /settings or settings.json:

Prompt Templates

Prompt templates expand when you type /templatename:
Usage:
Templates support arguments:

Keyboard Shortcuts

Press /hotkeys to see all shortcuts. Customize via ~/.pi/agent/keybindings.json.

Essential Shortcuts

Custom Keybindings

Create ~/.pi/agent/keybindings.json to customize:
Available actions:
  • App actions: interrupt, clear, exit, suspend, cycleThinkingLevel, cycleModelForward, cycleModelBackward, selectModel, expandTools, toggleThinking, externalEditor, followUp, dequeue, pasteImage, newSession, tree, fork, resume
  • Editor actions: See packages/tui documentation

Message Queue

Submit messages while the agent is working:
1

Steering Messages (Enter)

Delivered after current tool execution. Interrupts remaining tools.Use when you want to redirect the agent immediately:
2

Follow-up Messages (Alt+Enter)

Delivered only after agent finishes all work.Use when you want to add something for later:
3

Abort (Escape)

Cancels current operation and restores queued messages to editor.
4

Retrieve (Alt+Up)

Pulls queued messages back into the editor for editing.

Delivery Modes

Configure in /settings or settings.json:
Modes:
  • "one-at-a-time" (default) - Waits for response after each message
  • "all" - Delivers all queued messages at once
Transport:
  • "sse" - Server-Sent Events (default, more reliable)
  • "websocket" - WebSocket (lower latency when available)
  • "auto" - Let provider choose

Context Files

Pi automatically loads AGENTS.md (or CLAUDE.md) from:
  1. ~/.pi/agent/AGENTS.md (global)
  2. Parent directories (walking up from cwd)
  3. Current directory
All matching files are concatenated and included in the system prompt. Example AGENTS.md:

Custom System Prompt

Replace the default system prompt:
  • Global: ~/.pi/agent/SYSTEM.md
  • Project: .pi/SYSTEM.md
Append without replacing:
  • Global: ~/.pi/agent/APPEND_SYSTEM.md
  • Project: .pi/APPEND_SYSTEM.md

Terminal Setup

For best results: Recommended terminals:
  • iTerm2 (macOS)
  • Kitty (Linux/macOS)
  • WezTerm (cross-platform)
  • Windows Terminal (Windows)
  • VS Code integrated terminal
Enable 24-bit color:
Font recommendations:
  • Use a font with good Unicode support
  • Enable ligatures for better code display
  • Monospace fonts with clear distinction between characters

Shell Aliases

Useful aliases to add to your .bashrc or .zshrc:

Platform Notes

Windows

See docs/windows.md in the coding-agent package for Windows-specific setup.

Termux (Android)

See docs/termux.md in the coding-agent package for Android/Termux setup.

Next Steps

Sessions

Learn about branching, compaction, and tree navigation

Customization

Configure settings, keybindings, and appearance