Antigravity Token Monitor
by riandycandra
README.md
# Antigravity Token Monitor
Local telemetry tools for **Google Antigravity** (VS Code extension, Antigravity Desktop, and Antigravity IDE) that read `~/.gemini/antigravity/brain/<conversation-id>/.system_generated/logs/transcript.jsonl` to display live token usage, context window headroom, cache hit rate, and estimated TPS.
Everything runs **100% locally** on your machine. No external network calls, analytics, or telemetry.
---
## 1. Antigravity Plugin (Side Pane & Sidebar)
An MCP App plugin rendered inside Antigravity's **Side Pane (`aux_pane`)** and **Left Sidebar (`global`)**:
- **Context window meter** (stacked Cached + New Input vs. Free headroom, with `200k` / `1M` / `2M` presets)
- **Estimated TPS** (`lastTurnTps` & `avgTps` from step timestamps)
- **Session totals ledger** (Total processed, Cache hit %, Uncached input, Output generated)
- **Context growth chart** across recent turns (keyboard & mouse inspectable)
- **By model** and **Recent sessions** tabs with live 3-second auto-refresh
### Install
```sh
agy plugin install https://github.com/riandycandra/antigravity-token-monitor
```
Then open **Token Monitor** from the `+` menu in the side pane, under **Plugins** in the left sidebar, or ask *"Open the Token Monitor"* in chat.
---
## 2. VS Code / Open VSX Status Bar Extension
A lightweight, zero-dependency status bar item showing live stats in the bottom bar of VS Code, Antigravity IDE, Cursor, or Windsurf:
```text
Ctx 327.0k (33%) · Cache 86.1% · In 5.46M · Out 318.2k · ~81 t/s
```
- **Hover**: shows exact counts and a per-model breakdown table
- **Click**: opens a QuickPick menu to switch/pin conversations, refresh immediately, or cycle context limits (`200k` / `1M` / `2M`)
- **Warning highlight**: turns amber at `>= 75%` and red at `>= 90%` of the configured context limit
### Install
- **Open VSX Registry** (Antigravity IDE, Cursor, Windsurf, VSCodium): search for **`riandycandra.antigravity-token-statusbar`** in the Extensions panel, or visit:
`https://open-vsx.org/extension/riandycandra/antigravity-token-statusbar`
- **GitHub Releases (VS Code `.vsix`)**: download `riandycandra.antigravity-token-statusbar-1.0.0.vsix` from [Releases](https://github.com/riandycandra/antigravity-token-monitor/releases) and run:
```sh
code --install-extension riandycandra.antigravity-token-statusbar-1.0.0.vsix
```
---
## Development & Building from Source
```sh
# Rebuild the Antigravity MCP App bundle (dist/app.html + zero-dependency dist/server.cjs)
pnpm install
node scripts/build.mjs
# Package the VS Code / Open VSX .vsix
node vscode-statusbar/build-vsix.mjs
```
## License
MIT
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues