Skip to content
PsProsen-DevPublic

About

⚡ Ultra-High-Performance Autonomous Coding Agent in Rust re-engineered from Claude Code architecture with Google Gemini 2.5 Pro/Flash backbone

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

⚡ RTX Code

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

Rust Version Gemini AI Binary Size License Platform


🌟 Overview

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.


🚀 Key Features

  • ⚡ Blazing Fast Performance: Native compiled Rust binary (6.9 MB) replacing heavy Node.js runtimes and node_modules overhead.
  • ⭐ 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.

📊 Benchmark & Comparison

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

📦 Installation & Quickstart

1. Windows One-Click Install (PowerShell)

Open PowerShell and run:

irm https://raw.githubusercontent.com/PsProsen-Dev/rtx-code/main/install.ps1 | iex

This downloads rtx.exe, sets it up at ~/.rtx/bin, and adds it directly to your User PATH.

2. Direct Release Download

Download the pre-compiled standalone binary from GitHub Releases:

3. Via Cargo (Any Platform)

cargo install --git https://github.com/PsProsen-Dev/rtx-code.git

4. Linux / macOS Quick Install

curl -sSfL https://raw.githubusercontent.com/PsProsen-Dev/rtx-code/main/install.sh | bash

5. Building from Source

Prerequisites: 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)

🔑 Authentication & Provider Setup

RTX Code supports saving credentials safely in your local OS config directory (~/.config/rtx-code/accounts.json) or reading directly from environment variables.

Adding your Primary Google Gemini Key:

.\rtx.exe auth add --provider gemini --key "YOUR_GEMINI_API_KEY" --name gemini-pro --tier pro --primary

Adding Failover Providers (Optional):

# 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

List Configured Accounts:

.\rtx.exe auth list

💻 Usage

Run an Autonomous Coding Task

.\rtx.exe run "Analyze the project structure, run cargo check, and fix all compiler warnings"

Model Override

# 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"

Structured Output for IDE / Scripting Integration

RTX Code supports an NDJSON streaming event mode:

.\rtx.exe run --structured "Refactor auth.rs"

🏗️ Architecture

┌─────────────────────────────────────────────────────────────┐
│                       RTX CLI (Clap)                        │
└──────────────────────────────┬──────────────────────────────┘
                               │
                ┌──────────────┴──────────────┐
                │   Coordinator (Agent FSM)   │
                └──────────────┬──────────────┘
                               │
         ┌─────────────────────┼─────────────────────┐
         ▼                     ▼                     ▼
┌─────────────────┐   ┌─────────────────┐   ┌─────────────────┐
│ Smart Router    │   │ Sandboxed Tools │   │ MCP Client      │
│ (Gemini/Claude) │   │ (Bash/File/Grep)│   │ (JSON-RPC 2.0)  │
└─────────────────┘   └─────────────────┘   └─────────────────┘
         │
         ▼
┌─────────────────────────────────────────────────────────────┐
│                  Token Context Compactor                    │
└─────────────────────────────────────────────────────────────┘

📄 License

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.

About

⚡ Ultra-High-Performance Autonomous Coding Agent in Rust re-engineered from Claude Code architecture with Google Gemini 2.5 Pro/Flash backbone

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages