Antigravity-Manager README

The project's README from github.com/lbjlaq/Antigravity-Manager. As one markdown file: README.md.

Antigravity Tools 🚀

Professional Account Management & Protocol Proxy System for AI Services (v4.9.8)

Antigravity Tools Logo

Antigravity Tools

Multi-platform automation & multi-account matrix dispatch console

GitHub release Version Tauri Rust React License

lbjlaq/Antigravity-Manager | Trendshift

Features • GUI Overview • Architecture • Installation • Integration

English | 简体中文


Antigravity Tools is an all-in-one desktop application designed for developers and AI enthusiasts. It perfectly combines multi-account management, protocol conversion, and smart request scheduling to provide you with a stable, high-speed, and low-cost Local AI Relay Station.

By leveraging this app, you can transform common Web Sessions (Google/Anthropic) into standardized API interfaces, completely eliminating the protocol gap between different providers.

💖 Sponsors

Sponsor Description
PackyCode Logo Thanks to PackyCode for sponsoring this project! PackyCode is a reliable and efficient API relay service provider, offering relays for various services such as Claude Code, Codex, and Gemini. PackyCode provides a special offer for users of this project: Register using this link and enter the "Ctrler" coupon code when topping up to enjoy a 10% discount.
APIKEYFUN Logo Thanks to APIKEY.FUN for sponsoring this project! APIKEY.FUN is a professional enterprise-grade AI relay station, dedicated to providing stable, efficient, and low-cost AI model API access services for enterprise and individual developers. The platform supports mainstream popular models such as Claude, OpenAI, and Gemini, with prices as low as 7% of the official original price. Register through this exclusive link for this project to enjoy an exclusive offer of up to permanent 5% off on top-ups.
Claude API Logo Thanks to Claude API for supporting this project! claudeapi.com is a Claude API relay station built on official and AWS channels, focused exclusively on Claude, delivering high stability and low latency with full support for Claude Code. Exclusive offer: register via this exclusive link to get free trial credits — zero setup, get started instantly; enjoy an extra 5% off when you top up (Contact Support).
AICodeMirror Logo Thanks to AICodeMirror for sponsoring this project! AICodeMirror provides official high-stability relay services for Claude Code / Codex / Gemini CLI, supporting enterprise-grade concurrency, fast invoicing, and 24/7 dedicated technical support. Claude Code / Codex / Gemini official channels at 38% / 2% / 9% of original price, with extra discounts on top-ups! AICodeMirror offers special benefits for Antigravity-Manager users: register via this link to enjoy 20% off your first top-up, and enterprise customers can get up to 25% off!

☕ Support

If you find this project helpful, feel free to buy me a coffee!

Buy Me A Coffee

Alipay WeChat Pay Buy Me a Coffee
Alipay WeChat Coffee

If you like this project, you might also be interested in:

🌟 Detailed Feature Matrix

1. 🎛️ Smart Account Dashboard

2. 🔐 Powerful Account Management

3. 🔌 Protocol Conversion & Relay (API Proxy)

4. 🔀 Model Router Center

5. 🎨 Multimodal & Imagen 3 Support

📸 GUI Overview

Dashboard - Global Quota Monitoring & One-click Switch
Dashboard
Account List - High-density Quota Display & Smart 403 Labeling
Account List
About Page - About Antigravity Tools
About Page
API Proxy - Service Control
API Proxy
Settings - General Config
Settings

💡 Usage Examples

Claude Code Web Search - Structured source and citation display
Claude Code Web Search
Cherry Studio Deep Integration - Native echo of search citations and source links
Cherry Studio Integration
Imagen 3 Advanced Drawing - Perfect restoration of Prompt artistic conception and details
Imagen 3 Advanced Drawing
Kilo Code Integration - Multi-account high-speed rotation and model penetration
Kilo Code Integration

🏗️ Architecture

