cc-router is an open-source model router and API gateway orchestrator developed by Finch Xu. Built with a Rust and Tauri architecture, it acts as an intelligent intermediary proxy designed to inspect, route, and manage LLM API traffic for terminal coding agents and AI development workflows. In day-to-day operation, cc-router runs locally to intercept API requests from CLI agents and tools. It allows developers to configure custom upstream model providers via YAML configuration, map virtual model aliases to designated provider targets, review detailed real-time request logs, and monitor token consumption and usage costs through a structured dashboard interface. What distinguishes cc-router from generic reverse proxies is its specialization for AI coding assistants. It provides out-of-the-box support for virtual model rewriting, extensible provider definitions, detailed session-level cost receipts, and cross-platform native binaries across macOS, Linux (x86_64 and ARM64 via AppImage and deb), and Windows. cc-router is free, open-source software distributed on GitHub with automated cross-platform releases and support for custom LLM provider extensions.
Real-Time Request Routing — Intercepts and dynamically redirects LLM requests across configured provider backends and custom endpoints. - Virtual Model Aliasing — Maps standardized model identifiers to specific upstream provider targets without changing client-side agent configurations. - Session Cost & Receipt Tracking — Generates detailed token usage summaries and cost receipts for coding sessions. - Request & Response Logging — Inspects full payload traces, latency, headers, and status codes for outbound AI agent queries. - Extensible Provider Schema — Allows adding new upstream model providers and API adapters through modular YAML configuration files. - Multi-Architecture Native Client — Powered by Rust and Tauri with native builds for Linux (x64/aarch64), Windows, and macOS.
Use cases
Use Case: Provider Switching and Model Aliasing Developers using CLI coding tools can map canonical model names to alternative API endpoints or secondary providers without altering client tool configuration files. cc-router transparently rewrites and dispatches the payload to the mapped provider target.
Use Case: Cost and Token Auditing for CLI Agents Engineers running intensive terminal agent sessions can monitor token volume and cost metrics in real time. The built-in receipts interface provides granular visibility into input/output consumption across individual agent runs.
Use Case: Inspecting and Debugging Agent Payloads Developers building custom agents or MCP tools can inspect exact JSON payloads, streaming responses, and latency metrics directly in the request log viewer to diagnose failure states.
Who it is for
cc-router is built for developers and engineering teams utilizing terminal-based coding agents and LLM APIs who require granular traffic routing, multi-provider switching, and local cost auditing. It is less suited for developers seeking a hosted cloud proxy or an out-of-the-box all-in-one terminal agent requiring no external model configuration.
Install guide
Installation Download the appropriate native binary for your operating system from the GitHub Releases page, or install the Linux package directly: bash # Download and install Debian/Ubuntu package (x86_64 or arm64) sudo dpkg -i cc-router_*_amd64.deb # Or run the AppImage on Linux chmod +x cc-router_*_amd64.AppImage ./cc-router_*_amd64.AppImage To build from source using Cargo and Node.js: bash git clone https://github.com/finch-xu/cc-router.git cd cc-router npm install npm run tauri build
First Run 1. Launch the cc-router application to initialize the local routing proxy server. 2. Open the Settings/Providers interface and enter your upstream provider API keys (e.g., Anthropic, OpenAI, or compatible endpoints). 3. Define any desired virtual model aliases and routing rules.
Example Session Point your terminal coding agent (such as Claude Code) to use the local cc-router proxy endpoint: bash # Export the proxy base URL to point to cc-router export ANTHROPIC_BASE_URL="http://127.0.0.1:8080/v1" # Execute your coding agent session claude All outbound LLM queries will now route through cc-router, logging requests and calculating token receipts in the application interface.
OpenHands — OpenHands (formerly OpenDevin) is an open-source autonomous AI software development agent and orchestration platform. It provides an extensible runtime environment…
Plandex — Plandex is an open-source terminal-based AI coding agent designed to handle complex, multi-file engineering tasks in large codebases. Created by…
Continue — Continue is an open-source AI code assistant and agent framework originally developed by the Continue team (continuedev) and recently acquired…
Cline — Cline is an open-source autonomous coding agent runtime maintained by Cline Bot Inc. and an active open-source community. Available as…
OpenCode — OpenCode is an open-source AI coding agent developed by Anomaly that operates across terminal environments, desktop applications, and IDE extensions.…
Vibe Kanban — Vibe Kanban, originally developed by Bloop AI, is an open-source orchestration harness and visual task board designed to manage and…