A beautiful, terminal-based AI coding agent with a modern dark theme UI.
- 🎨 Modern, fluid terminal UI with smooth animations
- 💬 Interactive chat interface
- 🛠️ Automated tool execution (file reading, writing, command execution)
- 📊 Real-time token usage statistics
- ⚡ Built-in TPM (Tokens Per Minute) rate limiting
- 🎯 Success detection for task completion
-
Copy
.env.exampleto.env:cp .env.example .env
-
Configure your environment variables in
.env:LLM_URL: Your Azure OpenAI endpointLLM_KEY: Your API keyLLM_MODEL: Model deployment namePROJECT_PATH: Path to the project you want to work on
-
Build and run:
cargo build --release cargo run
- Enter: Send message to AI
- Q / ESC / Ctrl+C: Quit application
- ↑ / ↓: Scroll through AI thoughts
- PgUp / PgDn: Fast scroll
- Type: Enter your message
The AI can use the following tools:
-
Read files:
read_file("path/to/file") -
Execute commands:
execute_command("cargo build") -
Modify files:
CHANGE: path/to/file <<<<<<< CURRENT old content ======= new content >>>>>>> NEW
Edit prompt.txt to customize the AI's behavior and instructions.
- main.rs: Application entry point and event loop
- app.rs: Application state and tool execution logic
- llm.rs: Azure OpenAI client with rate limiting
- tpm_limiter.rs: Token-per-minute rate limiter
- ui.rs: Terminal UI rendering with Ratatui
- Rust 1.70+
- Azure OpenAI API access (or compatible endpoint)
MIT