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

pi-gemini-oauth-apikey

v0.1.0

Published

Multi-account Google Gemini (Cloud Code Assist OAuth) rotation pool for pi — register N accounts, auto-rotate on 429. Depends on @qraxiss/pi-gemini-auth for the OAuth/provider implementation.

Readme

pi-gemini-oauth-apikey

Multi-account Google Cloud Code Assist (Gemini CLI) OAuth rotation pool for pi. Register N Google accounts as separate providers and auto-rotate on 429/RESOURCE_EXHAUSTED — get ~N × 1500 RPD of free Gemini quota.

Complements pi-key-pool (which rotates API keys): this package rotates OAuth accounts (Code Assist tier, ~6× the per-account RPD, separate quota bucket).

What it does

  • Registers gemini-pool-1gemini-pool-N as OAuth providers
  • Each is independently loggable via /login
  • On a 429/rate-limit error, marks the current account exhausted, switches to the next available one, and replays your last message automatically
  • Time-based cooldown recovery (quota 60s, capacity 30s, network skipped)

Why

pi-multi-pass supports multi-account OAuth rotation but its Gemini login (loginGeminiCli) was removed from upstream pi, so /subs login google-gemini-cli-N throws is not a function. This package reuses @qraxiss/pi-gemini-auth (which restored that OAuth flow as a standalone package) for the login/provider implementation, and adds the rotation layer on top. No pi-core patching.

Install

pi install npm:pi-gemini-oauth-apikey

Then restart pi. (You can now uninstall @qraxiss/pi-gemini-auth as an active extension — this package depends on it as a library instead.)

Configure

Optional. Edit ~/.pi/agent/gemini-pool.json (defaults to 4 slots if absent):

{
  "accounts": [
    { "id": "1", "label": "Work Pro" },
    { "id": "2", "label": "Personal Pro" },
    { "id": "3", "label": "Side Pro" },
    { "id": "4", "label": "Backup Pro" }
  ],
  "cooldown": { "quota": 60000, "capacity": 30000, "network": 0 }
}

Login each account

/login        → pick "Gemini Pool 1" → browser OAuth (account 1)
/login        → pick "Gemini Pool 2" → account 2
... (repeat per account)
/model gemini-pool-1/gemini-2.5-flash

That's it. When gemini-pool-1 hits a 429, the turn transparently retries on gemini-pool-2, and so on. When all are exhausted you get a warning and a cooldown timer.

How it works

before_agent_start  →  remember last user prompt
agent_end           →  if stopReason=="error" && isRateLimit(msg):
                         markExhausted(current); pickNext() → setModel + sendUserMessage

failover.ts is a pure, unit-tested state machine (round-robin + cooldown + auth-gated availability). Provider/OAuth/streaming come from qraxiss.

Tests

node --test --experimental-strip-types test/*.test.ts

Stdlib only (node:test) — no test dependencies.

License

MIT