A proxy server that enables using Claude Code with Google's Gemini CLI or Antigravity plans. It translates Anthropic's Claude API format to Google's Gemini API format, allowing Claude Code to work with Gemini models.
- Anthropic API Compatibility: Exposes a
/v1/messagesendpoint compatible with the Anthropic API format - Dual Authentication: Supports both Gemini CLI and Antigravity authentication methods
- Model Mapping: Automatically maps Claude model names to appropriate Gemini models
- Streaming Support: Full SSE streaming support for real-time responses
- Thinking Mode: Extended thinking/reasoning support for compatible models
- Tool Use: Function calling support with schema translation
- Rate Limiting: Built-in rate limiting for Gemini CLI accounts
- Signature Caching: Caches thinking signatures for multi-turn conversations
| Request Model | Gemini CLI | Antigravity |
|---|---|---|
| claude-opus-* | gemini-3-pro-preview | claude-opus-4-5-thinking |
| claude-sonnet-* | gemini-3-pro-preview | claude-sonnet-4-5 / claude-sonnet-4-5-thinking |
| claude-haiku-* | gemini-3-flash-preview | gemini-3-flash |
go build -o gemini-codeFirst, authenticate with either Gemini CLI or Antigravity:
# Login with Gemini CLI credentials
./gemini-code login gemini
# Login with Antigravity credentials
./gemini-code login antigravityThis opens a browser for Google OAuth authentication. Credentials are stored in ~/.gemini-code/accounts.json.
# Start the server (default port 3000)
./gemini-code
# Select a specific account type or project ID
./gemini-code -a gemini
./gemini-code -a antigravity
./gemini-code --account <project-id>Point Claude Code to use this proxy by setting the API base URL:
export ANTHROPIC_API_URL=http://localhost:3000Or configure it in your Claude Code settings.
Accepts requests in Anthropic's Messages API format and proxies them to Google's API.
Request format: Standard Anthropic Messages API request body
Response format: Standard Anthropic Messages API response (streaming or non-streaming)
| Variable | Description |
|---|---|
ANTIGRAVITY_ENDPOINT |
Custom endpoint for Antigravity API |
CODE_ASSIST_ENDPOINT |
Custom endpoint for Gemini Code Assist API |