cligate
Health Pass
- License — License: AGPL-3.0
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Community trust — 12 GitHub stars
Code Warn
- process.env — Environment variable access in electron-main.cjs
- fs module — File system access in electron-main.cjs
- network request — Outbound network request in public/resources/app.js
Permissions Pass
- Permissions — No dangerous permissions requested
This tool acts as a multi-protocol AI API proxy server, allowing users to unify, manage, and route multiple accounts and API keys across CLIs like Claude Code, Codex CLI, and Gemini CLI through a single local dashboard.
Security Assessment
The overall risk is rated as Medium. As a proxy server designed to handle authentication and OAuth tokens, the tool inherently processes highly sensitive data like your API keys and account credentials. There are no hardcoded secrets, but code scanners flagged environment variable access and filesystem operations within the main Electron process. Outbound network requests were also detected in the application logic. These operations are expected for an account pooling proxy (reading configurations, saving tokens, and routing web traffic), but given the extreme sensitivity of the data being routed, users should be fully aware that all their AI traffic and credentials pass through this local application.
Quality Assessment
The project is actively maintained, with its last code push occurring today. It uses the standard AGPL-3.0 license and includes clear documentation. Community trust is currently very low; the repository has only 12 stars, indicating that it has not yet been broadly reviewed or tested by the open-source community.
Verdict
Use with caution — the tool functions as designed, but its handling of sensitive API keys and credentials warrants a thorough code review before deploying it in any critical or production-adjacent environment.
Multi-protocol AI proxy server for Claude Code, Codex CLI, Gemini CLI & OpenClaw. Account pooling, API key management, free model routing, and visual dashboard.
CliGate

A multi-protocol AI API proxy server with account pooling, API key management, and a visual dashboard.
Use Claude Code, Codex CLI, Gemini CLI, and OpenClaw through a unified local proxy — with multi-account rotation, intelligent routing, free model routing, usage analytics, and one-click configuration.
Features
Multi-CLI Proxy Support
- Claude Code — Proxies Anthropic Messages API (
/v1/messages) with streaming - Codex CLI — Proxies OpenAI Responses API (
/v1/responses), Chat Completions (/v1/chat/completions), and Codex Internal API (/backend-api/codex/responses) - Gemini CLI — Proxies Gemini API (
/v1beta/models/*) with one-click patch - OpenClaw — Custom provider injection via
anthropic-messagesoropenai-completions
Account & Key Management
- ChatGPT Account Pool — OAuth login, multi-account rotation (sticky / round-robin / random), auto token refresh, per-account quota tracking
- Claude Account Pool — OAuth PKCE login, token refresh with source writeback to Claude Code credentials
- Antigravity Account Pool — Google OAuth login for enterprise models, automatic model discovery and project management
- API Key Pool — Support for OpenAI, Azure OpenAI, Anthropic, Google Gemini, Vertex AI, MiniMax, Moonshot, ZhipuAI keys with automatic failover and load balancing
- Key Validation — One-click connectivity test for each API key
- Smart Token Refresh — Only refreshes when tokens are about to expire (< 5 min), syncs back to source CLI tools
Intelligent Routing
- Priority Mode — Choose between Account Pool First or API Key First when both are available
- Routing Mode — Automatic routing or manual per-app credential assignments
- App Routing — Bind each app (Claude Code, Codex, Gemini CLI, OpenClaw) to a specific ChatGPT account, Claude account, or API key
- Model Mapping — Customize which upstream model each provider resolves to
- Free Model Routing — Routes
claude-haikurequests to free models (DeepSeek, Qwen, MiniMax, etc.) via Kilo AI — no API key needed
Analytics & Monitoring
- Usage & Costs — Per-account, per-model, per-provider usage and cost statistics with daily/monthly breakdown
- Request Logs — Full request/response logging with date and provider filtering, error-only view
- Real-time Log Stream — Live SSE log stream for debugging
- Pricing Registry — View and customize per-provider, per-model pricing with manual overrides
Web Dashboard
- Dashboard — Quick status metrics (total/available accounts, expired tokens, default plan), quick test buttons, Claude Code usage example
- Chat UI — Interactive chat interface with source selector (ChatGPT, Claude, API keys), model selection, system prompt, and chat history
- Account Management — Tabbed interface for ChatGPT, Claude, and Antigravity accounts with add/remove/enable/disable/switch
- API Key Management — Add, test, edit, disable API keys with provider-specific fields (Azure deployment name/API version, Vertex project ID/location)
- Tool Installer — Detect and install/update Node.js, Claude Code, Codex CLI, Gemini CLI, OpenClaw — auto-detects OS, shows version status, checks for updates
- Resources Catalog — Curated directory of free and trial LLM API resources with provider details, limits, and compatibility info
- One-click CLI Configuration — Configure Claude Code, Codex CLI, Gemini CLI, OpenClaw with a single button
- i18n — English and Chinese interface
- Dark/Light Theme — Toggle between dark and light mode
Screenshots
| Dashboard | Chat UI |
|---|---|
![]() |
![]() |
| Account Management | API Key Management |
|---|---|
![]() |
![]() |
| Settings & App Routing | Usage & Costs |
|---|---|
![]() |
![]() |
| Request Logs | Pricing Registry |
|---|---|
![]() |
![]() |
| Tool Installer | Resources Catalog |
|---|---|
![]() |
![]() |
Demo

Architecture
┌─────────────┐ ┌───────────┐ ┌────────────┐ ┌──────────┐
│ Claude Code │ │ Codex CLI │ │ Gemini CLI │ │ OpenClaw │
└──────┬──────┘ └─────┬─────┘ └──────┬─────┘ └────┬─────┘
│ │ │ │
└───────────────┼───────────────┼──────────────┘
▼
┌─────────────────────┐
│ CliGate │
│ localhost:8081 │
│ │
│ ┌───────────────┐ │
│ │ Protocol │ │
│ │ Translation │ │
│ └───────┬───────┘ │
│ │ │
│ ┌───────▼───────┐ │
│ │ Account Pool │ │
│ │ & Key Router │ │
│ └───────┬───────┘ │
└──────────┼──────────┘
│
┌───────┬───────┼───────┬───────┐
▼ ▼ ▼ ▼ ▼
┌────────┐┌────────┐┌────────┐┌────────┐┌────────┐
│Anthropic││ OpenAI ││Google ││Vertex ││Kilo AI │
│ API ││ API ││Gemini ││ AI ││ (Free) │
└────────┘└────────┘└────────┘└────────┘└────────┘
Quick Start
Option 1: npx (No install)
npx cligate@latest start
Option 2: Global install
npm install -g cligate
cligate start
Option 3: Desktop App (Electron)
Download the latest release from Releases.
Setup
1. Start the server
cligate start
Dashboard opens at http://localhost:8081
2. Add accounts or API keys
Web Dashboard (recommended):
- Open http://localhost:8081 → Accounts tab
- Click Add Account → Login with ChatGPT / Claude / Google (Antigravity)
- Or go to API Keys tab → Add API Key with your OpenAI, Azure, Gemini, Vertex AI, or other provider keys
- Accounts are automatically saved and tokens are auto-refreshed
CLI:
cligate accounts add # Opens browser
cligate accounts add --no-browser # Headless/VM
3. Configure your CLI tool
Click the one-click configure button in the Dashboard or Settings tab, or manually:
Claude Code:
export ANTHROPIC_BASE_URL=http://localhost:8081
export ANTHROPIC_API_KEY=any-key
claude
Codex CLI:
# ~/.codex/config.toml
chatgpt_base_url = "http://localhost:8081/backend-api/"
openai_base_url = "http://localhost:8081"
Gemini CLI: Use the one-click patch button in the dashboard.
OpenClaw: Use the one-click configure button, or add manually to ~/.openclaw/openclaw.json:
{
"models": {
"providers": {
"proxypool": {
"baseUrl": "http://localhost:8081",
"apiKey": "sk-ant-proxy",
"api": "anthropic-messages"
}
}
}
}
4. Configure routing (optional)
In the Settings tab:
- Priority Mode — Choose "Account Pool First" or "API Key First"
- Routing Mode — "Automatic" for smart routing, or "App Assigned" to bind each app to a specific credential
- App Assignments — Bind Claude Code, Codex, Gemini CLI, or OpenClaw to a specific account or API key
Model Mapping
| Requested Model | Routed To | Auth Required |
|---|---|---|
claude-sonnet-4-6 |
GPT-5.2 Codex / Anthropic API | Yes |
claude-opus-4-6 |
GPT-5.3 Codex / Anthropic API | Yes |
claude-haiku-4-5 |
Free model via Kilo AI | No |
The haiku model can be changed to any free model (DeepSeek R1, Qwen3, MiniMax, etc.) from the Settings tab.
API Endpoints
| Endpoint | Protocol | Used By |
|---|---|---|
POST /v1/messages |
Anthropic Messages | Claude Code, OpenClaw |
POST /v1/chat/completions |
OpenAI Chat Completions | Codex CLI, OpenClaw |
POST /v1/responses |
OpenAI Responses | Codex CLI |
POST /backend-api/codex/responses |
Codex Internal | Codex CLI |
POST /v1beta/models/* |
Gemini API | Gemini CLI |
GET /v1/models |
OpenAI Models | All |
GET /health |
Health Check | Monitoring |
See API Documentation for the full reference.
Security & Privacy
- 100% Local — Runs entirely on
localhost, no external server involved - Direct Connection — Connects directly to official APIs (OpenAI, Anthropic, Google), no third-party relay
- No Telemetry — Zero data collection, zero tracking
- Token Safety — Credentials stored locally with
0600permissions, smart refresh avoids unnecessary token rotation - Source Writeback — When tokens are refreshed for imported accounts, they are synced back to the source CLI tool so it keeps working
Community
GitHub Discussions — Ask questions, share ideas, report issues
Discord — Real-time chat with the community
WeChat — Scan to add the author, note "CliGate" to join the group

Support
If this project helps you, consider supporting its development:
License
This project is licensed under AGPL-3.0.
Disclaimer
This project is an independent open-source tool. It is not affiliated with, endorsed by, or sponsored by Anthropic, OpenAI, or Google. All trademarks belong to their respective owners. Use responsibly and in accordance with applicable Terms of Service.
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found








