npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@danprat/opencode2-antigravity

v0.6.1

Published

OpenCode 2.0 plugin that connects Google Antigravity / Cloud Code Assist models (Gemini, Claude, GPT-OSS) to OpenCode via AI SDK LanguageModelV3.

Readme

@danprat/opencode2-antigravity

npm version license

opencode2-antigravity is an OpenCode 2.0 plugin that connects OpenCode directly to Google Antigravity / Cloud Code Assist models — Gemini (3.8 Flash, 3.7 Flash, 3.6 Flash, 3.1 Pro), Claude (Sonnet 4.6, Opus 4.6), and GPT-OSS (120b).

It handles Google OAuth login (PKCE), native SSE streaming, thinking levels, model routing, and quota diagnostics internally without external CLI dependencies.

Unofficial integration. This project is not affiliated with or endorsed by Google. Use it only with an account and services you are authorized to access.


Features

  • Native OpenCode 2.0 Architecture: Implements 2.0 hooks and transforms (ctx.provider.transform, ctx.integration.transform, ctx.aisdk.hook, ctx.tool.transform).
  • Complete Model Catalog: Gemini 3.8/3.7/3.6/3.5, Claude Sonnet/Opus, and GPT-OSS with thinking effort levels (Low, Medium, High).
  • In-Memory Inventory: Registers models and providers directly in memory without modifying your opencode.json.
  • Integrated Authentication: Seamless OAuth PKCE flow via OpenCode 2.0 /connect command.
  • Built-in Tools & Commands: Image generation (/antigravity-image), quota summary (/antigravity-usage), and runtime model inspector (/antigravity-models).

Installation

Add the plugin to your OpenCode 2.0 configuration (~/.config/opencode/opencode.json):

{
  "$schema": "https://opencode.ai/config.json",
  "plugins": ["@danprat/opencode2-antigravity/plugin/opencode2"]
}

OpenCode 2.0 will automatically download and activate the plugin on startup.


Quick Start

  1. Add the plugin to ~/.config/opencode/opencode.json as shown above.
  2. Restart OpenCode or start a session.
  3. Connect Account:
    • Run /connect in OpenCode.
    • Choose Antigravity.
    • Complete Google login in your browser.
  4. Pick a Model:
    • Run /models (filter by provider Antigravity).
    • Select e.g. antigravity/gemini-3.8-flash.
  5. Start coding! Check your quota at any time using /antigravity-usage.

Commands & Tools

| Command / Tool | Description | | --- | --- | | /antigravity-usage | Displays server-reported quota pools and reset times (antigravity_usage tool). | | /antigravity-models | Lists available runtime models, quota, and capabilities (antigravity_models tool). | | /antigravity-image | Generates images via Antigravity image models (generate_image tool). |

The tools above are also available directly for the model to invoke when needed.


Models & Routing

Antigravity exposes Google Gemini along with Claude and GPT-OSS models served through Vertex backend endpoints under the unified antigravity provider:

| Public Model ID | Input | Thinking Levels | Max Output | Request Routing | | --- | --- | --- | --- | --- | | gemini-3.8-flash | Text, Image | Low, Medium, High | 65,536 | gemini-3.8-flash-tiered | | gemini-3.7-flash | Text, Image | Low, Medium, High | 65,536 | gemini-3.7-flash-tiered | | gemini-3.6-flash | Text, Image | Low, Medium, High | 65,536 | Per-effort runtime IDs | | gemini-3.5-flash | Text, Image | Low, Medium, High | 65,536 | Per-effort runtime IDs | | gemini-3.1-pro | Text, Image | Low, High | 65,535 | Per-effort runtime IDs | | claude-sonnet-4-6 | Text, Image | High | 64,000 | claude-sonnet-4-6 | | claude-opus-4-6 | Text, Image | High | 64,000 | claude-opus-4-6-thinking | | gpt-oss-120b | Text | Medium | 32,768 | gpt-oss-120b-medium |

Unspecified thinking effort automatically defaults to high.


Configuration & Environment Variables

Credentials can be supplied via /connect or customized using environment variables (lookup order: OPENCODE_ANTIGRAVITY_* → ANTIGRAVITY_* → NOAGY_*):

| Variable | Description | | --- | --- | | ANTIGRAVITY_ACCESS_TOKEN / GOOGLE_ACCESS_TOKEN | Direct OAuth access token override (ya29...). | | ANTIGRAVITY_PROJECT_ID | Specify a custom Google Cloud Code Assist project ID. | | ANTIGRAVITY_BASE_URL | Override the Google API base URL (must be HTTPS allowed Google host). | | ANTIGRAVITY_CALLBACK_HOST | Bind OAuth callback to 127.0.0.1, ::1, or localhost (default: 127.0.0.1). | | ANTIGRAVITY_CLIENT_ID / ANTIGRAVITY_CLIENT_SECRET | Use custom Google OAuth client credentials. |


Development & Local Testing

This project uses Bun for building and testing:

# Install dependencies
bun install

# Run typechecking and tests
bun run typecheck
bun test

# Build bundles
bun run build

Loading Local Builds in OpenCode 2.0

To run OpenCode directly against your local checkout without npm:

  1. Create a local plugin directory in ~/.config/opencode/plugins/antigravity:

    mkdir -p ~/.config/opencode/plugins/antigravity
  2. Add package.json:

    { "name": "antigravity-local", "type": "module", "main": "./index.js" }
  3. Add index.js pointing to your local dist/:

    process.env.ANTIGRAVITY_OPENCODE2_DEV_ENTRY ??=
      "/absolute/path/to/opencode2-antigravity/dist/sdk.js";
    
    export default (
      await import("file:///absolute/path/to/opencode2-antigravity/dist/plugin-opencode2.js")
    ).default;

License

MIT