Terminal UI (TUI)
A full-screen, interactive terminal interface — the default experience for OpenAnalyst CLI.
Overview
The TUI is OpenAnalyst's default mode. It provides a rich, interactive experience with multiple panels, real-time streaming, and vim-style keybindings — all inside your terminal.
# Launch TUI (default)
openanalyst
# Disable TUI for classic REPL
openanalyst --no-tui
Layout
The TUI is organized into distinct panels:
Chat Panel
The main area displaying the conversation. Scrollable message history with real-time streaming deltas, syntax-highlighted code blocks, and inline tool call cards showing file diffs.
Sidebar (5 Sections)
Interactive right panel with 5 navigable sections: Agents (running & available project agents), Files (touched files with read/edit/create indicators), Plans (plan status tracking), Routing (per-category model selection from all configured providers), and Activity (token usage, tool calls, elapsed time, permission mode). Navigate with Tab to focus, j/k to select, Enter to activate.
Status Bar
Bottom bar showing: animated spinner during generation, elapsed time, input/output token counts, current model name, and agent phase indicator.
Input Box
Text input with vim-mode support (with built-in vim engine), slash command autocomplete, and input history navigation. Right-side badges show: permission mode (when not Default), active agent (purple badge), and git branch (blue badge). Border color changes with permission level.
Permission Dialog
Modal overlay that appears when a tool requires higher permissions. Approve once, deny, or always-allow for the session.
Startup Banner
On launch, the TUI displays a startup banner with:
- OA block-letter logo in blue/turquoise theme
- Logged-in account and provider information
- Current model and permission mode
- Session ID for resume capability
Keybindings
Global (from any mode)
| Key | Action |
|---|---|
| Enter | Send message |
| Shift+Enter | Newline in input |
| Ctrl+C | Cancel running agent (1st press) / Quit (2nd press) |
| Ctrl+P | Cycle permission mode: Default → Plan → Accept Edits → Danger |
| Ctrl+B | Run current input as background task |
| Ctrl+L | Clear chat |
| Ctrl+S | Submit (always, regardless of mode) |
| Up / Down | Input history navigation |
| PageUp / PageDown | Scroll chat (works from any mode) |
| Ctrl+Home / Ctrl+End | Jump to top / bottom of chat |
| Mouse wheel | Scroll chat or sidebar (position-aware) |
| Space | Start voice recording (when input empty) |
Sidebar Navigation
| Key | Action |
|---|---|
| Tab | Focus sidebar (from input) / Cycle section (when in sidebar) |
| Shift+Tab | Focus sidebar / Previous section |
| j / k | Navigate items within section |
| Enter | Select agent / Cycle model in Routing / Expand file or plan |
| Esc | Return to input |
| F2 | Show+focus / Focus / Hide sidebar (smart toggle) |
| Ctrl+\ | Toggle sidebar visibility |
Scroll Mode (vim-like)
Press Esc from input to enter scroll mode:
| Key | Action |
|---|---|
| j / k | Scroll down / up and navigate messages |
| G | Jump to bottom |
| g | Jump to top |
| Enter | Expand/collapse tool call card |
| / | Exit scroll mode and start typing a slash command |
| i / Esc | Return to input mode |
Autocomplete
| Key | Action |
|---|---|
| Tab / Down | Next suggestion |
| Shift+Tab / Up | Previous suggestion |
| Enter | Accept suggestion |
| Esc | Dismiss autocomplete |
~/.openanalyst/keybindings.json. See Configuration for details.
Input Box
The input box displays context-aware badges on the right side of the border:
- Permission mode badge — Shows when not Default (Plan=yellow, Accept Edits=green, Danger=red)
- Agent badge — Purple badge when a project agent is selected from the sidebar
- Git branch badge — Blue badge showing the current branch (e.g.,
main)
Model Routing
The sidebar Routing section lets you assign specific models to each task category. Press Enter on a routing row to cycle through all models from your configured providers.
- explore — File reading, listing, searching (defaults to fast model)
- research — Planning, architecture, analysis (defaults to balanced model)
- code — Complex coding, multi-step reasoning (defaults to capable model)
- write — Documentation, content generation (defaults to balanced model)
Available models are auto-detected from your API keys: ANTHROPIC_API_KEY, OPENAI_API_KEY, XAI_API_KEY, GEMINI_API_KEY, OPENROUTER_API_KEY, BEDROCK_API_KEY.
Slash Command Autocomplete
Type / in the input box to see a dropdown of available slash commands. Continue typing to filter. Press Tab to accept a suggestion.
Inline Tool Call Cards
When the agent executes tools (file edits, bash commands, web searches), the results appear as styled cards in the chat panel:
- Edit cards — Show rich diffs with added/removed lines highlighted
- Bash cards — Display command and output with syntax highlighting
- Search cards — Show matching files and line excerpts
- Web cards — Display fetched content summaries
Voice Input
Use voice input to dictate prompts:
/voice
Starts recording from your microphone. Speak your prompt, and it's transcribed and sent as a message.
Agent Panel
When sub-agents are spawned, the TUI shows real-time lifecycle events:
- Agent spawn events with parent-child relationships
- Status transitions: Pending → Running → Completed/Failed
- Streaming output from each agent
- Elapsed time and token usage per agent
REPL Fallback
If your terminal doesn't support the full TUI, or you prefer a simpler interface:
openanalyst --no-tui
This gives you a classic line-by-line REPL with streaming markdown output, ANSI colors, and all the same slash commands.