graph TD
    Client([External Apps: Claude Code/NextChat]) -->|OpenAI/Anthropic| Gateway[Antigravity Axum Server]
    Gateway --> Middleware[Middleware: Auth/Rate Limit/Logs]
    Middleware --> Router[Model Router: ID Mapping]
    Router --> Dispatcher[Dispatcher: Rotation/Weights]
    Dispatcher --> Mapper[Request Mapper]
    Mapper --> Upstream[Upstream: Google/Anthropic API]
    Upstream --> ResponseMapper[Response Mapper]
    ResponseMapper --> Client

📥 Installation

Cross-Platform One-Line Install Scripts

Automatically detects your OS, architecture, and package manager — one command to download and install.

Linux / macOS:

curl -fsSL https://raw.githubusercontent.com/lbjlaq/Antigravity-Manager/main/install.sh | bash

Windows (PowerShell):

irm https://raw.githubusercontent.com/lbjlaq/Antigravity-Manager/main/install.ps1 | iex

Supported formats: Linux (.deb / .rpm / .AppImage) | macOS (.dmg) | Windows (NSIS .exe)

Advanced usage: Install a specific version curl -fsSL https://raw.githubusercontent.com/lbjlaq/Antigravity-Manager/main/install.sh | bash -s -- --version 4.6.8, dry-run mode curl -fsSL https://raw.githubusercontent.com/lbjlaq/Antigravity-Manager/main/install.sh | bash -s -- --dry-run

macOS - Homebrew

If you have Homebrew installed, you can also install via:

# 1. Tap the repository
brew tap lbjlaq/antigravity-manager https://github.com/lbjlaq/Antigravity-Manager

# 2. Install the app
brew install --cask antigravity-tools

Arch Linux

You can choose to install via the one-click script or Homebrew:

Option 1: One-click script (Recommended)

curl -sSL https://raw.githubusercontent.com/lbjlaq/Antigravity-Manager/main/deploy/arch/install.sh | bash

Option 2: via Homebrew (If you have Linuxbrew installed)

brew tap lbjlaq/antigravity-manager https://github.com/lbjlaq/Antigravity-Manager
brew install --cask antigravity-tools

Other Linux Distributions

The AppImage will be automatically symlinked to your binary path with executable permissions.

Option B: Manual Download

Download from GitHub Releases:

If you prefer running in a containerized environment, we provide a native Docker image. This image supports the v4.0.3 Native Headless architecture, automatically hosts frontend static resources, and allows for direct browser-based management.

docker run -d --name antigravity-manager \
  -p 8045:8045 \
  -e API_KEY=sk-your-api-key \
  -e WEB_PASSWORD=your-login-password \
  -e ABV_MAX_BODY_SIZE=104857600 \
  -v ~/.antigravity_tools:/root/.antigravity_tools \
  lbjlaq/antigravity-manager:latest

# Forgot keys? Run `docker logs antigravity-manager` or `grep -E '"api_key"|"admin_password"' ~/.antigravity_tools/gui_config.json`

[!TIP] 🧪 Pulling Beta / Preview Images: To test the latest Beta pre-release features, specify the corresponding Beta version tag (pre-releases are published independently and will never overwrite the latest stable tag):

# Pull a specific Beta pre-release version (check Docker Hub for all tags)
docker pull lbjlaq/antigravity-manager:v4.8.2-beta.0

# Run Beta container
docker run -d --name antigravity-manager-beta \
  -p 8045:8045 \
  -e API_KEY=sk-your-api-key \
  -e WEB_PASSWORD=your-login-password \
  -e ABV_MAX_BODY_SIZE=104857600 \
  -v ~/.antigravity_tools:/root/.antigravity_tools \
  lbjlaq/antigravity-manager:v4.8.2-beta.0

View all published Beta tags on Docker Hub Tags. If you wish to run the unreleased bleeding-edge beta branch directly, build locally: docker build -t lbjlaq/antigravity-manager:beta -f docker/Dockerfile ..

🔐 Authentication Scenarios

🆙 Upgrade Guide for Older Versions

