SuperAPIAI Directory

ccg-router

github.com · AI coding

Local Go daemon proxying Claude Code (Anthropic-compatible `/v1/messages`) and Codex CLI (OpenAI-compatible `/v1/chat/completions`) through one port, with a per-request SQLite usage ledger and three routing strategies (prefer-cheaper, prefer-capable, round-robin). No hosted control plane; provider k

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux

About this tool

Purpose: ccg-router is a local routing daemon that lets Claude Code and Codex CLI connect to the same local port at the same time, handling Anthropic-compatible /v1/messages and OpenAI-compatible /v1/chat/completions requests respectively, and logging each request to a local SQLite ledger.

Main capabilities: provides both OpenAI-compatible and Anthropic-compatible proxies on the same port; supports three routing strategies: prefer-cheaper, prefer-capable, and round-robin; a local SQLite usage ledger records request metadata; a read-only local dashboard is available at /ui/; both protocols support streaming passthrough; provides a Prometheus-compatible /metrics endpoint; supports querying the ledger from the terminal, such as ccg-router ledger summary --since 7d and ccg-router ledger recent -n 20; optional AES-256-GCM encryption at rest for the ledger, with the commands ccg-router ledger encrypt|decrypt.

How to use: can be installed via Homebrew, the release installer, Go, or Docker. After starting, access http://127.0.0.1:17180/ui/。Claude Code sends Anthropic-compatible requests to 127.0.0.1:17180, and Codex CLI sends OpenAI-compatible requests to the same daemon. Provider keys are stored in ~/.config/ccg-router/config.toml.

Use cases: dual-CLI workflows that use Claude Code and Codex CLI at the same time; wanting to record the usage of each request locally without a hosted control panel; wanting to switch routing strategies by workload with a single configuration.

Limitations: if you only use Claude Code, the official materials suggest considering the more mature claude-code-router. Routing introduces a small amount of latency, but benchmarks show no measurable difference compared with a direct connection in a loopback test environment; the actual overhead mainly comes from upstream network RTT. Some features (such as a hosted preset registry and advanced dashboard analytics) are listed as future plans in the materials and are not currently available.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools