ccNexus CLI

An HTTP gateway for Claude Code and Codex switches API endpoints on failure and converts requests between model formats

  • 973 ★ on the repository
  • Last commit
  • MIT
CLI

Broad access

Why this level

  • The gateway receives model keys and request contents
  • Unrestricted public routes can let others consume the connected API
  • The Codex pool uses subscription credentials and may trigger provider restrictions
All reasons and checks

lich0821/ccnexus

Install

Manual install

docker compose up -d --build

The Docker server guide’s first command builds and starts the container. Run it from cmd/server in a prepared source checkout; the dashboard is at localhost:3021/ui/. We did not run it.

Access and checks

How we review

Broad accessThe tool can change data, run commands or handle secrets.

  • The gateway receives model keys and request contents
  • Unrestricted public routes can let others consume the connected API
  • The Codex pool uses subscription credentials and may trigger provider restrictions

This is third-party code. Review the repository files before installing.

What it does

ccNexus accepts coding-agent requests and forwards them to a configured model API. If one endpoint fails, the gateway can try another. It converts requests between Anthropic, OpenAI and Gemini formats for the chosen provider. The gateway can run as a headless server, including through Docker. The web UI manages API addresses and keys, connection tests and usage statistics. An endpoint-level model setting overrides the model requested by the client. Claude Code connects through `ANTHROPIC_BASE_URL`; Codex uses a provider definition in `config.toml`. A separate pool supports Codex credentials with token refresh.

Who it is for. For developers who need one address connecting Claude Code or Codex to several authorized model APIs.

Good fit when

  • One API is intermittently unavailable and you need a fallback
  • An agent needs a compatible request format when using another model provider
  • You want to compare endpoint errors and usage in a shared dashboard
  • Several clients need the same set of fallback model APIs

Not a fit when

  • One stable API already works directly in your client
  • You cannot trust the gateway with keys and request contents
  • You need every feature of the original model to survive API conversion unchanged

Example request

Prepare ccNexus for my two model APIs. Show the Claude Code settings and check which routes remain accessible without Basic Auth.

Limitations

Run the server through Docker or build it with Go; the Compose example maps container port 3000 to host port 3021. Replace the demonstration API endpoint with your own address and key after startup. Basic Auth protects only the dashboard: model API routes, /health and /stats remain public, so external access needs separate TLS and network restrictions. A credential pool grants no extra provider rights and does not remove restrictions on account use.

How to disable. Restore the client’s previous API address or provider. Run `docker compose down` in `ccNexus/cmd/server`. Preserve needed settings and statistics first; separately deleting the SQLite volume destroys them. Revoke exposed keys with the model provider.

FAQ

How do I start the ccNexus server?

Clone the repository, enter `ccNexus/cmd/server` and run `docker compose up -d --build`. Open `http://localhost:3021/ui/` and add your actual API endpoints.

Which address should Claude Code use?

For the server example, set `ANTHROPIC_BASE_URL` to `http://127.0.0.1:3021`. Match your Compose host port; the desktop version defaults to 3000.

Where is server configuration stored?

In SQLite. `CCNEXUS_DB_PATH` sets the location; the container example uses `/data/ccnexus.db`. Restrict access to the file and its backups.

Can it use Codex subscription tokens?

Yes, the code includes a separate Codex pool. For its requests, the gateway imitates some Codex client HTTP headers. This does not establish provider authorization for that access method; the account may be restricted.

Can I change the server port?

Yes. Use `-port` with the binary or `CCNEXUS_PORT` for the service. Update the container port mapping and client address together.

Does installation include model access?

No. Model usage is billed separately; MIT covers the gateway code.

Discussion

No questions or reviews yet.

CLI tools

ZCF

ZCF - Zero-Config Code Flow

A CLI that sets up Claude Code and Codex in one run: workflows, agents, skills, MCP and a provider choice

CLIExtended access6.1KRepository stars
Russian stack

A kit for porting a Claude Code workflow to OpenAI Codex CLI for multi-tenant PHP/Bitrix24-Marketplace projects

WorkflowExtended access

Claude Codex Settings

claude-codex-settings

A marketplace of dozens of plugins for Claude Code, Codex, Cursor and Gemini: skills, commands, hooks, subagents and configs for many tasks

PluginExtended access1.2KRepository stars
Needs a VPN

An MCP server that sends tasks to Codex CLI from Claude Code and Cursor: code review via @ refs, a sandbox, patch edits, ideas

MCP serverBroad access176Repository stars
Editors’ pick

OpenAI's official plugin: Codex reviews of your changes and task delegation to Codex from inside a Claude Code session

PluginExtended access34.9KRepository stars
Official

An MCP server on your machine that lets ChatGPT and Claude edit code, run tests and check Git in a local repository

MCP serverBroad access2.5KRepository stars

README in short

Desktop builds cover Windows, macOS and Linux. The headless version includes web administration, and a separate model-list API supports caching.

README badge

Report a problem

Foxx AIccNexus
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.