If you are upgrading from v4.0.1 or earlier, your installation won't have a WEB_PASSWORD set by default. You can add one using any of these methods:

  1. Web UI (Recommended): Log in using your existing API_KEY, go to the API Proxy Settings page, find the Web UI Management Password section below the API Key, set your new password, and save.
  2. Environment Variable (Docker): Stop the old container and start the new one with the added parameter -e WEB_PASSWORD=your_new_password. Note: Environment variables have the highest priority and will override any changes in the UI.
  3. Config File (Persistent): Directly edit ~/.antigravity_tools/gui_config.json and add/modify "admin_password": "your_new_password" inside the proxy object.
    • Note: WEB_PASSWORD is the environment variable name, while admin_password is the JSON key in the config file.

[!TIP] Priority Logic:

  • Environment Variable (WEB_PASSWORD) has the highest priority. If set, the application will always use it and ignore values in the configuration file.
  • Configuration File (gui_config.json) is used for persistent storage. When you change the password via Web UI and save, it is written here.
  • Fallback: If neither is set, it falls back to API_KEY; if even API_KEY is missing, a random one is generated.

Option 2: Use Docker Compose

  1. Enter the docker directory and start the service:
cd docker
docker compose up -d

Log rotation: Compose limits JSON logs to 100m per file and keeps 3 files by default to prevent unbounded growth. Access URL: http://localhost:8045 (Admin Console) | http://localhost:8045/v1 (API Base) System Requirements:

  • RAM: 1GB recommended (minimum 256MB).
  • Persistence: Mount /root/.antigravity_tools to persist your data.
  • Architecture: Supports x86_64 and ARM64. See: Docker Deployment Guide (docker)
🛠️ Troubleshooting - Click to expand

macOS says "App is damaged"?

Due to macOS security gatekeeper, non-App Store apps might show this. You can fix it with:

  1. Terminal Command (Recommended):
    sudo xattr -rd com.apple.quarantine "/Applications/Antigravity Tools.app"
    
  2. Homebrew Installation Advantage: When installing via Homebrew (brew install --cask antigravity-tools), quarantine attributes are automatically cleared upon installation for an out-of-the-box experience.

Linux window is black or empty?

On niri, Hyprland, Sway, and similar compositors, older builds forced GDK_BACKEND=x11 whenever DISPLAY was set, and WebKit then drew a black window. Update to a build that includes this fix, or launch once with:

env WEBKIT_DISABLE_DMABUF_RENDERER=1 ANTIGRAVITY_FORCE_WAYLAND=1 antigravity-tools
  • ANTIGRAVITY_FORCE_WAYLAND=1: keep native Wayland (do not force X11)
  • ANTIGRAVITY_FORCE_X11=1: force X11 if you still need it
  • WEBKIT_DISABLE_DMABUF_RENDERER=1: disable the WebKit DMA-BUF renderer

🔌 Quick Integration Examples

🔐 OAuth Authorization Flow (Add Account)

  1. Go to Accounts → Add Account → OAuth.
  2. The dialog pre-generates an authorization URL before you click any button. Click the URL to copy it to the system clipboard, then open it in the browser you prefer and complete authorization.
  3. After consent, the browser opens a local callback page and shows “✅ Authorized successfully!”.
  4. The app automatically continues the flow and saves the account; if it doesn’t, click “I already authorized, continue” to finish manually.

Note: the auth URL contains a one-time local callback port. Always use the latest URL shown in the dialog. If the app isn’t running or the dialog is closed during auth, the browser may show localhost refused connection.

JeikCode is a modern terminal AI Coding Agent crafted by the core maintainer of this project, featuring native deep integration with Antigravity-Manager, delivering 95%+ KV-Cache hit rate and seamless reasoning level control.

  1. One-Click Sync via GUI (Recommended):
    • Launch Antigravity-Manager and ensure the API Proxy service is running.
    • Switch to the >_ Agent Tools One-Click Configuration tab.
    • Locate the JeikCode card, choose your desired default model (e.g. gemini-3.8-flash-high), and click 🔄 Sync Now.
    • Simply run jeikcode in your terminal for the TUI, and type /webui to instantly launch the modern WebUI in your browser for a richer visual coding experience out of the box!
  2. Temporary Environment Variables:
export ANTHROPIC_BASE_URL="http://127.0.0.1:8045"
export ANTHROPIC_API_KEY="sk-antigravity"
jeikcode --model claude-sonnet-4-6

