Ultra-High-Performance Autonomous Coding Agent in Rust
Re-engineered from Claude Code's Architecture • Powered by Google Gemini 2.5 Pro/Flash • Multi-Provider Failover
RTX Code is an open-source, compiled, native autonomous coding agent built in Rust. It re-engineers the architectural capabilities of Anthropic's Claude Code (originally ~1,300 TypeScript files) into a blazing-fast, single standalone binary (rtx.exe) with zero runtime dependencies, instant startup (<15ms), and sub-50MB memory footprint.
Designed specifically with Google AI Pro subscribers in mind, RTX Code uses Google Gemini 2.5 Pro & Flash as its primary reasoning backbone, paired with an intelligent multi-provider account failover pool.
- ⚡ Blazing Fast Performance: Native compiled Rust binary (6.9 MB) replacing heavy Node.js runtimes and
node_modulesoverhead. - ⭐ Google Gemini Native: Full SSE streaming, tool-calling parity, and structured reasoning over Gemini 2.5 Flash (default) and Gemini 2.5 Pro.
- 🛡️ Smart Multi-Provider Failover Pool: Round-robin and quota-aware failover across Google Gemini, Anthropic Claude, OpenAI, Groq, and OpenRouter. If rate limits (429) hit, the router automatically falls back without losing context.
- 🔒 Sandboxed Execution: Strict path confinement, directory traversal protection, and isolated shell execution with automatic timeouts and buffer capping.
- 🧠 1M Token Context Compactor: Multi-tier compaction engine (truncate, semantic summarize, token budgeting) to preserve long-horizon coding tasks without overflowing context windows.
- 🔌 MCP (Model Context Protocol) Ready: Connect external tool servers via JSON-RPC 2.0 over Stdio and SSE/HTTP.
| Metric | Claude Code (TypeScript) | RTX Code (Rust) | Improvement |
|---|---|---|---|
| Startup Time | ~450ms – 1,200ms | < 15ms | ~50x Faster |
| Memory Usage (Idle) | ~180MB – 350MB (V8 engine) | ~18MB – 35MB | ~10x Less RAM |
| Distribution | npm + Node.js runtime + deps | Single 6.9MB Binary (rtx.exe) |
Zero Dependencies |
| Primary Model | Claude 3.5 Sonnet only | Gemini 2.5 Flash / Pro + Multi-pool | Multi-Provider Freedom |
| Concurrency | Single-threaded Event Loop | Tokio Multi-threaded Async Runtime | True Parallelism |
Open PowerShell and run:
irm https://raw.githubusercontent.com/PsProsen-Dev/rtx-code/main/install.ps1 | iexThis downloads rtx.exe, sets it up at ~/.rtx/bin, and adds it directly to your User PATH.
Download the pre-compiled standalone binary from GitHub Releases:
cargo install --git https://github.com/PsProsen-Dev/rtx-code.gitcurl -sSfL https://raw.githubusercontent.com/PsProsen-Dev/rtx-code/main/install.sh | bashPrerequisites: Rust 1.80+ and a C linker (MinGW-w64 or MSVC).
# Clone the repository
git clone https://github.com/PsProsen-Dev/rtx-code.git
cd rtx-code
# Build optimized release binary
cargo build --release
# The compiled binary is available at:
./target/release/rtx (Linux/macOS) or ./target/release/rtx.exe (Windows)RTX Code supports saving credentials safely in your local OS config directory (~/.config/rtx-code/accounts.json) or reading directly from environment variables.
.\rtx.exe auth add --provider gemini --key "YOUR_GEMINI_API_KEY" --name gemini-pro --tier pro --primary# Anthropic
.\rtx.exe auth add --provider anthropic --key "YOUR_ANTHROPIC_KEY" --tier pro
# OpenAI
.\rtx.exe auth add --provider openai --key "YOUR_OPENAI_KEY" --tier pro
# Groq (Ultra-low latency fallback)
.\rtx.exe auth add --provider groq --key "YOUR_GROQ_KEY" --tier pro.\rtx.exe auth list.\rtx.exe run "Analyze the project structure, run cargo check, and fix all compiler warnings"# Use Gemini 2.5 Pro for deep architectural tasks
.\rtx.exe run -m gemini-2.5-pro "Design a distributed lock manager in Rust"
# Use Anthropic Claude 3.5 Sonnet
.\rtx.exe run -p anthropic -m claude-3-5-sonnet-20241022 "Write property-based unit tests"RTX Code supports an NDJSON streaming event mode:
.\rtx.exe run --structured "Refactor auth.rs"┌─────────────────────────────────────────────────────────────┐
│ RTX CLI (Clap) │
└──────────────────────────────┬──────────────────────────────┘
│
┌──────────────┴──────────────┐
│ Coordinator (Agent FSM) │
└──────────────┬──────────────┘
│
┌─────────────────────┼─────────────────────┐
▼ ▼ ▼
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Smart Router │ │ Sandboxed Tools │ │ MCP Client │
│ (Gemini/Claude) │ │ (Bash/File/Grep)│ │ (JSON-RPC 2.0) │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Token Context Compactor │
└─────────────────────────────────────────────────────────────┘
This project is licensed under the MIT License. Dual licensing with Apache 2.0 is supported.
Crafted with ❤️ by Prosenjit Paul (aka Prosen) and the Open Source Community.