Built as part of the CodeCrafters "Build Your Own Claude Code" Challenge.
A Rust CLI agent that takes a natural language prompt and uses an LLM to reason about and act on your codebase via an agent loop.
The agent repeatedly calls the model, executes any tool calls it requests, and feeds results back — until the model returns a final text response.
Available tools:
| Tool | Description |
|---|---|
Read |
Read a file from disk |
Write |
Write content to a file |
Bash |
Run a shell command and capture output |
OPENROUTER_API_KEY=<your-api-key> cargo run -- --prompt "Explain what src/main.rs does"OPENROUTER_BASE_URL defaults to https://openrouter.ai/api/v1 if not set.
- Rust (edition 2024)
- tokio — async runtime
- async-openai — OpenAI-compatible API client
- clap — CLI argument parsing (builder API)
- serde_json — JSON serialization