# Antigravity Code Mode (`antigravity-code-mode`) > Unofficial, open-source Code Mode plugin built exclusively for Google Antigravity (Desktop App/IDE and Antigravity CLI). Combines a QuickJS-NG WebAssembly sandbox in `worker_threads`, a 0 ms BM25 + compact `.d.ts` MCP schema indexer, a Runtime Host Policy Broker with `fs.realpathSync` path jail and secret scrubbing, automatic off-context `$ref` output spilling, and a live `aux_pane` MCP App Inspector — distributed with zero runtime npm dependencies (`"dependencies": {}`). - Canonical Site: https://yunusemrejs.github.io/antigravity-code-mode/ - GitHub Repository: https://github.com/yunusemrejs/antigravity-code-mode - npm Package: https://www.npmjs.com/package/antigravity-code-mode - Full Single-File Technical Reference: https://raw.githubusercontent.com/yunusemrejs/antigravity-code-mode/main/llms-full.txt - Author: Emre Kara (`yunusemrejs`) — https://yunusemrejs.github.io ## Core Capabilities - **4 Eager MCP Tools (~316 tokens):** `cm_search`, `cm_execute`, `cm_inspect`, `cm_open_inspector` (plus app-only `cm_inspector_snapshot`, `cm_inspector_action`). - **QuickJS-NG WASM Sandbox:** Linear memory cap (`64 MB` default / `256 MB` max), wall-clock preemption via `worker.terminate()`, `1.61 ms` warm p50 latency, TypeScript stripping built in. - **0 ms Cold Schema Discovery:** Indexes `~/.gemini/antigravity/mcp//.json` and Antigravity `mcp_config.json` without spawning upstream servers. - **Measured Benchmarks (`node bench/run-bench.mjs --json`, Apple M1 Pro, Node v24.13.0):** - Aggregate: `40,894` naive tokens -> `904` Code Mode tokens (**97.79% reduction**); `32` -> `3` LLM round-trips (**90.63% reduction**). - 60-Tool MCP Catalog: `5,945` -> `601` tokens (**89.89% reduction**; **94.68%** eager-only); `0.53 ms` index, `0.78 ms` BM25 search. - 24-File TS Audit: `6,626` -> `122` tokens (**98.16% reduction**); `26` -> `1` turn (**96.15%**). - 113 KB Incident Filter: `28,323` -> `181` tokens (**99.36% reduction**); auto `$ref` spill preview **98.19%** reduction. ## Documentation Links - [README](https://raw.githubusercontent.com/yunusemrejs/antigravity-code-mode/main/README.md): Overview, quick install, comparisons, FAQs, citation. - [Architecture](https://raw.githubusercontent.com/yunusemrejs/antigravity-code-mode/main/docs/ARCHITECTURE.md): Two-plane design, WASM worker bridge, BM25 `.d.ts` compiler, multiplexer. - [Security](https://raw.githubusercontent.com/yunusemrejs/antigravity-code-mode/main/docs/SECURITY.md): Threat model, PolicyBroker, path jail, sensitive path denylist, secret redaction. - [Benchmarks](https://raw.githubusercontent.com/yunusemrejs/antigravity-code-mode/main/docs/BENCHMARKS.md): Reproducible harness methodology and raw measured metrics. - [Full Technical Reference (`llms-full.txt`)](https://raw.githubusercontent.com/yunusemrejs/antigravity-code-mode/main/llms-full.txt): Complete self-contained specification for LLM ingestion.