Interactive TUI

rupi interactive provides a high-efficiency terminal interface inspired by Pi, built with a terminal-native semantic renderer and crossterm. The renderer stays separate from runtime state and does not start optional providers.

rupi interactive --config config.json

rupi Interactive TUI


TUI Architecture & Layout

The terminal interface consists of three distinct visual zones:

  1. Transcript View (Scrollable History):
    • Displays attributed conversation turns, model reasoning with explicit provenance labels, and tool execution summaries.
    • Distinct semantic styling for operations, paths, diffs, and failures.
  2. Bottom Statusline:
    • Single-line persistent snapshot:
      qwen3.8-flash-next · idle · turn 1 · ctx 262,144
      
    • Segment roles: active model name, activity (idle vs working), current turn counter, and context budget.
    • Automatically collapses or truncates cleanly on narrow terminal windows down to a minimum column width without wrapping or crashing.
  3. Editor Buffer:
    • Multi-line text entry with cursor navigation, word-wrapping, and slash-command completions.

Keybindings & Shortcuts

Key / ShortcutAction
EnterSubmit current prompt to the agent
Ctrl-J / Ctrl-MInsert newline in multi-line buffer
Left / RightMove cursor left/right by character
Up / DownMove cursor up/down across lines in buffer
Home / EndJump to start / end of current line
Backspace / DeleteDelete character before / under cursor
Ctrl-WDelete word backwards
Ctrl-UClear line backwards to cursor
TabCycle slash-command and prompt-template completions
Ctrl-CCancel an in-flight turn; on an empty idle draft, exit
Ctrl-D / /exitExit interactive session

Semantic Visual Hierarchy

rupi avoids distracting, decorative UI chrome in favor of high-signal semantic color coding:

  • Reasoning: Dim italic or bordered block tagged with explicit provenance (e.g. [native reasoning]).
  • Tool Requests: Cyan action indicator showing tool name (read, write, edit, exec) and canonicalized path.
  • Mutating Operations: Highlighted warning badge for mutating operations (write, edit, exec).
  • Success / Failure: Green checkmarks for successful tool completions; prominent red callouts for failures and refusals.
  • Monochrome Support: Full fidelity in non-color terminals without escape sequence bleeding.

Built-in slash commands

  • /help — show commands.
  • /compact [notes] — summarize earlier context at an idle boundary.
  • /compact-phase [phase] [--force] — compact at a semantic phase boundary.
  • /checkpoints — list durable checkpoint capsules.
  • /failover and /switch-back — manually change between configured models.
  • /mcp [list|enable <name>|disable <name>] — inspect or lazily activate MCP servers.
  • /quit or /exit — end the session.