A unified wrapper for Gemini CLI Proxy, Claude Code API, and ChatMock.
This tool provides a single entry point to run and manage these local coding agent proxies, exposing them via a unified API endpoint.
- Python 3.13+
- Node.js & npm (Required for Gemini CLI Proxy)
You can run coder2api directly without installing it using uvx (part of uv):
uvx coder2api serveOr using pipx:
pipx run coder2api serveThis command will:
- Download the package.
- Automatically install Node.js dependencies for the Gemini proxy (if missing).
- Start all services and the unified proxy.
If you prefer to install it globally:
pipx install coder2api
coder2api serveuv tool install coder2api
coder2api serveThe primary command starts all backend services and the proxy:
coder2api serveThis starts:
- Gemini CLI Proxy on port
3001 - ChatMock on port
3002 - Claude Code API on port
3003 - Unified Proxy on port
8069
You can access the APIs via the proxy:
- Codex (ChatMock):
http://localhost:8069/codex/v1/... - Claude Code:
http://localhost:8069/cc/v1/... - Gemini:
http://localhost:8069/gemini/openai/...orhttp://localhost:8069/gemini/anthropic/...
You can also use the CLI wrappers for individual tools:
ChatMock (Codex):
coder2api codex --help
coder2api codex loginClaude Code API:
coder2api ccGemini CLI Proxy:
coder2api gemini -- --helpIf you want to contribute or run from source:
- Clone the repository.
- Install dependencies using
uv:
uv sync- Run using
uv run:
uv run coder2api serveLogs for the background services are written to the logs/ directory in the working directory where you run the command.
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.