An open API service indexing awesome lists of open source software.

https://github.com/ai-dev-2024/antigravity-claude-code-proxy

πŸš€ Use Claude Code CLI with Gemini, GPT-5, Grok & 20+ AI models β€” Multi-account load balancing, real-time dashboard, per-window model switching
https://github.com/ai-dev-2024/antigravity-claude-code-proxy

ai-proxy anthropic claude-code gemini google-ai gpt5 grok load-balancing vscode-extension

Last synced: 5 days ago
JSON representation

πŸš€ Use Claude Code CLI with Gemini, GPT-5, Grok & 20+ AI models β€” Multi-account load balancing, real-time dashboard, per-window model switching

Awesome Lists containing this project

README

          


Antigravity Proxy Banner


Proxy v2.8.0
Extension v4.2.2
Claude Code Compatible
Antigravity Powered
MIT License
Support Me



Install Extension

πŸš€ Antigravity Claude Code Proxy


Use Claude Code CLI with Gemini, GPT-5, Grok, and 20+ AI models



A production-ready multi-provider AI gateway with automatic load balancing,

real-time status bar integration, and beautiful monitoring dashboard


What is this? β€’
Features β€’
Quick Start β€’
Models β€’
Dashboard β€’
Status Bar

---

## πŸ“– What is this?

**Antigravity Claude Proxy** is a local proxy server that enables **Claude Code CLI** to use multiple AI providers:

| Without Proxy | With Proxy |
|--------------|------------|
| Only Claude models | **20+ AI models** (Gemini, GPT-5, Grok, Claude, etc.) |
| Single account | **Multi-account load balancing** |
| No monitoring | **Real-time dashboard** |
| No status | **Status bar integration** |

### How it Works

```
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ β”‚ β”‚ β”‚ β”‚ β”‚
β”‚ Claude Code │─────▢│ Antigravity Proxy │─────▢│ Google AI (Gemini) β”‚
β”‚ CLI/Extension β”‚ β”‚ localhost:8080 β”‚ β”‚ + Perplexity β”‚
β”‚ β”‚ β”‚ β”‚ β”‚ + More providers β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
```

---

## πŸ–ΌοΈ Showcase


Dashboard


Real-time dashboard with multi-account load balancing and usage stats


Quota Popup


Click status bar to see Claude & Gemini quotas with reset times


Model Switcher


One-click model switching between Flash, Pro, Opus, Sonnet, and more


Status Bar


Live model indicator in your IDE status bar (⚑ Flash, πŸ’Ž Pro, 🎭 Opus)

---

## ✨ Features

### 🎯 Core Capabilities

| Feature | Description |
|---------|-------------|
| **Multi-Provider Access** | Use Gemini, GPT-5, Grok, Claude, Kimi, and more through one API |
| **Automatic Load Balancing** | Smart rotation across 4+ Google accounts with cooldown |
| **Status Bar Integration** | See current model with emoji icons (βš‘πŸ’ŽπŸŽ­πŸŽ΅) |
| **Beautiful Dashboard** | Monitor accounts, usage, and switch models at `localhost:8080` |
| **Auto-Start** | Proxy starts automatically when you open your IDE |
| **Model Persistence** | Your selected model survives restarts |

### 🧠 Smart Features

- **πŸ”„ Smart Routing**: Extension dropdown Opus/Haiku/Default pass-through, Custom uses dashboard
- **⚑ Agentic Fallback**: Chat-only models auto-switch to agentic models for file operations
- **πŸ“Š Usage Tracking**: Per-model and per-account statistics
- **πŸ›‘οΈ Rate Limit Recovery**: Automatically rotates to healthy accounts

---

## πŸš€ Quick Start

### Prerequisites

- **Node.js** 18+
- **PM2** (process manager) - `npm install -g pm2`
- **Antigravity** desktop app ([Download](https://antigravity.dev)) or VS Code
- **Claude Code CLI** (`npm install -g @anthropic-ai/claude-code`)

### Installation

```bash
# Clone the repository
git clone https://github.com/ai-dev-2024/Antigravity-Claude-Code-Proxy.git
cd Antigravity-Claude-Code-Proxy/Antigravity-Claude-Code-Proxy

# Install dependencies
npm install

# Start the proxy (runs as persistent background service)
pm2 start src/server.js --name antigravity-proxy
pm2 save
```

### Configure Environment

**Windows (PowerShell):**
```powershell
[Environment]::SetEnvironmentVariable("ANTHROPIC_BASE_URL", "http://localhost:8080", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_API_KEY", "antigravity-proxy", "User")
```

**macOS/Linux:**
```bash
echo 'export ANTHROPIC_BASE_URL="http://localhost:8080"' >> ~/.bashrc
echo 'export ANTHROPIC_API_KEY="antigravity-proxy"' >> ~/.bashrc
source ~/.bashrc
```

### Auto-Start on Windows Login (Recommended)

```batch
# Run the setup script:
cd scripts\setup
SETUP_STARTUP.bat
```

This will:
- Register the proxy with PM2
- Create a Windows startup script
- Proxy starts automatically on login

### Start Using!

```bash
claude
```

> **Note:** The proxy runs in the background via PM2. You can close any terminal or IDE window without affecting it. To check status: `pm2 list`. To stop: `pm2 stop antigravity-proxy`.

---

## πŸ€– Models

### ⚑ Agentic Models (Full Capabilities)

| Model | Alias | Best For |
|-------|-------|----------|
| `gemini-3-flash` | `flash` | Fast tasks, simple commands |
| `gemini-3-pro-high` | `pro` | Complex coding, deep analysis |
| `claude-opus-4-5-thinking` | `opus` | Complex reasoning |
| `claude-sonnet-4-5-thinking` | `sonnet` | Balanced performance |

### πŸ” Search Models (Chat + Web Search)

| Model | Provider | Description |
|-------|----------|-------------|
| `pplx-grok` | Perplexity | Grok 4.1 with web search |
| `pplx-gpt51` | Perplexity | GPT-5.1 chat |
| `pplx-kimi` | Perplexity | Kimi (Moonshot) |
| `sonar` | Perplexity | Web search focused |

### Model Switching

```bash
# In Claude Code chat:
/model flash # Switch to Gemini 3 Flash
/model pro # Switch to Gemini 3 Pro
/model grok # Switch to Grok (Perplexity)

# Or use dashboard:
# Open http://localhost:8080/dashboard
```

---

## πŸ“Š Dashboard

Access the dashboard at **http://localhost:8080/dashboard**

Features:
- **Account Monitor**: See all accounts, their status, and remaining quota
- **Model Switcher**: Quick dropdown to change active model
- **Usage Statistics**: Track requests per model
- **Health Status**: Know when accounts are rate-limited

---

## πŸ“Š Status Bar Extension (v3.9+)

The status bar extension shows your current model and quota information in real-time:

### Status Bar Icons

| Icon | Model |
|------|-------|
| ⚑ | Gemini Flash |
| πŸ’Ž | Gemini Pro |
| 🎭 | Claude Opus |
| 🎡 | Claude Sonnet |
| 🌐 | Grok |
| πŸ” | Perplexity/Sonar |

### Quota Popup (Click Account Icon)

- **Model Quotas**: Overall Claude & Gemini percentages with visual bars
- **Per-Account Breakdown**: All connected accounts with individual quotas
- **Smart Sorting**: Accounts with highest Claude quota shown first
- **Reset Times**: Know exactly when your quota resets

### Features

- **One-Click Model Switching**: Click model name to switch instantly
- **Real-Time Updates**: 5-second polling for accurate quota display
- **Offline Detection**: Shows "Offline" in red when proxy is down
- **Open Dashboard**: Quick link to full web dashboard

---

## πŸ”Œ API Reference

| Endpoint | Method | Description |
|----------|--------|-------------|
| `/v1/messages` | POST | Anthropic Messages API |
| `/v1/models` | GET | List available models |
| `/active-model` | GET/POST/DELETE | Model override control |
| `/dashboard` | GET | Web dashboard |
| `/health` | GET | Health check |
| `/account-limits` | GET | Account quotas |

---

## πŸ“ Project Structure

```
Antigravity-Claude-Code-Proxy/
β”œβ”€β”€ src/
β”‚ β”œβ”€β”€ server.js # Main Express server
β”‚ β”œβ”€β”€ account-manager.js # Multi-account handling
β”‚ β”œβ”€β”€ constants.js # Model aliases & config
β”‚ └── public/
β”‚ └── dashboard.html # Web dashboard
β”œβ”€β”€ docs/
β”‚ └── images/ # Showcase images
β”œβ”€β”€ SECURITY.md # Security policy
β”œβ”€β”€ CHANGELOG.md # Version history
└── package.json # v2.5.0
```

---

## πŸ”’ Security

- **No credentials in code**: All sensitive data stored locally
- **Comprehensive .gitignore**: Accounts, tokens, logs excluded
- **npm audit**: 0 vulnerabilities
- **Local-only**: Runs on localhost by default

See [SECURITY.md](SECURITY.md) for full security policy.

---

## πŸ“‹ Version History

| Version | Type | Features |
|---------|------|----------|
| **v2.7** | Extension v4.1.1 | Per-window model selection, workspace persistence |
| **v2.6** | Extension | Per-session isolation, sessions dashboard |
| **v2.5** | Extension | IDE account switcher, simplified layout |
| **v2.4** | Extension | Direct OAuth, multi-state auth server |
| **v2.3** | Extension | Per-window models, dark theme dashboard |
| **v2.2** | Extension | PM2 process manager, Material Design |
| **v2.1** | Extension | Robust model routing, faster polling |
| **v2.0** | Extension | Status bar extension, model mapping |
| **v1.2** | CLI | Smart routing, model persistence |
| **v1.1** | CLI | Multi-account, Perplexity, dashboard |
| **v1.0** | CLI | Initial release |

See [CHANGELOG.md](CHANGELOG.md) for detailed history.

---

## πŸ“œ License

MIT License - See [LICENSE](LICENSE) for details.

---


Made with ❀️ for the Claude Code community


Report Bug β€’
Request Feature


❀️ Support This Project


If you find this project helpful, please consider buying me a coffee! Your support helps keep the updates coming.



Buy Me A Coffee