Skip to main content

Overview

Rusty supports three running modes to suit different workflows and environments.

TUI Mode (Default)

The default mode launches a full terminal UI built with Ratatui. This provides:
  • Streaming responses with real-time display
  • Interactive permission prompts
  • Slash command support with tab completion
  • Markdown rendering (bold, italic, code blocks, tables)
  • Status bar showing model, permission mode, and token usage
  • Scrollable message history
  • Session save on exit
rusty
rusty --preset openai --api-key sk-...

Keyboard Shortcuts

KeyAction
EnterSend message
Up/DownScroll history
TabAutocomplete slash commands
Ctrl+CCancel current operation
Ctrl+DExit

Headless Mode

Headless mode runs a single prompt and prints the response. No interactive UI is displayed. Useful for scripting, CI pipelines, and non-interactive workflows.
rusty --prompt "Explain the error handling in this codebase"
rusty --preset xiaomi --prompt "List all public API functions"
Options available in headless mode:
FlagDescription
--promptThe prompt to send (required, triggers headless mode)
--max-turnsMaximum agent loop iterations
--max-tokensMaximum tokens in the response
--permissionsPermission mode (use bypass for non-interactive)
The session is saved automatically after the response completes.

Stdin REPL Mode

Stdin mode provides an interactive line-by-line REPL without the TUI. Supports slash commands but does not have the full terminal UI rendering. Useful when the TUI is not available or when running in a simple terminal.
rusty --headless
Features:
  • Line-by-line input
  • Slash command support (/help, /model, /sessions, etc.)
  • Streaming text output
  • Session save on exit

Choosing a Mode

Use CaseRecommended Mode
Interactive coding sessionTUI
Scripting and automationHeadless
Simple terminal or SSH sessionStdin REPL
CI/CD pipelinesHeadless with --permissions bypass
Quick one-off questionHeadless
Long-running development workTUI with session resume