CLIProxyAPI
$ cliproxyapi Community Med RiskCLIProxyAPI turns local AI CLI subscriptions (Claude Code, Codex, Gemini CLI, etc.) into an OpenAI-, Anthropic-, and Gemini-compatible HTTP API server with multi-account load balancing. Configured via --config <config.yaml> alongside OAuth login flags (--codex-login, --codex-device-login).
brew install cliproxyapi cliproxyapi runs as an HTTP API proxy daemon exposing /v1/chat/completions and /v1/messages rather than an interactive CLI or MCP server.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Runs deterministically with --config <config.yaml>, but acts as a long-lived HTTP proxy daemon requiring interactive browser/device OAuth setup first.
cliproxyapi --config <config.yaml>,--codex-login,--codex-device-login
Supports local API key gating in config.yaml and loopback binding, though proxying consumer CLI OAuth subscriptions carries account ToS and local token-cache exposure risks.
- OAuth token files in
~/.cli-proxy-api/and provider subscription wrapping
Single Go binary via brew install cliproxyapi, Docker, AUR, and GitHub releases across macOS, Linux, and Windows.
- Homebrew formula
cliproxyapi, Docker, and release binaries
Exposes multiple coding CLI backends behind one unified OpenAI/Claude/Gemini HTTP endpoint with round-robin fallback.
- Unified local API endpoint with multi-account load balancing
Active community Go project (router-for-me/CLIProxyAPI) under MIT license.
router-for-me/CLIProxyAPIMIT repository
Documented at help.router-for-me.com and GitHub README covering YAML config and OAuth login flows.
- Docs site
help.router-for-me.comand GitHub README
Security, Auth & Guardrails
Stores upstream OAuth tokens in ~/.cli-proxy-api/ and reads gateway config/API keys from config.yaml (or /opt/homebrew/etc/cliproxyapi.conf).
MIT open-source proxy; routes requests through your existing AI CLI/API subscriptions.
# CLIProxyAPI Agent Rules - Run `cliproxyapi` as a background service (`brew services start cliproxyapi`) rather than blocking an agent shell turn. - Restrict `config.yaml` bind address to `127.0.0.1` and protect local `api-keys`.
Agent-Ready Command Recipes
Safe Read-Only Queries
cliproxyapi --help
Displays --config and provider OAuth login flags without starting the HTTP server.
Controlled Writes & Previews
cliproxyapi --config ~/.cli-proxy-api/config.yaml
Launches the local OpenAI/Claude/Gemini-compatible proxy gateway using explicit routing and auth settings.
Strengths for Agents
- + Unifies Codex, Claude, and Gemini CLI backends behind standard OpenAI/Anthropic/Gemini HTTP APIs.
- + Supports headless
--codex-device-loginas well as desktop browser OAuth.
Caveats & Pitfalls
- ! Wrapping consumer CLI OAuth sessions as an HTTP API may violate upstream provider Terms of Service.
- ! Runs as a blocking HTTP daemon; has no one-shot
--jsonCLI query commands.