One model provider extension to rule them all.
  • TypeScript 98.9%
  • Nix 1.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-30 13:02:05 +00:00
.qlty chore: adopt SpecDD contracts and enforce clean Qlty checks 2026-10-30 01:26:58 +00:00
.specdd chore: adopt SpecDD contracts and enforce clean Qlty checks 2026-10-30 01:26:58 +00:00
src feat: add endpoint dialogs and simplify managed installation 2026-10-30 13:02:05 +00:00
test feat: add endpoint dialogs and simplify managed installation 2026-10-30 13:02:05 +00:00
.gitignore chore: adopt SpecDD contracts and enforce clean Qlty checks 2026-10-30 01:26:58 +00:00
AGENTS.md chore: adopt SpecDD contracts and enforce clean Qlty checks 2026-10-30 01:26:58 +00:00
bun.lock feat: add endpoint dialogs and simplify managed installation 2026-10-30 13:02:05 +00:00
CLAUDE.md chore: adopt SpecDD contracts and enforce clean Qlty checks 2026-10-30 01:26:58 +00:00
flake.lock feat: implement accounts, custom endpoints, fallback editor and quota reporting 2026-10-29 18:00:25 +01:00
flake.nix chore: adopt SpecDD contracts and enforce clean Qlty checks 2026-10-30 01:26:58 +00:00
flake.sdd feat: add endpoint dialogs and simplify managed installation 2026-10-30 13:02:05 +00:00
package.json feat: add endpoint dialogs and simplify managed installation 2026-10-30 13:02:05 +00:00
package.sdd feat: add endpoint dialogs and simplify managed installation 2026-10-30 13:02:05 +00:00
pi-wormhole.sdd feat: add endpoint dialogs and simplify managed installation 2026-10-30 13:02:05 +00:00
quality.sdd docs: focus user guide and remove bundled scripts and skills 2026-10-30 12:05:17 +00:00
quality.ts docs: focus user guide and remove bundled scripts and skills 2026-10-30 12:05:17 +00:00
README.md feat: add endpoint dialogs and simplify managed installation 2026-10-30 13:02:05 +00:00
README.sdd feat: add endpoint dialogs and simplify managed installation 2026-10-30 13:02:05 +00:00
tsconfig.json docs: focus user guide and remove bundled scripts and skills 2026-10-30 12:05:17 +00:00
tsconfig.sdd docs: focus user guide and remove bundled scripts and skills 2026-10-30 12:05:17 +00:00

Pi Wormhole

Use ChatGPT, Claude Pro/Max, Google Antigravity, and OpenAI-compatible endpoints in Pi, with multiple accounts and ordered fallback chains. Requires Pi 1.1.0.

Install

Install through Pi's package manager:

pi install git:ssh://git@src.clstb.sh/clstb/pi-wormhole.git

You need Git and SSH access to this repository. Pi installs the package and its JavaScript dependencies; no local checkout, Bun, or Nix setup is needed.

Provider prerequisites: OpenAI and custom endpoints need no extra executable. Claude needs Claude Code (claude), and Antigravity needs Google's ACP executable (agy-acp), available to the Pi process on PATH. Install only the executables for providers you use.

Start Pi, or run /reload in an existing session. All account, endpoint, and chain setup happens in Pi dialogs; no file editing is required.

Log in and choose a model

Run the login command for each subscription you want to use:

/login wormhole-openai
/login wormhole-claude
/login wormhole-antigravity
/model
  • OpenAI: choose browser login or Device code login (headless).
  • Claude: complete browser login and paste the returned code.
  • Antigravity: complete Google browser login. On a remote host, forward the callback port shown by the login flow; device-code login is unavailable.

Select an email-specific provider in /model, such as wormhole-claude-alice@example.com. The three login entries above have no models. Successful login registers the account immediately and selects a model when available.

Each account needs its own login; existing Pi or vendor credentials are not imported. Claude and Antigravity must discover models to complete login. Listed models can still be rejected by your plan or quota.

Multiple accounts

Repeat the login command with another email to add an account. The same email refreshes that account. If asked, enter the email you just signed in with; failed or cancelled attempts are discarded.

Legacy names such as main refer to the most recently signed-in email. Log in again to replace legacy credentials with email-specific accounts. Signing into an email-specific entry with a different email adds an account without replacing the original.

Add or edit an endpoint

/wormhole endpoint

Use the menu to add, edit, or remove an OpenAI-compatible endpoint. To open one directly, use /wormhole endpoint NAME. Follow the dialogs for the URL, protocol, authentication, and models; advanced model and header settings are available there too. Save applies your changes; Cancel discards the draft. Removal asks for confirmation.

Choose a stored API key, an environment-variable reference, or explicitly keyless access. Subscription credentials are never reused. Use HTTPS for remote servers. Leave model IDs empty for discovery, or enter IDs if the server has no model-list API; check advanced capabilities and limits against your server.

Select wormhole-custom-NAME in /model. For a quick add, /login wormhole-openai-compatible also works. Use /login wormhole-custom-NAME to replace a stored key; /logout removes that key, but does not disable environment-variable or keyless access.

Set up fallback

/wormhole chain

Create a chain, choose accounts/endpoints and models, then arrange them in order. Save chain applies it immediately; Cancel discards the draft. Use /wormhole chain coding to edit coding, and select /model wormhole-chain/coding to use it. Finish any active turn and tool round trip before editing or deleting its chain.

Fallback handles quota/rate limits, unavailable capacity/models, missing credentials, and transient timeouts. Cancellation and programming errors stop the chain. Once content or a tool invocation is shown, the call is never replayed on another account. Tool-result continuations stay on that account; a fresh turn starts from the first target again.

Chains advertise a 200,000-token text context; choose members that can handle it. Claude and Antigravity are text-only here, ignore extended-thinking controls, and show zero token/cost counters. OpenAI retains native usage accounting.

Check usage and fix problems

  • /wormhole usage reports available quota, resets, and credits per subscription account. These are read-only requests, not inference calls. Vendor reporting may be incomplete or unavailable; custom endpoints have no quota report. Normal model requests consume your allowance.
  • Models missing: choose the email-specific provider, then run /wormhole refresh. Log in again if credentials are missing. Reload after changes made outside Pi. Cached catalogs do not enable offline inference.
  • Endpoint fails: use /wormhole endpoint NAME to check the URL, authentication, headers, and model IDs. Make sure referenced environment variables are available to Pi.
  • Vendor executable missing: make claude or agy-acp available on Pi's PATH, then restart Pi. Neither is required for OpenAI or custom endpoints.
  • Update Wormhole: run pi update git:ssh://git@src.clstb.sh/clstb/pi-wormhole.git in your terminal, then /reload in Pi.

Log out and stay safe

Use /logout for the email-specific provider to remove its Pi credential. Logging out a legacy alias does not log out the email account. Claude and Antigravity may retain vendor tokens after Pi logout; revoke authorization through the vendor's account controls.

Treat credentials and account data as private, and trust other processes running as your user. Antigravity ACP is an agent, not an operating-system sandbox. Run Pi in a sandbox if you need filesystem or network restrictions. Subscription terms and model availability can change; review your vendor's terms.

Development only

For extension development, work from a checkout instead of a managed installation:

nix develop
bun install --frozen-lockfile
bun run wormhole setup
nix build .#devShells.x86_64-linux.default --out-link .nix-runtime
pi install "$PWD"

Keep .nix-runtime to retain saved executable paths; repeat setup and rebuild it after runtime updates. Use aarch64-linux on ARM Linux (declared but not exercised here). Do not install both the checkout and managed Git source in the same Pi profile.