pi-antigravity-multi-account
Standalone Antigravity / Google Cloud Code provider with multi-account support for Pi Coding Agent
Package details
Install pi-antigravity-multi-account from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-antigravity-multi-account- Package
pi-antigravity-multi-account- Version
0.2.0- Published
- Oct 20, 2026
- Downloads
- 960/mo · 42/wk
- Author
- mrwyck
- License
- MIT
- Types
- extension
- Size
- 139.7 KB
- Dependencies
- 1 dependency · 2 peers
Pi manifest JSON
{
"extensions": [
"./src/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
Overview
pi-antigravity-multi-account is a native provider extension for the Pi Coding Agent that enables direct access to Google Cloud Code and Antigravity models (Gemini Flash, Claude 3.7/Sonnet, Opus, and GPT-OSS).
It features native OAuth authentication, seamless switching across multiple Google accounts, real-time quota pool monitoring, and automatic token refresh without requiring external CLI dependencies.
Features
- Standalone Native Provider: Direct
streamSimpleimplementation with zero external binaries or CLI dependencies. - Interactive Account Switcher: Select and switch accounts dynamically via a terminal picker (
/antigravity.account). - Single-Step Alias Authentication: Link multiple Google accounts under custom named aliases (
/antigravity.account login <alias>). - Simultaneous Quota Dashboard: Inspect remaining hourly and weekly quota pools across all stored accounts simultaneously.
- Zero-Downtime Session Reloading: Switching accounts purges model/project caches and invokes live session reloading immediately.
- Resilient Request Handling: Exponential backoff retry with jitter on
429 (Too Many Requests)and503 (Service Unavailable). - Connection Prewarming: Pre-establishes TLS handshakes with persistent keep-alive pools to eliminate cold-start latency.
- Secure Local Storage: Credentials are saved to
~/.pi/agent/antigravity-accounts.jsonwith strict POSIX0o600permissions.
Compatibility
- Requires Pi 1.3.0 or newer; development and regression tests target 1.3.0.
- This remains a native Cloud Code provider, not a wrapper around
agy. Existing Pi OAuth and account aliases stay independent of Google's shared OS-keyring login. - Google's official CLI installer resolved to 1.4.2 when checked on October 20, 2026. Its release version does not establish compatibility with this unofficial wire protocol.
- The native User-Agent uses CLI 1.4.2 and build changelist 1001591392 extracted from the installed official binary. This is static verification, not a captured runtime request; enterprise/ADC authentication, shared keyring credentials, and full CLI parity are not claimed.
- Pi request payload, response-header, and provider-stream observation hooks are supported.
Installation
Via npm (Recommended)
pi install npm:pi-antigravity-multi-account
To upgrade:
pi update npm:pi-antigravity-multi-account
Via Git
pi install git:andrraa/pi-antigravity
To upgrade:
pi update git:andrraa/pi-antigravity
Multi-Account Guide
Manage accounts and quotas using the /antigravity.account command:
| Subcommand | Syntax | Description |
|---|---|---|
| (none) | /antigravity.account |
Open interactive terminal account picker |
login |
/antigravity.account login <alias> |
Authenticate a new Google account via OAuth and assign an alias |
use / switch |
/antigravity.account use <alias> |
Switch active account and trigger live session reload |
list / ls |
/antigravity.account list |
List all saved accounts with active account indicator (● [active]) |
usage / quota |
/antigravity.account usage |
Check real-time quota status across all saved accounts |
save |
/antigravity.account save <alias> |
Save current active session credentials under a new alias |
rename |
/antigravity.account rename <old> <new> |
Rename an existing account alias |
delete / rm |
/antigravity.account delete <alias> |
Remove an account from storage |
Common Workflows
# 1. Authenticate multiple Google accounts
/antigravity.account login work
/antigravity.account login personal
# 2. Check quota pools across all accounts
/antigravity.account usage
# 3. Switch active account
/antigravity.account use work
# 4. Open interactive account picker
/antigravity.account
Provider Commands
| Command | Description |
|---|---|
/antigravity.account [subcommand] |
Manage multi-account profiles, switch accounts, and monitor quotas |
/antigravity.usage |
Show active account quota pools (Gemini / Claude + GPT, 5h reset & weekly) |
| Model ID | Thinking Support | Max Output | Description |
|---|---|---|---|
antigravity/gemini-3.8-flash |
Off, Minimal, Low, Medium, High, XHigh | 64k tokens | Latest generation multimodal agent model |
antigravity/gemini-3.7-flash |
Off, Minimal, Low, Medium, High, XHigh | 64k tokens | High-performance multimodal reasoning model |
antigravity/gemini-3.6-flash |
Low, Medium, High | 64k tokens | Fast agentic Flash model |
antigravity/gemini-3.5-flash |
Minimal, Low, Medium, High | 64k tokens | Efficient Flash model |
antigravity/gemini-3.1-pro |
Low, High | ~64k tokens | Advanced reasoning model |
antigravity/claude-sonnet-4-6 |
Thinking (Minimal to XHigh) | 64k tokens | Anthropic Claude Sonnet with extended reasoning |
antigravity/claude-opus-4-6 |
Thinking (Minimal to High) | 64k tokens | Anthropic Claude Opus with deep reasoning |
antigravity/gpt-oss-120b |
Medium | 32k tokens | Open-source large parameter model |
| Variable | Description | Default |
|---|---|---|
ANTIGRAVITY_BASE_URL |
Override the Google Cloud Code endpoint URL | https://cloudcode-pa.googleapis.com |
ANTIGRAVITY_PROJECT_ID |
Override Google Cloud Project ID explicitly | Auto-discovered or derived from user email |
ANTIGRAVITY_NO_PREWARM |
Disable TLS prewarming on extension load (1 or true) |
Disabled (prewarming enabled) |
ANTIGRAVITY_USER_AGENT |
Custom User-Agent header string | Standard Google Cloud Code client user agent |
# Bump version
npm version patch # or minor / major
# Publish to npm registry
npm publish --access public
- This project is an independent, community-maintained, and unofficial extension. It is not affiliated with, endorsed by, sponsored by, or associated with Google LLC, Alphabet Inc., or Anthropic.
- Use at your own risk. Users are solely responsible for compliance with the Terms of Service of Google Cloud, Google Accounts, and applicable third-party API agreements.
- The authors assume no liability or responsibility for account restrictions, suspensions, data loss, quota depletion, or billing impact resulting from the use of this software.
License
This project is licensed under the MIT License.