pi-provider-antigravity
Minimal Antigravity provider for Pi Coding Agent
Package details
Install pi-provider-antigravity from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-provider-antigravity- Package
pi-provider-antigravity- Version
0.8.1- Published
- Sep 14, 2026
- Downloads
- 1,061/mo · 1,061/wk
- Author
- iamxeph
- License
- MIT
- Types
- extension
- Size
- 256.5 KB
- Dependencies
- 0 dependencies · 3 peers
Pi manifest JSON
{
"extensions": [
"./dist/index.js"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-provider-antigravity
Use Google Antigravity models directly in Pi.
⚠️ Disclaimer: This project is intended strictly for educational and research purposes. Unofficial harness use may breach Google's Terms of Service and can cost you your Antigravity access — or, in theory, your whole Google account. Read the full disclaimer before logging in.
Features
- Verified wire compatibility: headers, request envelopes, and tier/thinking mapping strictly validated against the Antigravity protocol specification — not guessed.
- Dynamic model catalog: exposes exactly the models your account can use, synthesized from the live catalog and cached for offline startup. Newly released models are usable immediately without waiting for an extension update.
- OAuth with auto-refresh: log in once via
/login antigravity; tokens refresh silently. - Quota visibility: 5-hour and weekly remaining quota per model pool, with reset times and a live footer slot. See Quota footer.
Requirements
- Pi >= 0.80.0
- A Google account with Antigravity access
Installation
pi install npm:pi-provider-antigravity
Or try it without installing:
pi -e npm:pi-provider-antigravity
Quick Start
- Authenticate:
/login antigravity - Select a model (IDs are dynamic — served from your account's live catalog,
so check
/antigravity modelsfor the current list; example):/model antigravity/gemini-3.8-flash - Check quota:
/antigravity usageGemini Models 5h [##--------] 22% left (in 3h 0m) Wk [#########-] 87% left (in 4d 4h) Claude and GPT models 5h [########--] 84% left (in 2h 0m) Wk [##########] 95% left (in 4d 14h)
Commands
Extension subcommands (/antigravity ...):
| Subcommand | Description |
|---|---|
usage |
Check 5-hour and weekly quota limits and reset times |
models |
View available models and remaining fraction (alias: model) |
refresh |
Fetch the latest model list from Antigravity |
settings |
Configure provider settings (alias: setting) |
login |
Shortcut: fills in /login antigravity for you |
Related Pi builtins:
| Command | Description |
|---|---|
/login antigravity |
Authenticate with Google via OAuth |
/model antigravity/<id> |
Select a model from the live catalog |
Quota footer
Quota tracking right in Pi's footer:
5h 22% (3h 0m) · Wk 87% (4d 4h)
Each segment displays the window name (5h or Wk), remaining capacity percentage, and time left until reset.
Visual Warnings
Remaining percentages are automatically colorized to keep depletion visible without clutter:
- Normal (> 30%): Default terminal color
- Low (≤ 30%): Yellow
- Critical (≤ 10%): Red
In all mode, each window carries its own color based on its remaining percentage.
Display Modes
Switch between display modes at any time using /antigravity settings:
| Mode | Example | Behavior |
|---|---|---|
off (default) |
(hidden) | Slot stays empty; zero background quota requests |
smart |
Wk 6% (2d 14h) |
Shows the window that runs out first, 5h or weekly |
all |
5h 90% (3h 54m) · Wk 6% (2d 14h) |
Shows every window of the pool backing the current model |
Footer placement
The extension never calls setFooter — it only publishes the slot text under the key pi-provider-antigravity-footer-usage via setStatus. Where that text renders is up to your footer; Pi's built-in one gives it its own line, below the default two.
To move it elsewhere (the right side of the first line, for example), ask Pi in a session and name the key:
Move the
pi-provider-antigravity-footer-usageslot to the right side of the first footer line, keeping the rest of the footer as it is.
Pi edits your own footer extension, creating one if you have none — based on Pi's complete custom-footer example, which Pi maintains. A custom footer replaces the built-in one, so Pi has to redraw whichever lines you want to keep.
Under the Hood
- Model-aware pool routing: Automatically aligns with your active model. Selecting a Gemini model displays the Gemini quota pool; switching to Claude or GPT switches to the third-party pool. When using a non-Antigravity model or no model at all, the slot cleanly disappears.
- Bottleneck detection: In
smartmode, the extension determines urgency usingmin(r5h, rWk × R)rather than a naive percentage comparison, accounting for total volume differences between the 5-hour and weekly pools. The volume multiplierRstarts at 6.0 and automatically self-calibrates between 1.0 and 20.0 based on real usage deltas, persisting across restarts. - Battery- and network-friendly caching: Idle sessions perform zero network requests. The slot repaints instantly from memory on turn completion, session launch, and model changes. Upstream quota queries are throttled to at most once every 5 minutes. Running
/antigravity usagerefreshes upstream data immediately.
Configuration
You can configure extension preferences interactively via the command palette or declaratively through a configuration file.
Interactive Settings
Run the settings command to open Pi's native cycling menu:
/antigravity settings
- Press Enter or Space to cycle through option values.
- Press Esc to close.
- Changes are saved and applied immediately.
File-based Configuration
Configuration is stored in pi-provider-antigravity.json alongside Pi's settings.json (resolved via $PI_CODING_AGENT_DIR, falling back to ~/.pi/agent/):
{
"settings": {
"quotaFooter": "smart"
}
}
Note: Alongside
"settings", the extension persists runtime metadata (such as quota calibration) under a top-level"states"key. Keep the file valid JSON (no comments). An unparseable file is never overwritten: the extension falls back to default settings, refuses/antigravity settingswrites, and stops persisting quota calibration. If you cannot repair it, delete the file to reset to fresh defaults; the next write recreates it.
Available Settings
| Key | Values | Default | Description |
|---|---|---|---|
quotaFooter |
off, smart, all |
off |
Show remaining quota in Pi's status footer. See Quota footer. |
Disclaimer
Educational and Research Purpose Only:
This project is developed and provided strictly for educational, personal research, and protocol interoperability study purposes. It is not intended for production environments or commercial use.
Terms of Service & Account Risks:
This extension interacts with Google account services from a third-party harness — which the Antigravity ToS (§6) explicitly addresses regarding third-party harness access over OAuth. Read this before logging in:
- Stated enforcement: Antigravity and/or Gemini CLI accounts. Per §6, third-party access "may be grounds for suspension or termination of your Antigravity and/or Gemini CLI accounts" (they share quota).
- Residual risk: your whole Google account. The ToS also binds users to the Universal Google Terms (§1), which allow Google to suspend access to services or terminate accounts for breach of service-specific terms.
The maintainers assume no responsibility or liability for any account actions, quota consumption, or damages resulting from the use of this software. Use strictly at your own discretion and risk.
License
MIT