For complete manual configuration and tuning, see the JeikCode Integration Guide.

How to use with Claude Code CLI?

Recommended Client Versions:

  • Stable Production Recommendation: Claude Code v2.1.28x (more permissive stream termination verification, highest resilience under network jitter);
  • Latest Versions Support: Claude Code v2.1.293 ~ v2.1.295 (requires deploying the gateway version with stream hang prevention and keepalive optimizations, see Diagnosis Guide).

Install recommended stable version: npm install -g @anthropic-ai/[email protected]

  1. Start Antigravity service in the "API Proxy" tab.
  2. In your terminal:
export ANTHROPIC_API_KEY="sk-antigravity"
export ANTHROPIC_BASE_URL="http://127.0.0.1:8045"
claude

How to use with OpenCode?

  1. Go to API Proxy → External Providers → click the OpenCode Sync card.
  2. Click Sync to generate ~/.config/opencode/opencode.json:
    • Creates a dedicated provider antigravity-manager (does not overwrite google/anthropic providers)
    • Optional: Check Sync accounts to export antigravity-accounts.json (plugin-compatible v3 format) for the OpenCode plugin
  3. Click Clear Config to remove Manager configuration and clean up legacy entries; click Restore to revert from backup.
  4. On Windows, the path is C:\Users\<User>\.config\opencode\ (same ~/.config/opencode rule).

Quick verification commands:

# Test antigravity-manager provider (supports --variant)
opencode run "test" --model antigravity-manager/claude-sonnet-4-5-thinking --variant high

# If opencode-antigravity-auth is installed, verify google provider still works independently
opencode run "test" --model google/antigravity-claude-sonnet-4-5-thinking --variant max

How to use in Python?

import openai

client = openai.OpenAI(
    api_key="sk-antigravity",
    base_url="http://127.0.0.1:8045/v1"
)

response = client.chat.completions.create(
    model="gemini-3-flash",
    messages=[{"role": "user", "content": "Hello, please introduce yourself"}]
)
print(response.choices[0].message.content)

How to use with Kilo Code?

  1. Protocol Selection: We recommend using the Gemini protocol.
  2. Base URL: Set it to http://127.0.0.1:8045.
  3. Note:
    • OpenAI Protocol Limitation: When using OpenAI mode, Kilo Code's request path will append /v1/chat/completions/responses, a non-standard path that will return 404 from Antigravity. Make sure to enter the Base URL and select Gemini mode.
    • Model Mapping: Model names in Kilo Code may differ from Antigravity's defaults. If you encounter connection issues, set up custom mappings on the "Model Mapping" page and check the log files for debugging.

How to use Image Generation (Imagen 3)?

import openai

client = openai.OpenAI(
    api_key="sk-antigravity",
    base_url="http://127.0.0.1:8045/v1"
)

# Generate image
response = client.images.generate(
    model="gemini-3-pro-image",
    prompt="A futuristic cyberpunk city with neon lights",
    size="1920x1080",      # Supports any WIDTHxHEIGHT format, auto-calculates aspect ratio
    quality="hd",          # "standard" | "hd" | "medium"
    n=1,
    response_format="b64_json"
)

# Save image
import base64
image_data = base64.b64decode(response.data[0].b64_json)
with open("output.png", "wb") as f:
    f.write(image_data)

Supported parameters:

🎨 Expand to view more image generation methods & parameter mapping rules (Chat API / Model Suffix / Cherry Studio)

Method 2: Chat API + Parameters (✨ New)

All protocols (OpenAI, Claude) Chat APIs now support direct size and quality parameters:

# OpenAI Chat API
response = client.chat.completions.create(
    model="gemini-3-pro-image",
    size="1920x1080",      # ✅ Supports any WIDTHxHEIGHT format
    quality="hd",          # ✅ "standard" | "hd" | "medium"
    messages=[{"role": "user", "content": "A futuristic city"}]
)
# Claude Messages API
curl -X POST http://127.0.0.1:8045/v1/messages \
  -H "Content-Type: application/json" \
  -H "x-api-key: sk-antigravity" \
  -d '{
    "model": "gemini-3-pro-image",
    "size": "1280x720",
    "quality": "hd",
    "messages": [{"role": "user", "content": "A cute cat"}]
  }'

