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-auch

v0.1.6

Published

Compact quota status for Codex, GitHub Copilot, and OpenCode Go in Pi's footer

Readme

pi-auch

pipeline
status coverage npm
version npm
downloads license

Compact quota visibility for Pi's standard footer. It supports OpenAI Codex, GitHub Copilot, and OpenCode Go without sending model probes.

Install

pi install npm:pi-auch

To try it for one session without installing it:

pi -e npm:pi-auch

Usage for every configured provider is shown in Pi's existing footer. Run /auch to refresh and display full provider details.

Authentication

  • OpenAI Codex: uses Pi's openai-codex OAuth login and the ChatGPT wham/usage endpoint.
  • GitHub Copilot: uses Pi's resolved github-copilot authentication to detect configuration. After Copilot is used in the session, quota/rate-limit information is read passively from its response headers. No model request is sent by pi-auch.
  • OpenCode Go: uses Pi's resolved opencode-go authentication to detect configuration. Dashboard quota requires a workspace ID and browser auth cookie because OpenCode does not expose that data through its API key.

For OpenCode Go dashboard quota, set both:

export OPENCODE_GO_WORKSPACE_ID="your-workspace-id"
export OPENCODE_GO_AUTH_COOKIE="your-auth-cookie-value"

Alternatively, create $PI_CODING_AGENT_DIR/pi-auch-opencode-go.json (normally under Pi's agent directory), or point OPENCODE_GO_QUOTA_CONFIG at another file:

{
	"workspaceId": "your-workspace-id",
	"authCookie": "your-auth-cookie-value"
}

On POSIX systems the file must be a regular file with mode 0600. The workspace ID appears in https://opencode.ai/workspace/<workspaceId>/go; obtain the auth cookie from browser developer tools. Without dashboard configuration, Go remains visible as configured and can acquire passive quota headers if OpenCode returns them.

pi-auch never opens Pi's credential files or stores provider credentials itself. Pi authentication is resolved through Pi's provider API. The optional OpenCode cookie is read only from the explicit environment/configuration above and used only for the bounded dashboard request. pi-auch does not log credentials or provider response bodies.

Behavior

Quota is fetched at session start, every 15 minutes, and on /auch. Passive provider data updates after normal model responses. Requests have deadlines and body-size limits. Concurrent refreshes are deduplicated. A transient failure keeps the last successful value marked as stale.

The OpenCode dashboard and passive-header implementation is adapted from MIT-licensed @mtrojnar/pi-usage; see THIRD_PARTY_NOTICES.md.

Development

npm install
npm run check
npm pack --dry-run

Run the opt-in live smoke test from a development checkout to check the supported providers configured in the current Pi installation:

npm run smoke
# or: make smoke

The smoke test resolves authentication through Pi's ModelRuntime; it does not inspect credential files, print authentication, or send model probes. Providers without a local subscription are skipped. Codex performs a bounded live quota request and requires weekly percentage and reset data. Copilot validates Pi authentication but cannot obtain passive quota until normal Copilot use returns quota headers. OpenCode Go fetches live dashboard quota when its optional dashboard configuration is present; otherwise it validates Pi authentication and reports configured.