@cortexkit/pi-antigravity-auth

中文文档
3.0.38发布于 2026/11/11MITTypeScriptES Module构建来源已验证近 30 天下载 9130

Google Antigravity OAuth extension for pi - access Gemini and Claude models using Google credentials

原始使用文档
文档目录8 节
  1. Install
  2. Login
  3. Inside Thalamus
  4. Models
  5. Configuration
  6. Notes
  7. Major upgrades and downgrade
  8. License

@cortexkit/pi-antigravity-auth

Google Antigravity OAuth extension for pi. Authenticate with your Google account and use Gemini 3 models through Antigravity's endpoints.

[!CAUTION] Using this extension violates Google's Terms of Service. Accounts may be suspended or banned. This is an unofficial tool not endorsed by Google.

Install

pi install npm:@cortexkit/pi-antigravity-auth

Login

/login google

A browser URL is shown. Complete the Google OAuth flow and paste the resulting callback URL (or authorization code) back into the prompt.

The extension replaces Pi's built-in google catalog with Antigravity models. Use Antigravity OAuth for this provider, not a Google AI Studio API key. If upgrading from the old provider ID, change model selections to google/antigravity-… and run /login google. Credentials saved under google-antigravity are not migrated to google automatically.

Use /antigravity to request vault access and select a vault account. Local and vault modes use the same google/antigravity-… model IDs. After the operator approves access, the extension backs up Pi's native Google login and temporarily replaces its slot with a non-secret marker before the first model request. Requests then use only vault credentials; an empty or unreachable vault does not fall back to the local login. Disconnecting vault enrollment attempts to restore the saved Google login only when the native slot still matches the non-secret marker installed for that enrollment. If another process changed the slot, the extension keeps the backup and refuses to overwrite that change; re-login may be needed. This is not a promise to restore every native auth record when changing plugin versions.

Inside Thalamus

Thalamus provides Pi's vault accounts. No setup --claustrum is needed; setup and Pi's vault connection action refuse because Thalamus owns the connection. The /antigravity Vault section shows Served by Thalamus, without Connect or Disconnect. Pi saves its native Google login and puts the non-secret vault marker in Pi's google slot in auth.json, while holding that file's lock. When Pi later runs outside Thalamus, it restores the saved login only if the google slot still holds that marker, the same rule as for disconnecting an enrolled vault. Otherwise nothing changes outside Thalamus.

Models

The extension registers the Antigravity model catalog under the google provider, including:

  • antigravity-gemini-3.8-flash
  • antigravity-gemini-4-argon
  • antigravity-claude-sonnet-5-5
  • antigravity-claude-opus-5-5

Claude 5.5 supports low, medium and high effort, a 1,000,000-token context and 128,000-token output limit. Retired Claude 4.6 requests refuse before credential acquisition or transport; they are not redirected to 5.5. Gemini 3.1 Pro, Gemini 3.5/3.6/3.7 Flash and gemini-pro-agent were withdrawn by Antigravity. Their grouped and native tier selectors also refuse before credential acquisition or transport, without aliases; history stays readable.

Gemini 4 Argon requires Google AI Ultra and supports low, medium and high effort (medium by default), with 1,048,576 context and 65,536 output tokens. It uses Antigravity only. Argon's per-model remaining quota and reset time are reported separately because the redacted quota summary does not identify an Argon weekly shared-quota bucket; weekly pool attribution remains unverified.

  • antigravity-gpt-oss-120b-medium

The image-generation model is currently OpenCode-only because Pi's provider event protocol does not expose image-output stream events.

Select a model with /model or pi -m google/antigravity-gemini-3.8-flash.

Configuration

Environment variableDescription
PI_AGENT_DIROverride the pi agent directory (default ~/.pi/agent).
PI_ANTIGRAVITY_AUTH_FILERelocate the base path used to place antigravity-auth-vault/ beside it; does not relocate Pi's native auth.json Google slot or create an OpenCode pool.

Notes

This package shares its transport, OAuth, fingerprint, and request-transform logic with the unified OpenCode V1/GA plugin via @cortexkit/antigravity-auth-core. Local mode uses one account in Pi's native google OAuth slot (auth.json in Pi's agent directory). Vault mode can list/select approved vault accounts, but serves one at a time; Pi has no local pool rotation, recorded quota gating, killswitch, or operator settings.

Major upgrades and downgrade

Pi's native auth file is not the legacy OpenCode pool. Pi-only users must not run antigravity-auth migrate or rollback against it. When upgrading from the old google-antigravity provider, update model IDs to google/antigravity-… and run /login google: credentials in the google-antigravity auth slot are not automatically moved or overwritten.

Before changing builds while enrolled in a vault, disconnect via /antigravity → Vault in the currently installed extension, then re-login if safe native-slot restoration is not possible. An older build may expect a different provider slot; do not copy tokens between slots or assume disconnect restores all native records. If you also use an OpenCode legacy pool, follow its separate offline migration/rollback guide. The provider and custody behavior is implemented in src/index.ts and src/vault-setup.ts.

License

MIT

版本与发布记录

@cortexkit/pi-antigravity-auth 共发布 47 个版本,首次发布于 2026/06/14;过去 12 个月发布了 47 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
3.0.38latest2026/11/11今天
3.0.372026/11/082 天前
3.0.362026/11/082 天前
3.0.352026/11/083 天前
3.0.342026/11/073 天前
3.0.332026/11/073 天前

关于 @cortexkit/pi-antigravity-auth 的常见问题

@cortexkit/pi-antigravity-auth 是什么?

Google Antigravity OAuth extension for pi - access Gemini and Claude models using Google credentials

如何安装 @cortexkit/pi-antigravity-auth?

在项目目录运行 npm install @cortexkit/pi-antigravity-auth,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:@earendil-works/pi-ai(*)、@earendil-works/pi-tui(*)、@earendil-works/pi-coding-agent(*)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@cortexkit/pi-antigravity-auth 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@cortexkit/pi-antigravity-auth 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@cortexkit/pi-antigravity-auth 可以商用吗?

@cortexkit/pi-antigravity-auth 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@cortexkit/pi-antigravity-auth 的下载量有多少?

根据 npm 官方下载统计,@cortexkit/pi-antigravity-auth 在 2026/10/11 – 2026/11/09 这 30 天内被下载 9,130 次,日均约 304 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@cortexkit/pi-antigravity-auth 还在维护吗?

最新版本 3.0.38 发布于 2026/11/11(今天);至今共发布 47 个版本,其中过去 12 个月发布了 47 个;首次发布于 2026/06/14。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。