Parameter priority: imageSize parameter > quality parameter > model suffix

✨ New imageSize parameter support:

In addition to the quality parameter, you can now also use Gemini's native imageSize parameter:

# Using imageSize parameter (highest priority)
response = client.chat.completions.create(
    model="gemini-3-pro-image",
    size="16:9",           # Aspect ratio
    imageSize="4K",        # ✨ Direct resolution: "1K" | "2K" | "4K"
    messages=[{"role": "user", "content": "A futuristic city"}]
)
# Claude Messages API also supports imageSize
curl -X POST http://127.0.0.1:8045/v1/messages \
  -H "Content-Type: application/json" \
  -H "x-api-key: sk-antigravity" \
  -d '{
    "model": "gemini-3-pro-image",
    "size": "1280x720",
    "imageSize": "4K",
    "messages": [{"role": "user", "content": "A cute cat"}]
  }'

Parameter descriptions:

  • imageSize: Direct resolution specification ("1K" / "2K" / "4K")
  • quality: Infers resolution from quality level ("standard" → 1K, "medium" → 2K, "hd" → 4K)
  • Priority: If both imageSize and quality are specified, the system prioritizes imageSize

Method 3: Chat API + Model Suffix

response = client.chat.completions.create(
    model="gemini-3-pro-image-16-9-4k",  # Format: gemini-3-pro-image-[ratio]-[quality]
    messages=[{"role": "user", "content": "A futuristic city"}]
)

Model suffix explanation:

  • Aspect ratio: -16-9, -9-16, -4-3, -3-4, -21-9, -1-1
  • Quality: -4k (4K), -2k (2K), no suffix (standard)
  • Example: gemini-3-pro-image-16-9-4k → 16:9 ratio + 4K resolution

Method 4: Cherry Studio & Other Client Settings

In clients that support OpenAI protocol (e.g., Cherry Studio), you can configure image generation parameters via the Model Settings page:

  1. Enter Model Settings: Select the gemini-3-pro-image model
  2. Configure Parameters:
    • Size: Enter any WIDTHxHEIGHT format (e.g. 1920x1080, 1024x1024)
    • Quality: Choose standard / hd / medium
    • Number: Set the number of images (1-10)
  3. Send Request: Simply type your image description in the chat dialog

Parameter mapping rules:

  • size: "1920x1080" → Auto-calculated as 16:9 aspect ratio
  • quality: "hd" → Mapped to 4K resolution
  • quality: "medium" → Mapped to 2K resolution

📝 Changelog

Latest version v4.9.8 (2026-10-17): Automatic seamless hot-switch for Antigravity Classic upon quota depletion or threshold breach with streamlined dual-pool cards (Ref #3509); native evolution supporting Antigravity CLI (agy) with automatic shell wrapper injection, thinking effort disassembly, and independent 3-client active account detection with contextual badges (Ref #3686, Ref #3630); comprehensive 403 error body capture and action URL extraction (captcha verification/appeal) with closed-loop self-healing recovery (Ref #3630, Ref #3684); Claude Code 2.1.301 protocol alignment with anti-WAF identity sanitization, full-link request-id injection, and Claude 5 model family integration (PR #3689, Ref #3684, Ref #3686); active reference tracking in JSON Schema recursive flattening to eliminate exponential replication and Linux VPS OOM (SIGKILL 137) crashes, array schema normalization with terminal ARRAY items guards to prevent Gemini 400 errors, adaptive first-chunk Peek timeout extension to 60s/90s/120s for reasoning models, zero-downtime atomic pool reload eliminating 503 errors, and anti-regression rate limit protection (PR #3694, Fixes #3690, Ref #3682, Ref #3693); complete removal of 100% 429-yielding Prod endpoints, relaxed streaming first-chunk watchdog to 120s baseline, multi-turn role preservation for Responses array inputs, and elimination of 0ms optimistic reset storms (PR #3691, PR #3672, PR #3687, PR #3685, Fixes #3506, Ref #3525); traffic monitor inspector overhaul with Postman-style single-tab view, structured vs raw code views, key-value headers tables with Bearer masking, standard dual-link HAR 1.2 export, and 12-language localization coverage (thanks to @cubelikeplayDaniel, @EricZhou05, @blackdm666, @jeikl).

👉 View Full Changelog → CHANGELOG_EN.md

👥 Contributors - Click to expand

lbjlaq jeikl cubelikeplayDaniel diannaaav XinXin622 llsenyue salacoste 84hero karasungur marovole wanglei8888 yinjianhong22-design Mag1cFall AmbitionsXXXV fishheadwithchili ThanhNguyxn Stranmor Jint8888 0-don dlukt Silviovespoli i-smile jalen0x wendavid byte-sunlight jlcodes99 Vucius Koshikai hakanyalitekin Gok-tug johngbl

Special thanks to all developers who have contributed to this project.

🤝 Special Thanks - Click to expand

This project has referenced or learned from the ideas or code of the following excellent open-source projects during its development (in no particular order):


If you find this tool helpful, please give it a ⭐️ on GitHub!

Copyright © 2024-2026 Antigravity Team.

Antigravity-Manager (lbjlaq/Antigravity-Manager)

Searching Database…

这是什么?Antigravity-Manager 是一款桌面应用,用于管理多个 Antigravity 风格的 AI 账号(Gemini、Claude、Codex)并支持一键切换。它还会运行一个本地代理,把这些基于网页会话的账号转换为标准的 OpenAI、Anthropic 和 Gemini API 接口。
这只是个桌面应用,还是也能当服务器运行?它主要是基于 Tauri v2 + React/Rust 的桌面应用,但也提供了原生 Docker 镜像,可以在 NAS 或服务器上无界面运行,并通过 HTTP 提供同样的 API 代理。
我必须用 Docker 才能使用吗,还是可以直接运行原生应用?Docker 是可选的,并非必需:你可以直接安装原生二进制文件。但如果通过 Docker 部署,就必须设置 APIKEY 用于验证 AI 请求,另外可以选择设置 WEBPASSWORD 用于管理后台的网页界面。
安装时有什么需要注意的坑吗?在 macOS 上,除非通过 Homebrew 安装(它会自动清除隔离属性),或使用终端命令修复,否则 Gatekeeper 可能会把应用标记为“已损坏”。在 Linux 上,如果使用 niri、Hyprland 或 Sway 等窗口合成器,旧版本可能会显示黑屏,需要通过环境变量进行变通设置。
支持哪些操作系统?原生构建版本支持 macOS(Universal,同时支持 Apple Silicon 和 Intel)、Windows 和 Linux,另外还提供 x86_64/ARM64 的 Docker 镜像,用于服务器部署。
内置代理支持哪些 AI 协议?它提供兼容 OpenAI 的 /v1/chat/completions 接口、完整支持 Claude Code CLI 功能的原生 Anthropic /v1/messages 接口,以及面向 Google 官方 AI SDK 的 Gemini 格式接口,因此现有工具无需修改即可直接使用。
模型路由功能是如何工作的?它会把模型 ID 归入不同系列(例如把 GPT-4 风格的请求路由到 gemini-3-pro-high),支持基于正则表达式的自定义模型映射,按等级(Ultra/Pro/Free)为账号排序,并会静默地把 Claude CLI 生成标题等后台任务降级到 Flash 模型,以节省高级配额。
如果账号触发速率限制或令牌过期,会发生什么?后端会检测 429 和 401 错误,并在毫秒级别自动重试,同时静默切换账号,因此请求无需手动干预即可持续进行。
我可以把它和 Claude Code 或 Codex 这类编程智能体一起用吗?可以。Anthropic 格式的接口支持 Claude Code CLI 的全部功能,包括思维链和系统提示词;README 中还给出了与 Claude Code、Cherry Studio 和 Kilo Code 集成的示例。
Creator
lbjlaq
Size
92.1 MB
Stars
32.4K
Age
10mo
Commits · 90 Days