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-better-footer

v0.1.4

Published

A compact status footer with provider quotas, Git status, and session usage for Pi

Readme

pi-better-footer

English · 简体中文

Keep Pi's familiar footer layout, with provider quotas, generation speed, and Git changes alongside your session usage.

pi-better-footer demo

Available fields depend on your provider, session, and terminal width.

Features

  • Usage at a glance. Provider quotas and reset countdowns sit alongside model information; session tokens, cache hit rate, cost, and context usage stay in their familiar place. Colors follow your theme, with warnings for low quota and high context usage.
  • Native token counters. ↑ shows non-cached input, ↓ output, R cache reads, and W cache writes. These are session totals; zero counters are hidden. Cache reads and writes are shown separately, as in Pi's native footer.
  • Generation speed. t/s excludes time to first token and tool execution. ~ marks a live estimate; replies without tool calls finish with a reading based on reported token usage, excluding reported reasoning tokens.
  • Project details. The directory and branch are joined by the project's package.json version and added/removed line counts, including untracked files. Updates follow workspace activity.
  • Model continuity. Restore the last model and thinking level per directory, and skip providers with confirmed exhausted quota when cycling models. Both options can be toggled independently.

Install

pi install npm:pi-better-footer

Or install from GitHub or a local checkout:

pi install git:github.com/roy-tian/pi-better-footer
pi install /absolute/path/to/pi-better-footer

To try it from the repository without installing:

pi --no-extensions --extension ./extensions/index.ts

Restart Pi after installation. Manage enabled extensions in pi config; disable older footer or model-cycling extensions that overlap. For local source changes, use /reload or restart Pi.

Controls

| Command | What it does | | --- | --- | | /better-footer | Toggle model/thinking persistence and exhausted-quota skipping. Both default to on; settings persist. | | /scoped-models | Configure Pi's model cycle. Quota skipping applies to cycle keys (default Ctrl+P), not manual /model selection. | | pi --no-recent-model | Disable both restoration and recording of the recent model and thinking level for this run. |

Settings are stored in better-footer.json under Pi's agent directory (normally ~/.pi/agent/). Recent models are stored per working directory. Explicit --model, --provider, --thinking, and --models choices take precedence; resumed conversations use Pi's own restoration.

Quota sources

Only the active provider's quota is shown. Missing, failed, or stale readings never count as exhausted.

| Provider | Source | | --- | --- | | OpenAI Codex (legacy) | Codex app-server rate limits and response headers; requires the codex CLI. | | OpenAI — Sign in with ChatGPT (Pi 0.99+) | Explicit app-limit errors and a link to ChatGPT's usage page, rather than a numeric balance. | | Z.AI / GLM | Account quota API using Pi's configured key, with a 429-error fallback. A hammer marks monthly tool quota (Nerd Font). | | OpenCode Go | Usage API using OPENCODE_GO_API_KEY, Pi's key, or OpenCode CLI credentials; optional dashboard-cookie fallback. | | GitHub Copilot | Premium credits from Pi's authentication record. | | Other providers | Response-header rate limits, which may differ from subscription balances. |

Some sources are polled while active; others update after responses. The extension uses existing local credentials. Optional OpenCode Go settings are documented in extensions/quota/opencode-go.ts.

The ChatGPT link becomes ChatGPT limit after an explicit app-limit denial. Cycling respects that restriction for up to five minutes, or until a successful response clears it; this is not a predicted reset time or a statement about the whole subscription balance. Virtual models are excluded from quota polling and quota-based skipping because they may route to another provider.

Development

Requires Node.js 24 and Bun. Pi packages are runtime peer dependencies.

bun install
bun run test
bun run lint
bun run typecheck
bun run build:check

License

MIT