An AI-powered terminal coding assistant, written in Rust. A Rust fork of OpenCode.
- TUI Interface: Beautiful terminal UI built with ratatui
- Multiple AI Providers: Supports Anthropic (Claude) and OpenAI (GPT)
- Streaming Responses: Real-time streaming of AI responses
- Session Management: Save and resume chat sessions
- Developer Tools: File reading, shell execution, and git integration
- Syntax Highlighting: Markdown rendering with code block support
- Configurable: TOML-based configuration
cargo install --path .Or build from source:
cargo build --release
./target/release/openrustSet your API key via environment variable:
export ANTHROPIC_API_KEY=your-key-here
# or
export OPENAI_API_KEY=your-key-hereConfig file is at ~/.config/openrust/config.toml (auto-created on first run).
To switch providers:
openrust --provider openai
openrust --provider anthropicTo use a specific model:
openrust --provider anthropic --model claude-opus-4-6
openrust --provider openai --model gpt-4o| Key | Action |
|---|---|
Enter |
Send message |
Ctrl+Q |
Quit |
Ctrl+N |
New session |
Ctrl+S |
Save session |
Ctrl+L |
View session list |
F1 / ? |
Toggle help |
Up/Down |
Scroll messages |
PgUp/PgDn |
Scroll page |
Left/Right |
Move cursor |
Home/End |
Jump cursor |
# List sessions
openrust sessions
# Show config
openrust config
# Clear all sessions
openrust clear
# Open with specific working directory
openrust --dir /path/to/projectsrc/
├── main.rs # Entry point, TUI event loop
├── app.rs # Application state
├── config.rs # Configuration management
├── session.rs # Session persistence
├── ai/
│ ├── mod.rs # Provider trait
│ ├── anthropic.rs # Anthropic/Claude integration
│ ├── openai.rs # OpenAI integration
│ └── types.rs # Shared types
├── tools/
│ ├── mod.rs # Tool aggregator
│ ├── file.rs # File operations
│ ├── shell.rs # Shell execution
│ └── git.rs # Git operations
└── ui/
├── mod.rs # UI router
├── chat.rs # Main chat view
├── help.rs # Help overlay
├── sessions.rs # Session list view
└── theme.rs # Color themes
MIT