opencode-antigravity-auth README

The project's README from github.com/NoeFabris/opencode-antigravity-auth. As one markdown file: README.md.

Antigravity + Gemini CLI OAuth Plugin for Opencode

npm version npm beta npm downloads License: MIT X (Twitter)

Enable Opencode to authenticate against Antigravity (Google's IDE) via OAuth so you can use Antigravity rate limits and access models like gemini-3.1-pro and claude-opus-4-6-thinking with your Google credentials.

Unofficial plugin. Google may restrict accounts using third-party clients.

Special Thanks

Infistar.cc, leading AI models with one API key

Claude, GPT, Gemini and more with one API key at Infistar.cc. Sign up through the link to get CNY 5 in free credit.

Setup

Requires OpenCode 2.1.2+ and Node.js 20+.

Add to ~/.config/opencode/opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "plugins": ["[email protected]"]
}

Then run:

opencode auth login google

Choose Google OAuth (Antigravity). Existing accounts are reused.

To use a local checkout, run npm ci && npm run build and replace the package name above with the checkout's absolute path.

Use

opencode models
opencode run --model=google/antigravity-gemini-3.8-flash-high "Hello"
opencode run --model=google/antigravity-claude-opus-4-6-thinking#max "Hello"

Models are discovered from your enabled accounts and cached for an hour. Availability depends on your Google plan. Select an antigravity-* model for Google OAuth. Native Google API-key models are hidden while Antigravity OAuth is selected and return when you switch to an API-key connection.

Inside OpenCode, open /antigravity (or /ag) to:

The account list shows the lowest cached quota across Claude, Gemini Pro, and Gemini Flash. Choose Check quotas / verify enabled accounts to refresh the saved quota data. Refresh quotas if an older cache shows a percentage without a reset time.

Accounts are stored in ~/.config/opencode/antigravity-accounts.json. Back up this file before moving machines; it contains credentials. Disabling an account excludes it from rotation and routine quota checks.

Development

npm ci
npm run typecheck
npm test
npm run build
OPENCODE_BIN=/path/to/opencode npm run test:e2e:v2

The runtime test uses synthetic credentials. Authenticated model and menu checks require a logged-in Google account.

V2 migration and verification · Configuration · Troubleshooting

OpenCode 1.18.29+ remains supported through the legacy entrypoint; its account menu opens from opencode auth login.

opencode-antigravity-auth (NoeFabris/opencode-antigravity-auth)

Searching Database…

What is this?It's an OpenCode plugin that authenticates via Google OAuth against Antigravity (Google's IDE), letting OpenCode use Antigravity's quota to run models like Gemini 3.1 Pro and Claude Opus 4.6-thinking under your own Google account instead of a separate API key.
Is this a standalone app or just an OpenCode add-on?It's only a plugin you add to OpenCode's config array — it doesn't run on its own and is meant to sit alongside other OpenCode plugins.
How do I install and configure it?Add the plugin to the plugin array in ~/.config/opencode/opencode.json, run 'opencode auth login' → Google → OAuth with Google (Antigravity), then pick 'Configure models in opencode.json' to auto-add all the model definitions.
Do I need a Google Cloud API key, or just my Google account?No separate API key is required for normal use — you log in with your Google account via OAuth, and can add multiple accounts for more combined quota. You only need to create a Google Cloud project with the Gemini API enabled if you hit a specific 403 error on Gemini CLI models.
Does using this violate Google's Terms of Service?Yes — the README explicitly warns this violates Google's ToS, and some users have had their Google accounts banned or shadow-banned for using it.
Does setup differ between Windows, macOS, and Linux?The config path is identical on every OS (~/.config/opencode/, including on Windows where ~ still resolves to the user's home folder), though OAuth callbacks need extra steps on Safari/macOS, WSL2, SSH, and inside Docker.
Where are my Google credentials stored?OAuth account data is stored locally in a JSON file inside your OpenCode config folder, not sent anywhere else by the plugin.
What models can I actually access through this?Claude Opus 4.6 / Sonnet 4.6 and Gemini 3.1 Pro / Flash via the Antigravity quota, plus Gemini 2.5 and 3 Pro/Flash via the separate Gemini CLI quota, with automatic fallback between the two pools when one runs out.
How does multi-account rotation work?You add several Google accounts and the plugin automatically rotates between them when one is rate-limited, using a sticky, hybrid, or round-robin strategy depending on how many accounts you have.
Is this project still actively maintained?The repository is marked archived on GitHub, so although the README documents an actively evolving plugin with a beta channel, it's no longer getting new work from this repo.
What happens if an MCP server breaks this plugin?Antigravity's strict schema validation can choke on malformed MCP tool schemas (for example tool names starting with a digit); the fix is to disable MCP servers one by one or rename the offending tool key until the error disappears.
Creator
NoeFabris
Size
1.7 MB
Stars
11.1K
Age
11mo
Commits · 90 Days