{"id":35747761,"url":"https://github.com/badrisnarayanan/antigravity-claude-proxy","last_synced_at":"2026-04-01T22:03:31.925Z","repository":{"id":329707956,"uuid":"1119580695","full_name":"badrisnarayanan/antigravity-claude-proxy","owner":"badrisnarayanan","description":"Proxy that exposes Antigravity provided claude / gemini models, so we can use them in Claude Code and OpenClaw (Clawdbot)","archived":false,"fork":false,"pushed_at":"2026-03-21T18:54:20.000Z","size":13447,"stargazers_count":3221,"open_issues_count":9,"forks_count":437,"subscribers_count":19,"default_branch":"main","last_synced_at":"2026-03-22T08:21:23.580Z","etag":null,"topics":["antigravity","claude","claude-ai","claude-code","clawdbot","gemini","gemini-cli","openclaw","proxy"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/badrisnarayanan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"buy_me_a_coffee":"badrinarayanans"}},"created_at":"2025-12-19T13:57:33.000Z","updated_at":"2026-03-22T07:33:08.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/badrisnarayanan/antigravity-claude-proxy","commit_stats":null,"previous_names":["badri-s2001/antigravity_claude_server","badri-s2001/antigravity-claude-proxy"],"tags_count":80,"template":false,"template_full_name":null,"purl":"pkg:github/badrisnarayanan/antigravity-claude-proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badrisnarayanan%2Fantigravity-claude-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badrisnarayanan%2Fantigravity-claude-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badrisnarayanan%2Fantigravity-claude-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badrisnarayanan%2Fantigravity-claude-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/badrisnarayanan","download_url":"https://codeload.github.com/badrisnarayanan/antigravity-claude-proxy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/badrisnarayanan%2Fantigravity-claude-proxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31292631,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T21:15:39.731Z","status":"ssl_error","status_checked_at":"2026-04-01T21:15:34.046Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["antigravity","claude","claude-ai","claude-code","clawdbot","gemini","gemini-cli","openclaw","proxy"],"created_at":"2026-01-06T18:23:00.164Z","updated_at":"2026-04-01T22:03:31.916Z","avatar_url":"https://github.com/badrisnarayanan.png","language":"JavaScript","funding_links":["https://buymeacoffee.com/badrinarayanans"],"categories":["A01_文本生成_文本对话","JavaScript","Proxy \u0026 Customization","Deployment und Betrieb"],"sub_categories":["大语言对话模型及数据","Self-Hosted Deployment und Infrastruktur"],"readme":"# Antigravity Claude Proxy\n\n[![npm version](https://img.shields.io/npm/v/antigravity-claude-proxy.svg)](https://www.npmjs.com/package/antigravity-claude-proxy)\n[![npm downloads](https://img.shields.io/npm/dm/antigravity-claude-proxy.svg)](https://www.npmjs.com/package/antigravity-claude-proxy)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nA proxy server that exposes an **Anthropic-compatible API** backed by **Antigravity's Cloud Code**, letting you use Claude and Gemini models with **Claude Code CLI** and **OpenClaw / ClawdBot**.\n\n![Antigravity Claude Proxy Banner](images/banner.png)\n\n\u003e **⚠️ WARNING:** Google has been issuing ToS violation bans on accounts connected to this proxy. Use at your own risk.\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003e⚠️ Terms of Service Warning — Read Before Installing\u003c/strong\u003e\u003c/summary\u003e\n\n\u003e [!CAUTION]\n\u003e Using this proxy may violate Google's Terms of Service. A small number of users have reported their Google accounts being **banned** or **shadow-banned** (restricted access without explicit notification).\n\u003e\n\u003e **By using this proxy, you acknowledge:**\n\u003e - This is an unofficial tool not endorsed by Google\n\u003e - Your account may be suspended or permanently banned\n\u003e - You assume all risks associated with using this proxy\n\u003e\n\u003e **Recommendation:** Do not use your main account. Use a burner account instead, and optionally add it to your main account's family plan if needed.\n\n\u003c/details\u003e\n\n---\n\n## How It Works\n\n```\n┌──────────────────┐     ┌─────────────────────┐     ┌────────────────────────────┐\n│   Claude Code    │────▶│  This Proxy Server  │────▶│  Antigravity Cloud Code    │\n│   (Anthropic     │     │  (Anthropic → Google│     │  (daily-cloudcode-pa.      │\n│    API format)   │     │   Generative AI)    │     │   sandbox.googleapis.com)  │\n└──────────────────┘     └─────────────────────┘     └────────────────────────────┘\n```\n\n1. Receives requests in **Anthropic Messages API format**\n2. Uses OAuth tokens from added Google accounts (or Antigravity's local database)\n3. Transforms to **Google Generative AI format** with Cloud Code wrapping\n4. Sends to Antigravity's Cloud Code API\n5. Converts responses back to **Anthropic format** with full thinking/streaming support\n\n## Prerequisites\n\n- **Node.js** 18 or later\n- **Antigravity** installed (for single-account mode) OR Google account(s) for multi-account mode\n\n---\n\n## Installation\n\n### Option 1: npm (Recommended)\n\n```bash\n# Run directly with npx (no install needed)\nnpx antigravity-claude-proxy@latest start\n\n# Or install globally\nnpm install -g antigravity-claude-proxy@latest\nantigravity-claude-proxy start\n```\n\n### Option 2: Clone Repository\n\n```bash\ngit clone https://github.com/badri-s2001/antigravity-claude-proxy.git\ncd antigravity-claude-proxy\nnpm install\nnpm start\n```\n\n---\n\n## Quick Start\n\n### 1. Start the Proxy Server\n\n```bash\n# If installed globally\nacc start\n# or: antigravity-claude-proxy start\n\n# If using npx\nnpx antigravity-claude-proxy@latest start\n\n# If cloned locally\nnpm start\n```\n\nThe server launches as a **background process** on `http://localhost:8080` by default and survives terminal closure.\n\n| Command | Description |\n| :--- | :--- |\n| `acc start` | Launch proxy in the background |\n| `acc stop` | Shut down the proxy |\n| `acc restart` | Restart the proxy |\n| `acc status` | Check proxy health and PID |\n| `acc ui` | Open the web dashboard |\n| `acc start --log` | Run in foreground with visible logs |\n\n### 2. Link Account(s)\n\nChoose one of the following methods to authorize the proxy:\n\n#### **Method A: Web Dashboard (Recommended)**\n\n1. With the proxy running, open `http://localhost:8080` in your browser.\n2. Navigate to the **Accounts** tab and click **Add Account**.\n3. Complete the Google OAuth authorization in the popup window.\n\n\u003e **Headless/Remote Servers**: If running on a server without a browser, the WebUI supports a \"Manual Authorization\" mode. After clicking \"Add Account\", you can copy the OAuth URL, complete authorization on your local machine, and paste the authorization code back.\n\n#### **Method B: CLI (Desktop or Headless)**\n\nIf you prefer the terminal or are on a remote server:\n\n```bash\n# Desktop (opens browser)\nantigravity-claude-proxy accounts add\n\n# Headless (Docker/SSH)\nantigravity-claude-proxy accounts add --no-browser\n```\n\n\u003e For full CLI account management options, run `antigravity-claude-proxy accounts --help`.\n\n#### **Method C: Automatic (Antigravity Users)**\n\nIf you have the **Antigravity** app installed and logged in, the proxy will automatically detect your local session. No additional setup is required.\n\nTo use a custom port:\n\n```bash\nPORT=3001 antigravity-claude-proxy start\n```\n\n### 3. Verify It's Working\n\n```bash\n# Health check\ncurl http://localhost:8080/health\n\n# Check account status and quota limits\ncurl \"http://localhost:8080/account-limits?format=table\"\n```\n\n---\n\n## Using with Claude Code CLI\n\n### Configure Claude Code\n\nYou can configure these settings in two ways:\n\n#### **Via Web Console (Recommended)**\n\n1. Open the WebUI at `http://localhost:8080`.\n2. Go to **Settings** → **Claude CLI**.\n3. Use the **Connection Mode** toggle to switch between:\n   - **Proxy Mode**: Uses the local proxy server (Antigravity Cloud Code). Configure models, base URL, and presets here.\n   - **Paid Mode**: Uses the official Anthropic Credits directly (requires your own subscription). This hides proxy settings to prevent accidental misconfiguration.\n4. Click **Apply to Claude CLI** to save your changes.\n\n\u003e [!TIP] \u003e **Configuration Precedence**: System environment variables (set in shell profile like `.zshrc`) take precedence over the `settings.json` file. If you use the Web Console to manage settings, ensure you haven't manually exported conflicting variables in your terminal.\n\n#### **Manual Configuration**\n\nCreate or edit the Claude Code settings file:\n\n**macOS:** `~/.claude/settings.json`\n**Linux:** `~/.claude/settings.json`\n**Windows:** `%USERPROFILE%\\.claude\\settings.json`\n\nAdd this configuration:\n\n```json\n{\n  \"env\": {\n    \"ANTHROPIC_AUTH_TOKEN\": \"test\",\n    \"ANTHROPIC_BASE_URL\": \"http://localhost:8080\",\n    \"ANTHROPIC_MODEL\": \"claude-opus-4-6-thinking\",\n    \"ANTHROPIC_DEFAULT_OPUS_MODEL\": \"claude-opus-4-6-thinking\",\n    \"ANTHROPIC_DEFAULT_SONNET_MODEL\": \"claude-sonnet-4-6-thinking\",\n    \"ANTHROPIC_DEFAULT_HAIKU_MODEL\": \"claude-sonnet-4-6\",\n    \"CLAUDE_CODE_SUBAGENT_MODEL\": \"claude-sonnet-4-6-thinking\",\n    \"ENABLE_EXPERIMENTAL_MCP_CLI\": \"true\"\n  }\n}\n```\n\nOr to use Gemini models:\n\n```json\n{\n  \"env\": {\n    \"ANTHROPIC_AUTH_TOKEN\": \"test\",\n    \"ANTHROPIC_BASE_URL\": \"http://localhost:8080\",\n    \"ANTHROPIC_MODEL\": \"gemini-3.1-pro-high[1m]\",\n    \"ANTHROPIC_DEFAULT_OPUS_MODEL\": \"gemini-3.1-pro-high[1m]\",\n    \"ANTHROPIC_DEFAULT_SONNET_MODEL\": \"gemini-3-flash[1m]\",\n    \"ANTHROPIC_DEFAULT_HAIKU_MODEL\": \"gemini-3-flash[1m]\",\n    \"CLAUDE_CODE_SUBAGENT_MODEL\": \"gemini-3-flash[1m]\",\n    \"ENABLE_EXPERIMENTAL_MCP_CLI\": \"true\"\n  }\n}\n```\n\n### Load Environment Variables\n\nAdd the proxy settings to your shell profile:\n\n**macOS / Linux:**\n\n```bash\necho 'export ANTHROPIC_BASE_URL=\"http://localhost:8080\"' \u003e\u003e ~/.zshrc\necho 'export ANTHROPIC_AUTH_TOKEN=\"test\"' \u003e\u003e ~/.zshrc\nsource ~/.zshrc\n```\n\n\u003e For Bash users, replace `~/.zshrc` with `~/.bashrc`\n\n**Windows (PowerShell):**\n\n```powershell\nAdd-Content $PROFILE \"`n`$env:ANTHROPIC_BASE_URL = 'http://localhost:8080'\"\nAdd-Content $PROFILE \"`$env:ANTHROPIC_AUTH_TOKEN = 'test'\"\n. $PROFILE\n```\n\n**Windows (Command Prompt):**\n\n```cmd\nsetx ANTHROPIC_BASE_URL \"http://localhost:8080\"\nsetx ANTHROPIC_AUTH_TOKEN \"test\"\n```\n\nRestart your terminal for changes to take effect.\n\n### Run Claude Code\n\n```bash\n# Make sure the proxy is running first\nantigravity-claude-proxy start\n\n# In another terminal, run Claude Code\nclaude\n```\n\n\u003e **Note:** If Claude Code asks you to select a login method, add `\"hasCompletedOnboarding\": true` to `~/.claude.json` (macOS/Linux) or `%USERPROFILE%\\.claude.json` (Windows), then restart your terminal and try again.\n\n### Proxy Mode vs. Paid Mode\n\nToggle in **Settings** → **Claude CLI**:\n\n| Feature | 🔌 Proxy Mode | 💳 Paid Mode |\n| :--- | :--- | :--- |\n| **Backend** | Local Server (Antigravity) | Official Anthropic Credits |\n| **Cost** | Free (Google Cloud) | Paid (Anthropic Credits) |\n| **Models** | Claude + Gemini | Claude Only |\n\n**Paid Mode** automatically clears proxy settings so you can use your official Anthropic account directly.\n\n### Multiple Claude Code Instances (Optional)\n\nTo run both the official Claude Code and Antigravity version simultaneously, add this alias:\n\n**macOS / Linux:**\n\n```bash\n# Add to ~/.zshrc or ~/.bashrc\nalias claude-antigravity='CLAUDE_CONFIG_DIR=~/.claude-account-antigravity ANTHROPIC_BASE_URL=\"http://localhost:8080\" ANTHROPIC_AUTH_TOKEN=\"test\" command claude'\n```\n\n**Windows (PowerShell):**\n\n```powershell\n# Add to $PROFILE\nfunction claude-antigravity {\n    $env:CLAUDE_CONFIG_DIR = \"$env:USERPROFILE\\.claude-account-antigravity\"\n    $env:ANTHROPIC_BASE_URL = \"http://localhost:8080\"\n    $env:ANTHROPIC_AUTH_TOKEN = \"test\"\n    claude\n}\n```\n\nThen run `claude` for official API or `claude-antigravity` for this proxy.\n\n### Running as a System Service (systemd)\n\nWhen running as a systemd service, the proxy runs under a different user (e.g. `root`), so it can't find your Claude CLI settings at `~/.claude/settings.json`. Set `CLAUDE_CONFIG_PATH` to point to the real user's `.claude` directory:\n\n```ini\n# /etc/systemd/system/antigravity-proxy.service\n[Service]\nEnvironment=CLAUDE_CONFIG_PATH=/home/youruser/.claude\nExecStart=/usr/bin/node /path/to/antigravity-claude-proxy/src/index.js\n```\n\nWithout this, the WebUI's Claude CLI tab won't be able to read or write your Claude Code configuration.\n\n---\n\n## Documentation\n\n- [Available Models](docs/models.md)\n- [Multi-Account Load Balancing](docs/load-balancing.md)\n- [Web Management Console](docs/web-console.md)\n- [Advanced Configuration](docs/configuration.md)\n- [macOS Menu Bar App](docs/menubar-app.md)\n- [OpenClaw / ClawdBot Integration](docs/openclaw.md)\n- [API Endpoints](docs/api-endpoints.md)\n- [Testing](docs/testing.md)\n- [Troubleshooting](docs/troubleshooting.md)\n- [Safety, Usage, and Risk Notices](docs/safety-notices.md)\n- [Legal](docs/legal.md)\n- [Development](docs/development.md)\n\n---\n\n## Credits\n\nThis project is based on insights and code from:\n\n- [opencode-antigravity-auth](https://github.com/NoeFabris/opencode-antigravity-auth) - Antigravity OAuth plugin for OpenCode\n- [claude-code-proxy](https://github.com/1rgs/claude-code-proxy) - Anthropic API proxy using LiteLLM\n\n---\n\n## License\n\nMIT\n\n---\n\n\u003ca href=\"https://buymeacoffee.com/badrinarayanans\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" alt=\"Buy Me A Coffee\" height=\"50\"\u003e\u003c/a\u003e\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=badrisnarayanan/antigravity-claude-proxy\u0026type=date\u0026legend=top-left\u0026cache-control=no-cache)](https://www.star-history.com/#badrisnarayanan/antigravity-claude-proxy\u0026type=date\u0026legend=top-left)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadrisnarayanan%2Fantigravity-claude-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbadrisnarayanan%2Fantigravity-claude-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbadrisnarayanan%2Fantigravity-claude-proxy/lists"}