Skip to content

About

Google Antigravity OAuth for OpenCode and Pi

Resources

Stars

85 stars

Watchers

1 watching

Forks

Latest commit

 

History

2,055 Commits

Folders and files

Repository files navigation

Antigravity Auth

Caution

Google's Antigravity terms forbid how this plugin works. Using it can get your Antigravity access suspended.

  • Since 1 December 2026, section 6 of the Antigravity terms forbids (a) using Antigravity credentials such as OAuth tokens directly in third-party software, and (b) repurposing Antigravity as a raw model proxy for another agent loop. This plugin does both.
  • Google says a violation suspends Antigravity access, with an appeal path, and has no impact on the rest of your Google account. Before that change, users reported whole Google accounts suspended with 403 PERMISSION_DENIED / TOS_VIOLATION, and the suspension also blocked Google's own Antigravity CLI (#74).
  • The same terms permit running the unmodified Antigravity CLI as a tool or subagent, in headless mode or over the agent client protocol. That is the route Google allows.
  • Don't use an account whose Antigravity access you can't afford to lose.

This project is not endorsed by Google or the model providers. You are responsible for compliance with provider terms, and you use it at your own legal, financial and technical risk.

Never share OAuth tokens, browser cookies, account files, bearer tokens, or raw request/response dumps in Git, issues, or chat.

Use Google Antigravity from OpenCode 1, OpenCode 2, or the Pi coding agent. Sign in with Google to use Antigravity quota for Gemini and Claude models, rather than supplying a pay-as-you-go Google API key.

The host packages are @cortexkit/opencode-antigravity-auth and @cortexkit/pi-antigravity-auth. Both use the shared @cortexkit/antigravity-auth-core library.

Why use it

  • An Antigravity model catalog with supported thinking variants.
  • A shared OpenCode account pool—Google accounts added to the plugin—with rotation, quota, cooldowns, and limits.
  • An /antigravity menu on all three hosts. The OpenCode sidebar shows account and quota information; Pi's menu shows its credential source and vault choices, not quota readings.
  • An approved Claustrum vault can supply credentials instead of local logins.
  • A bundled antigravity-auth command-line interface for login, account listing, and quota checks.

Pi local mode uses Pi's native Google login, not the OpenCode account pool. Pi uses one account at a time, even with a vault, and does not rotate accounts or enforce quota floors.

Gemini 4 Hydrogen is supported with low, medium, high (default), and xhigh thinking levels on OpenCode 2 and Pi. OpenCode 1 offers low, medium and high only, because its built-in Google library drops xhigh. Hydrogen requires a Pro or Ultra subscription in Google Antigravity.

Gemini 4 Neon (google/antigravity-gemini-4-neon) uses the ordinary Gemini quota pool. Its context window is 512K tokens. Its thinking levels are low, medium and high (default, as in the Antigravity app; Google's model page lists Medium), plus xhigh on OpenCode 2 and Pi. As with Hydrogen, OpenCode 1 cannot pass xhigh to the plugin.

Install

Quit all OpenCode and Pi processes, then run:

npx @cortexkit/opencode-antigravity-auth setup

Setup detects installed hosts and configures the plugin for local Google sign-in or optional, operator-approved Claustrum vault enrollment. Review the setup and configuration guide, including stopped-host checks and dry-run behavior.

Before any major plugin upgrade, disable automatic updates. Unmigrated OpenCode account files from the plugin's 2.x releases require the offline migration and rollback procedure.

OpenCode 2: sign in with Google (antigravity-auth pool, browser), then select the saved Antigravity connection to use the plugin's accounts; requests carrying a real Google key or native login credential pass through unchanged.

After setup, run opencode auth login → Google and choose Google (antigravity-auth pool, browser) as the login method; afterward, select the saved connection labeled Antigravity. Setup does not perform this OpenCode 2 login. For approved vault mode, choose Use approved Antigravity vault instead. See the menu guide for actions by host and credential source.

Documentation

Guide Contents
Configuration and manual installation Guided setup, host-specific registration, options, state paths, and credential safety
Settings by host Which settings apply on OpenCode 1, OpenCode 2, and Pi, by credential source
Accounts, routing, and quota Shared pool, account selection, cooldowns, quota thresholds, and limits
Models and thinking variants Current model families, retired routes, and capture limitations
Troubleshooting Callback, credential, transport, and TUI recovery
Claustrum vault Enrollment, custody, activation, and safe disconnection
Commands /antigravity, standalone CLI, and Pi login
OpenCode 2 Pool browser login, saved connections, and request ownership
Migration and rollback Offline upgrade/downgrade and auto-update precautions
Development and release Build, test, package, and release workflow

For implementation details, see Architecture, Codebase structure, and the OpenCode changelog.

License

MIT. See LICENSE.

About

Google Antigravity OAuth for OpenCode and Pi

Resources

Stars

85 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages