opencode-antigravity-auth
v1.0.7
Published
Google Antigravity IDE OAuth auth plugin for Opencode - access Gemini 3 Pro and Claude 4.5 using Google credentials
Maintainers
Readme
Antigravity OAuth Plugin for Opencode
Enable Opencode to authenticate against Antigravity (Google's IDE) via OAuth so you can use Antigravity rate limits and access models like gemini-3-pro-high and claude-opus-4-5-thinking with your Google credentials.
What you get
- Google OAuth sign-in with automatic token refresh
- Antigravity API compatibility for OpenAI-style requests
- Debug logging for requests and responses
- Drop-in setup—Opencode auto-installs the plugin from config
Quick start
- Add the plugin to config (
~/.config/opencode/opencode.jsonor project.opencode.json):
{
"plugin": ["[email protected]"]
}- Authenticate
- Run
opencode auth login. - Choose Google → OAuth with Google (Antigravity).
- Sign in via the browser and return to Opencode. If the browser doesn’t open, use the printed link.
- Declare the models you want
Add Antigravity models under the provider.google.models section of your config:
{
"plugin": ["opencode-antigravity-auth"],
"provider": {
"google": {
"models": {
"gemini-3-pro-high": {
"name": "Gemini 3 Pro High (Antigravity)",
"limit": {
"context": 1048576,
"output": 65535
}
},
"gemini-3-pro-low": {
"name": "Gemini 3 Pro Low (Antigravity)",
"limit": {
"context": 1048576,
"output": 65535
}
},
"claude-sonnet-4-5": {
"name": "Claude Sonnet 4.5 (Antigravity)",
"limit": {
"context": 200000,
"output": 64000
}
},
"claude-sonnet-4-5-thinking": {
"name": "Claude Sonnet 4.5 Thinking (Antigravity)",
"limit": {
"context": 200000,
"output": 64000
}
},
"claude-opus-4-5-thinking": {
"name": "Claude Opus 4.5 Thinking (Antigravity)",
"limit": {
"context": 200000,
"output": 64000
}
},
"gpt-oss-120b-medium": {
"name": "GPT-OSS 120B Medium (Antigravity)",
"limit": {
"context": 131072,
"output": 32768
}
}
}
}
}
}- Use a model
opencode run "Hello world" --model=google/gemini-3-pro-highDebugging
Enable verbose logging:
export OPENCODE_ANTIGRAVITY_DEBUG=1Logs are written to the current directory (e.g., antigravity-debug-<timestamp>.log).
Development
npm installSafety, usage, and risk notices
Intended use
- Personal / internal development only
- Respect internal quotas and data handling policies
- Not for production services or bypassing intended limits
Not suitable for
- Production application traffic
- High-volume automated extraction
- Any use that violates Acceptable Use Policies
⚠️ Warning (assumption of risk)
By using this plugin, you acknowledge and accept the following:
- Terms of Service risk: This approach may violate the Terms of Service of AI model providers (Anthropic, OpenAI, etc.). You are solely responsible for ensuring compliance with all applicable terms and policies.
- Account risk: Providers may detect this usage pattern and take punitive action, including suspension, permanent ban, or loss of access to paid subscriptions.
- No guarantees: Providers may change APIs, authentication, or policies at any time, which can break this method without notice.
- Assumption of risk: You assume all legal, financial, and technical risks. The authors and contributors of this project bear no responsibility for any consequences arising from your use.
Use at your own risk. Proceed only if you understand and accept these risks.
Legal
- Not affiliated with Google. This is an independent open-source project and is not endorsed by, sponsored by, or affiliated with Google LLC.
- "Antigravity", "Gemini", "Google Cloud", and "Google" are trademarks of Google LLC.
- Software is provided "as is", without warranty. You are responsible for complying with Google's Terms of Service and Acceptable Use Policy.
Credits
- Inspired by and different from opencode-gemini-auth by jenslys. Thanks for the groundwork! 🚀
- Thanks to CLIProxyAPI for the inspiration.
