Claude Code model router

Commandcode API Proxy

Bring your CommandCode Go subscription to OpenCode, Claude Code, and more.

Install

Install
npx commandcode-api-proxy

Found in the project README. Check it for setup steps after installing.

From source
git clone https://github.com/thaolaptrinh/commandcode-api-proxy.git

From the README

Command Code API Proxy

OpenAI-compatible API proxy for Command Code.
Use your Command Code subscription from any OpenAI-compatible client — OpenCode, Claude Code, or plain curl.

Why?

Command Code exposes two API surfaces:

This proxy talks /alpha/generate upstream and standard OpenAI downstream — so your existing plan works from any tool.

Run the proxy

On first run, the proxy prompts for your Command Code API key (get it from
https://commandcode.ai/settings). Other ways to provide it are in
Authentication.

Authentication

Provide your API key via --api-key, the CC_API_KEY env var, or save it
with auth login (stored at ~/.config/commandcode-api-proxy/auth.json).

CLI auth commands
From source, replace commandcode-api-proxy with npm run auth --
(e.g. npm run auth -- login).

CLI options

Equivalent env vars (lower priority than CLI flags):

Security: the proxy forwards your paid Command Code key upstream and
accepts any auth token from clients (proxy-managed), so it is designed for
localhost use (HOST=127.0.0.1). Do not bind it to 0.0.0.0 on an
untrusted network without restricting CORS_ORIGIN and putting your own auth
in front.

Endpoints

All endpoints accept any auth token (use proxy-managed) — the proxy injects
your real Command Code key upstream.

Client configuration

OpenCode

Run setup to auto-generate the provider config at ~/.config/opencode/opencode.json:

All CC models are listed directly — pick the one you want from the model selector.

Or add a commandcode provider manually — point baseURL at the proxy and
use any model ID from the Model aliases table:

Claude Code

Claude Code only offers three tiers — sonnet, opus, haiku. The setup
maps each tier to a Command Code model via env vars in claude-settings.json:

If a settings file already exists, re-run…
Read the full README on GitHub

Details

Language
TypeScript
License
MIT
Last updated
9 September 2026

FAQ

What is Commandcode API Proxy?

Bring your CommandCode Go subscription to OpenCode, Claude Code, and more. It is a model router for Claude Code, from thaolaptrinh/commandcode-api-proxy on GitHub.

How do I install Commandcode API Proxy?

Run npx commandcode-api-proxy, then follow the setup in the README.

Is Commandcode API Proxy popular?

thaolaptrinh/commandcode-api-proxy has 36 GitHub stars and 8 forks. It was last updated on 9 September 2026.

More model routers & proxies

Browse the most popular Claude Code mods, all model routers & proxies, or the skills and MCP server directories.