Professional Antigravity Account Manager & Switcher. One-click seamless account switching for Antigravity Tools. Built with Tauri v2 + React (Rust).专业的 Antigravity 账号管理与切换工具。
概览
您的个人高性能 AI 调度网关 不仅仅是账号管理,更是打破 API 调用壁垒的终极解决方案。 是一个专为开发者和 AI 爱好者设计的全功能桌面应用。它将多账号管理、协议转换和智能请求调度完美结合,为您提供一个稳定、极速且成本低廉的 。 通过本应用,您可以将常见的 Web 端 Session (Google/Anthropic) 转化为标准化的 API 接口,消除不同厂商间的协议鸿沟。 * : 专为 AI 协议设计的语言服务器 (LSP),为您提供更智能的代码补全、诊断和协议调试体验。 * : 一眼洞察所有账号的健康状况,包括 Gemini Pro、Gemini Flash、Claude 以及 Gemini 绘图的 。 * : 系统会根据当前所有账号的配额冗余度,实时算法筛选并推荐“最佳账号”,支持 。 * : 直观显示当前活跃账号的具体配额百分比及最后同步时间。 * : 添加账号时会提前生成可复制的授权链接,支持在任意浏览器完成授权;回调成功后应用会自动完成并保存(必要时可点击“我已授权,继续”手动收尾)。 * : 支持单条 Token 录入、JSON 批量导入(如来自其他工具的备份),以及从 V1 旧版本数据库自动热迁移。 * : 支持“列表”与“网格”双视图切换。提供 403 封禁检测,自动标注并跳过权限异常的账号。 * : * : 提供 /v1/chat/completions 端点,兼容 99% 的现有 AI 应用。 * : 提供原生 /v1/messages 接口,支持 的全功能(如思思维链、系统提示词)。 * : 支持 Google 官方 SDK 直接调用。 * : 当请求遇到 429 (Too Many Requests) 或 401 (Expire) 时,后端会毫秒级触发 ,确保业务不中断。 * : 您可以将复杂的原始模型 ID 归类到“规格家族”(如将所有 GPT-4 请求统一路由到 gemini-3-pro-high)。 * : 支持自定义正则表达式级模型映射,精准控制每一个请求的落地模型。 * : [新] 系统根据账号类型(Ultra/Pro/Free)和配额重置频率自动优先级排序,优先消耗高速重置账号,确保高频调用下的服务稳定性。
README
Antigravity Tools 🚀
Professional Account Management & Protocol Proxy System for AI Services (v5.0.0)
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 |
|---|---|
| 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. | |
| 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. | |
| 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). | |
| 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!
| Alipay | WeChat Pay | Buy Me a Coffee |
|---|---|---|
🚀 Recommended Projects
If you like this project, you might also be interested in:
- Antigravity-Tools-LS: A Language Server Protocol (LSP) designed for AI protocols, providing you with smarter code completion, diagnostics, and protocol debugging experiences.
🌟 Detailed Feature Matrix
1. 🎛️ Smart Account Dashboard
- Global Real-time Monitoring: Instant insight into the health of all accounts, including average remaining quotas for Gemini Pro, Gemini Flash, Claude, and Gemini Image generation.
- Smart Recommendation: The system uses a real-time algorithm to filter and recommend the “Best Account” based on quota redundancy, supporting one-click switching.
- Active Account Snapshot: Visually displays the specific quota percentage and the last synchronization time of the currently active account.
2. 🔐 Powerful Account Management
- OAuth 2.0 Authorization (Auto/Manual): Pre-generates a copyable authorization URL so you can finish auth in any browser; after the callback, the app auto-completes and saves the account (use “I already authorized, continue” if needed).
- Multi-dimensional Import: Supports single token entry, JSON batch import, and automatic hot migration from V1 legacy databases.
- Gateway-level Views: Supports switching between “List” and “Grid” views. Provides 403 Forbidden detection, automatically marking and skipping accounts with permission anomalies.
3. 🔌 Protocol Conversion & Relay (API Proxy)
- Multi-Protocol Adaptation (Multi-Sink):
- OpenAI Format: Provides
/v1/chat/completionsendpoint, compatible with 99% of existing AI apps. - Anthropic Format: Provides native
/v1/messagesinterface, supporting all features of Claude Code CLI (e.g., chain-of-thought, system prompts). - Gemini Format: Supports direct calls from official Google AI SDKs.
- OpenAI Format: Provides
- Smart Self-healing: When a request encounters
429 (Too Many Requests)or401 (Expired), the backend triggers millisecond-level automatic retry and silent rotation, ensuring business continuity.
4. 🔀 Model Router Center
- Series-based Mapping: Classify complex original model IDs into “Series Groups” (e.g., routing all GPT-4 requests uniformly to
gemini-3-pro-high). - Expert Redirection: Supports custom regex-level model mapping for precise control over every request’s landing model.
- Tiered Routing [New]: Automatically prioritizes models based on account tiers (Ultra/Pro/Free) and reset frequencies to ensure stability for high-volume users.
- Silent Background Downgrading [New]: Intelligently identifies background tasks (e.g., Claude CLI title generation) and reroutes them to Flash models to preserve premium quota.
5. 🎨 Multimodal & Imagen 3 Support
- Advanced Image Control: Supports precise control over image generation tasks via OpenAI
size(e.g.,1024x1024,16:9) parameters or model name suffixes. - Enhanced Payload Support: The backend supports payloads up to 100MB (configurable), more than enough for 4K HD image recognition and processing.
📸 GUI Overview
| Dashboard | Account List |
| About Page | API Proxy |
| Settings |
💡 Usage Examples
| Claude Code Web Search | Cherry Studio Integration |
| Imagen 3 Advanced Drawing | 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
Option A: Terminal Installation (Recommended)
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 modecurl -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:
- macOS:
.dmg(Universal, Apple Silicon & Intel) - Windows:
.msior portable.zip - Linux:
.deborAppImage
Option C: Docker Deployment (Recommended for NAS/Servers)
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.
Option 1: Direct Run (Recommended)
- API_KEY: Required. Used for AI request authentication.
- WEB_PASSWORD: Optional. Used for Web UI login. Defaults to API_KEY if NOT set.
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
lateststable 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.0View all published Beta tags on Docker Hub Tags. If you wish to run the unreleased bleeding-edge
betabranch directly, build locally:docker build -t lbjlaq/antigravity-manager:beta -f docker/Dockerfile ..
🔐 Authentication Scenarios
- Scenario A: Only
API_KEYis set- Web Login: Use
API_KEYto access the dashboard. - API Calls: Use
API_KEYfor AI request authentication.
- Web Login: Use
- Scenario B: Both
API_KEYandWEB_PASSWORDare set (Recommended)- Web Login: Must use
WEB_PASSWORD. Using API Key will be rejected (more secure). - API Calls: Continue to use
API_KEY. This allows you to share the API Key with team members while keeping the password for administrative access only.
- Web Login: Must use
🆙 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:
- 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. - 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. - Config File (Persistent): Directly edit
~/.antigravity_tools/gui_config.jsonand add/modify"admin_password": "your_new_password"inside theproxyobject.- Note:
WEB_PASSWORDis the environment variable name, whileadmin_passwordis the JSON key in the config file.
- Note:
[!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 evenAPI_KEYis missing, a random one is generated.
Option 2: Use Docker Compose
- Enter the
dockerdirectory and start the service:
cd docker
docker compose up -d
Log rotation: Compose limits JSON logs to
100mper file and keeps3files 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_toolsto persist your data.- Architecture: Supports x86_64 and ARM64. See: Docker Deployment Guide (docker)
🔌 Quick Integration Examples
🔐 OAuth Authorization Flow (Add Account)
- Go to
Accounts→Add Account→OAuth. - 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.
- After consent, the browser opens a local callback page and shows “✅ Authorized successfully!”.
- 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.
How to use with JeikCode? (Recommended)
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.
- One-Click Sync via GUI (Recommended):
- Launch Antigravity-Manager and ensure the API Proxy service is running.
- Switch to the
>_ Agent Tools One-Click Configurationtab. - Locate the JeikCode card, choose your desired default model (e.g.
gemini-3.8-flash-high), and click🔄 Sync Now. - Simply run
jeikcodein your terminal for the TUI, and type/webuito instantly launch the modern WebUI in your browser for a richer visual coding experience out of the box!
- 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]
- Start Antigravity service in the “API Proxy” tab.
- In your terminal:
export ANTHROPIC_API_KEY="sk-antigravity"
export ANTHROPIC_BASE_URL="http://127.0.0.1:8045"
claude
Native CLI Account Switcher (at / antigravity-tools)
Antigravity includes a lightweight native CLI suite designed for terminal developers. It enables instant system Keychain credential rotation and seamless session continuation with agy:
# 1. List all accounts with status and active indicators (👉)
at list
# 2. Inspect currently active accounts across agy CLI (Keychain) and IDE
at current
# 3. Switch account (supports 1-based index, email, prefix, or alias)
at switch 2 # Switch to account #2
at switch [email protected] # Switch by email
at switch work # Switch by email prefix
at switch "WorkAccount" # Switch by account name
at switch # Auto round-robin to next normal account
# 4. Switch and automatically resume agy session
at switch 2 -c # -c is short for --continue
How to use with OpenCode?
- Go to API Proxy → External Providers → click the OpenCode Sync card.
- 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
- Creates a dedicated provider
- Click Clear Config to remove Manager configuration and clean up legacy entries; click Restore to revert from backup.
- On Windows, the path is
C:\Users\\.config\opencode\(same~/.config/opencoderule).
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?
- Protocol Selection: We recommend using the Gemini protocol.
- Base URL: Set it to
http://127.0.0.1:8045. - 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.
- OpenAI Protocol Limitation: When using OpenAI mode, Kilo Code’s request path will append
How to use Image Generation (Imagen 3)?
Method 1: OpenAI Images API (Recommended)
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:
size: AnyWIDTHxHEIGHTformat (e.g.1280x720,1024x1024,1920x1080), auto-calculates and maps to standard aspect ratios (21:9, 16:9, 9:16, 4:3, 3:4, 1:1)quality:"hd"→ 4K resolution (high quality)"medium"→ 2K resolution (medium quality)"standard"→ Default resolution (standard quality)
n: Number of images to generate (1-10)response_format:"b64_json"or"url"(Data URI)
📝 Changelog
Latest version v5.0.0 (2026-10-24): Adaptive QoS scheduling system via pure peer calibration and ladder probing (sub-second TTFT awareness, peer baselines, transient Suspicious tagging, immediate sticky session handover, and background self-healing ladder probes resolving silent upstream throttling) (Fixes #3720, PR #3725); official model catalog upgrade, tiered thinking protocol (thinkingLevel vs thinkingBudget), and Argon standalone quota isolation, decoupling quotaInfo ingestion gates to eliminate 503 errors and standardizing context windows and output limits across all protocols (Fixes #3735, Fixes #3737); OpenAI Responses API structured outputs (responseSchema / text.format), background thinking budget convergence to 1024 preventing 30s timeouts, pipeline tool conflict mitigation, and guarded code fence unwrapping (Fixes #3710, Ref #3723); Mini floating HUD native macOS transparency, dark/light and 12-language cross-window millisecond sync, native OS main-thread window scheduling eliminating Win32 message loop deadlocks, synchronous frame resolution, and React Router 404 fallbacks (Fixes #3733, Ref #3718, #3721, Ref #3738, Ref #3741); official Base64 sentinel alignment, Claude zero-sentinel and concurrent tool cleanliness, foreign tool transition passports, and zero database persistence; streaming giant tool call buffer promotion to Transition grace period with 180s protection, upstream TTFT watchdog budget convergence to 30s, and FailureStatusTracker integration eliminating Claude 429 leaks (Fixes #3739, Fixes #3713, Ref #3506, Ref #3525, PR #3740, PR #3714); asynchronous streaming batch import pipeline (slashing 494 account imports from 28 minutes to 15~20 seconds, >60x speedup), cold start non-blocking lock decoupling, and local snapshot 0ms hydration eliminating empty flashes (Fixes #3726); cross-platform tray rich-text hover tooltips, macOS status bar quota titles, Linux window focus stealing root-cause fix, and CLI credential overwrite protection (Fixes #3719, Fixes #3728, Fixes #3686); proxy pool dedicated bound account anti-Direct leak protection, Hermes Agent / local probe compatibility (/props, /version), Gemini URL Query auth, and Web/Headless full memory hot-reloading (thanks to @cubelikeplayDaniel, @jeikl).
👉 View Full Changelog → CHANGELOG_EN.md
- License: CC BY-NC-SA 4.0. Strictly for non-commercial use.
- Security: All account data is encrypted and stored locally in a SQLite database. Data never leaves your device unless sync is enabled.
推荐工具
换一个关键词,或者移除筛选条件。
安装
npx skillfish add lbjlaq/antigravity-manager