Skip to content

Running Modes

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

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
  • Model registry picker via the sidebar (/settings)
  • Structured task tracking with --plan-with-tasks
Terminal window
rusty
rusty --preset openai --api-key sk-...
rusty --plan-with-tasks
KeyAction
EnterSend message
Up/DownScroll history
TabAutocomplete slash commands
Ctrl+CCancel current operation
Ctrl+DExit

Headless mode runs a single prompt and prints the response. No interactive UI is displayed. Useful for scripting, CI pipelines, and non-interactive workflows.

Terminal window
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 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.

Terminal window
rusty --headless

Features:

  • Line-by-line input
  • Slash command support (/help, /model, /sessions, etc.)
  • Streaming text output
  • Session save on exit
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
Planning and task trackingTUI with --plan-with-tasks