← Back to Leaderboard
Clich0821

lich0821/ccNexus

Go API gateway for Claude Code and Codex CLI with failover and protocol conversion

View on GitHub ↗
Engineering Health (Methodology)
A · 83/100
Maintenance Activity
● Updated 1mo ago
Latest Release
v5.4.0
Commercial License Check
MIT · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance26/35
Fork Adoption17/25
Release Cadence20/20
License Clarity20/20
DockerSelf-HostedAPI
Total Stars
★ 961
24h Growth
+0
7d Growth
+0
Forks
131

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

lich0821/ccNexus Star History (2025-10-23 - 2026-12-03) ALL-TIME STAR HISTORY (2025-10 – 2026-12) +960 in 406d · avg +2/day 1k 508 0 2025-10-23: ★ 12025-11-22: ★ 1332025-12-20: ★ 4312026-01-17: ★ 5842026-02-14: ★ 6482026-03-14: ★ 7192026-04-11: ★ 7692026-05-09: ★ 8022026-06-06: ★ 9182026-07-04: ★ 9332026-08-01: ★ 9462026-08-29: ★ 9522026-09-26: ★ 9562026-10-24: ★ 9612026-11-18: ★ 9612026-12-03: ★ 961 ★ 961 2025-10 2026-05 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

ccNexus is a Go HTTP gateway that sits between Claude Code or Codex CLI and upstream model APIs. Claude Code points to the gateway root; Codex CLI uses a provider base URL ending in /v1 and selects the responses or chat wire API. Each endpoint selects a request format converter. A configured endpoint model overrides the client’s model name; otherwise the original name is forwarded.

The source tree includes cmd/ and internal/. The module declares Go 1.24.0 with toolchain go1.24.3, and includes Wails v2.11.0 and modernc.org/sqlite. ccNexus offers a cross-platform desktop app and a headless HTTP server. WebDAV sync covers configuration and data. The gateway handles routing and API translation; model inference happens upstream.

Key Capabilities & Differentiators

When an endpoint fails, ccNexus switches to the next configured endpoint. Its converters cover Claude, OpenAI Chat, OpenAI Responses, and Gemini. Operators can filter and clone endpoint entries, and clients can query /v1/models, which serves cached results by default and supports on-demand refresh when enabled.

The Codex Token Pool imports access_token and refresh_token pairs in batches, rotates credentials, refreshes after a 401, and isolates invalid credentials. It tracks requests, errors, and token usage per credential. In v5.4.0, proxy changes corrected forwarding of OpenAI image generation and editing requests and added support for multi-megabyte SSE events.

Trade-offs & Limitations

Compared with connecting an OpenAI-compatible client directly to the OpenAI API, ccNexus adds protocol conversion, endpoint failover, and credential-level visibility, but also adds another service to configure and troubleshoot. Switching endpoints can help when one fails, but a converted request or a model-name override does not make providers interchangeable. Test the client features you rely on, notably streaming and any non-text requests, across each intended primary and fallback endpoint.

The MIT license permits self-hosting and commercial use subject to its notice requirements; upstream service terms still apply. A Token Pool puts multiple refresh credentials at the gateway, making credential and host access controls important. Before enabling WebDAV sync, verify what data is synchronized and who can access the destination.

Hardware & Deployment Guide

Run a desktop release on Windows, macOS, or Linux, or use the headless HTTP server via Docker; container setup is covered in docs/README_DOCKER.md. The default port is 3000, overridable with -port or CCNEXUS_PORT. If Basic Auth is enabled without a configured password, startup generates one and prints it to the log. Keep the service on a trusted network or put it behind a reverse proxy with TLS and access controls, and restrict access to startup logs.

Self-hosting moves the gateway onto your infrastructure, not the models: requests still require a reachable upstream, and the gateway itself does not need model VRAM. Start sizing around concurrent streams and payload sizes, especially large SSE events. v5.3.0 added headless Basic Auth, endpoint cloning, and the cached models API; v5.4.0 focused on proxy reliability and the management UI.

Endpoint failover: Switches to the next configured upstream when an endpoint fails.
Protocol conversion: Claude, OpenAI Chat, OpenAI Responses, and Gemini converters; optional endpoint model override.
Codex credentials: Batch import of access and refresh tokens, credential rotation, refresh after a 401, and isolation of invalid credentials.
Usage tracking: Per-credential request, error, and token counts, plus dashboard views for today, yesterday, this week, and this month.
Model discovery: Cached /v1/models endpoint with on-demand refresh when enabled.
Proxy fixes in v5.4.0: Corrected OpenAI image generation and editing request forwarding and added support for multi-megabyte SSE events.
Best For

Developers and teams that want Claude Code or Codex CLI to use multiple upstreams through one self-hosted endpoint, with failover and centralized usage tracking.

Skip If

One upstream already meets your needs, you need offline model execution, or you require exact provider-native behavior across all features without testing the conversion layer.

Reviewed on 2026-12-02 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

DockerSelf-HostedAPI
{
  "env": {
    "ANTHROPIC_AUTH_TOKEN": "随便写,不重要",
    "ANTHROPIC_BASE_URL": "http://127.0.0.1:3000",
    "CLAUDE_CODE_MAX_OUTPUT_TOKENS": "64000", // 有些模型可能不支持 64k
  }
  // 其他配置
}

Comparison vs. Top LLMs & Inference Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
ccNexus ★961—GoMITGo API gateway for Claude Code and Codex CLI with failover and protocol conversi
freellmapi62k+2.6kTypeScriptMITSelf-hosted LLM gateway for routing across free tiers and custom endpoints
bifrost10.2k+125GoApache-2.0Self-hosted Go gateway for routing and governing multi-provider LLM traffic
gpt-load7.2k+6GoMITSelf-hosted Go gateway for routing LLM traffic across providers and credentials

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/lich0821/ccNexus.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

lich0821/ccNexus Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about ccNexus

How do I connect Claude Code or Codex CLI to an upstream provider?

Point Claude Code’s ANTHROPIC_BASE_URL at the gateway root, or set the Codex CLI provider base_url to the gateway’s /v1 path. Choose the converter for the upstream API and set an endpoint model only if you want it to override the model requested by the client.

Does ccNexus need a GPU, and what drives its resource usage?

The Go gateway forwards requests rather than running model weights, so it has no model VRAM requirement of its own. Size the host for concurrent streams, payload sizes, and transport and conversion overhead. A local inference backend, if used, has separate hardware requirements.

Can a company self-host ccNexus under its MIT license?

The MIT license permits commercial use and self-hosting, subject to retaining the required notices when distributing the software. It does not grant rights to upstream APIs or credentials. Check provider terms for your token use and routing setup, and control access to tokens, startup logs, and any synchronized data.

When is ccNexus preferable to connecting directly to the OpenAI API?

Choose ccNexus if endpoint failover, protocol conversion, or per-credential usage tracking solves a concrete problem. For an OpenAI-compatible client using one OpenAI API upstream, a direct connection avoids an additional service and conversion layer. ccNexus routes requests; it does not replace the upstream inference service.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining lich0821/ccNexus? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature lich0821/ccNexus on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare