Antigravity-Tools-LS 是一款专门为 Antigravity IDE 设计的本地代理桥接系统。
Antigravity-Tools-LS 是一款专门为 Antigravity IDE 设计的本地代理桥接系统。
If you find this project helpful, please consider supporting the author!
| Alipay | WeChat Pay | Buy Me a Coffee |
|---|---|---|
This project adopts a Pure Native LS Path technical architecture:
It exposes standard OpenAI / Anthropic / Gemini APIs externally, while internally delegating requests entirely to the native Antigravity Language Server (ls_core) process.
Unlike Antigravity-Manager, this system will:
ls_core.ls_core process establishes an HTTPS/gRPC connection directly with Google backend, ensuring the request characteristics are 100% identical to the official plugin.ls_core at the application layer to extract Tool Call tags, image generation results, and Cascade agent states./v1/chat/completions), Anthropic (/v1/messages), and Gemini Native APIs.SubscribeToUnifiedStateSync interface, supporting real-time Token updates pushed to memory without restarting the LS process.state.vscdb using atomic writes.ls_core and certificates from .dmg (macOS), .deb (Linux), .exe (Windows), and .tar.gz.Auto (smart comparison), LocalOnly (from local install), and ForceRemote (force cloud pull).graph TD
Client([External Client]) -->|OpenAI/Anthropic| AXUM[Axum HTTP Server]
AXUM -->|Auth/Routing| ACC[Account Manager]
ACC -->|Selected Account| ORCH[LS-Orchestrator]
ORCH -->|1. Start/Reuse| LS[Native ls_core Process]
ORCH -->|2. Inject Token| EXTSV[Internal Extension Server]
EXTSV -.->|Connect+Proto| LS
LS -->|3. Direct Google Connection| GOOGLE[Google Cloud Code Assist]
GOOGLE -->|gRPC Stream| LS
LS -->|4. Raw Output| TRANS[Transcoder Engine]
TRANS -->|5. SSE Format Conversion| Clienttranscoder-core: Core transcoding engine. Responsible for gRPC stream to SSE conversion, and XML tags to structured JSON parsing.ls-orchestrator: Process orchestration layer. Manages TTL cleanup, LRU reclaim, and Token injection for ls_core instances.ls-accounts: Storage layer. Manages SQLite-based account pool, quota details, and authentication stats.cli-server: Application gateway. Aggregates routing, asset provisioning engine, and Web Dashboard static resources.desktop: Desktop application. Cross-platform client built on Tauri (WIP).Linux / macOS:
curl -fsSL https://raw.githubusercontent.com/lbjlaq/Antigravity-Tools-LS/main/install.sh | bashWindows (PowerShell):
irm https://raw.githubusercontent.com/lbjlaq/Antigravity-Tools-LS/main/install.ps1 | iexIf you have Homebrew installed, you can also install via:
# 1. Tap the repository
brew tap lbjlaq/antigravity-tools-ls https://github.com/lbjlaq/Antigravity-Tools-LS
# 2. Install the application
brew install antigravity-tools-ls# Clone the repository
git clone https://github.com/lbjlaq/Antigravity-Tools-LS.git && cd Antigravity-Tools-LS
# Compile and run (default port 5173)
RUST_LOG=info cargo run --bin cli-server
# Use a custom backend port
PORT=5188 RUST_LOG=info cargo run --bin cli-server
# If you also run the Vite dashboard in dev mode, point the proxy to the same backend
VITE_BACKEND_PORT=5188 npm --prefix apps/web-dashboard run devRunning via Docker on NAS or servers is recommended for optimal lifecycle management:
docker run -d \
--name antigravity-ls \
-p 5188:5188 \
-e PORT=5188 \
-e RUST_LOG=info \
-v ~/.antigravity-ls-data:/root/.antigravity_tools_ls \
lbjlaq/antigravity-tools-ls:latest[!CAUTION] Workspace Visibility Limitations in Remote Docker Deployment: When deploying this project via Docker on a remote server (e.g., VPS or NAS), the LS engine inside the container cannot directly read your local workspace code files.
- Reason: Filesystems across different devices are physically isolated. Processes inside the container can only access paths within the container or those mounted via Volumes.
- Impact: While API forwarding will work, advanced features like "Project-wide Code Search" or "Symbol Definitions" (which depend on context) will fail because the LS engine cannot locate the source code.
- Recommendation: For full functionality, ensure the LS service and your code files share the same filesystem view (i.e., run the Docker or binary locally on your development machine).
[!WARNING] Low Memory OOM Warning: High concurrency queries may cause
ls_coreto instantly allocate a massive amount of memory (peak >2GB). When deploying on servers with less than 2GB RAM, you must configure at least 5GB of Swap. See the OOM Troubleshooting Guide for details.
[!IMPORTANT] Notice for Windows Users (ASSET SYNC DEPENDENCY): To enable "Zero-Config Asset Sync" (automatic download and extraction of the core), 7-Zip must be installed, and the
7zexecutable must be in your systemPATH. Recommended: Install viascoop install 7ziporchoco install 7zip. Manual Alternative: If you prefer not to install 7-Zip, manually place the extractedls_coreandcert.pemfrom the official installer into thebin/directory.
This project has bidirectional self-healing capabilities for assets and versions. The system automatically ensures strict consistency between the runtime ls_core binary and the version model signature (simulated_version) sent to Google, completely eliminating manual intervention.
execution_id from the official auto-update API and streams down the appropriate asset packages for the platform to perform atomic replacements.data/ls_config.json, ensuring subsequent Request Header signatures perfectly match the physical binary versions and fundamentally preventing 403 Forbidden errors.Can be dynamically switched via PUT /v1/settings or environment variables:
Auto (Default): Local priority. Falls back to Cloud if native App isn't installed locally.LocalOnly: Strictly extracts only from locally installed Apps. Ideal for offline or restricted environments.ForceRemote: Ignores local Apps and forcefully pulls the latest assets from cloud repositories.Although the system supports fully automatic alignment, you can manually override:
ls_core and cert.pem directly into the bin/ directory.version field in data/ls_config.json to override the simulated version.The scope of supported models and usages is highly consistent with the Antigravity series.
The Model Alias forwarding feature has not yet been achieved. An exact Model ID must be stringently used during API requests:
| Provider | Model ID |
|---|---|
| Gemini | gemini-3.1-pro-high, gemini-3.1-pro-low, gemini-3-flash-agent |
| Claude | claude-sonnet-4-6, claude-opus-4-6-thinking |
| Others | gpt-oss-120b-medium |
Thinking process. This feature has been added to the roadmap and is under active development.| Method | Path | Protocol Format |
|---|---|---|
POST |
/v1/chat/completions |
OpenAI Chat (Stream Support) |
POST |
/v1/messages |
Anthropic Claude |
POST |
/v1beta/models/:model |
Google Gemini SDK |
POST |
/v1/responses |
OpenAI Responses API |
| Method | Path | Function |
|---|---|---|
GET |
/v1/instances |
View active LS instance pool |
DELETE |
/v1/instances/:id |
Manually reclaim/terminate LS instance |
GET |
/v1/provision/status |
Query asset sync status and paths |
POST |
/v1/provision/sync |
Force trigger asset realignment |
/tmp/antigravity_workspace) for the Cascade Agent, fully unlocking the AI agent's ability to read arbitrary local codebase directories on the host machine.usage payloads in Anthropic streaming outputs and added a /v1/messages/count_tokens preflight mock endpoint to perfectly support Cherry Studio and the official Claude CLI tool.gemini-3.1-pro-high) into memory and the frontend UI when quota detection fails or new accounts haven't synced models, preventing blank UI screens and missing API models.AssetProvisioner logic to immediately skip meaningless cloud downloads once an aligned locally installed Antigravity version is sniffed, speeding up the server startup.x-goog-api-key headers and暂无开放 Issues,或尚未同步最近议题。