@latentminds/pi-quotas

Quota monitoring for the [Pi coding agent](https://github.com/mariozechner/pi). Shows remaining usage and rate limits for Anthropic, OpenAI Codex, GitHub Copilot, and OpenRouter — directly in your Pi session.

Package details

extension

Install @latentminds/pi-quotas from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@latentminds/pi-quotas
Package
@latentminds/pi-quotas
Version
0.2.0
Published
Apr 22, 2026
Downloads
500/mo · 500/wk
Author
mstrazds
License
MIT
Types
extension
Size
91.1 KB
Dependencies
0 dependencies · 2 peers
Pi manifest JSON
{
  "extensions": [
    "./src/extensions/core/index.ts",
    "./src/extensions/command-quotas/index.ts",
    "./src/extensions/usage-status/index.ts",
    "./src/extensions/quota-warnings/index.ts"
  ],
  "image": "https://raw.githubusercontent.com/latentminds-ai/pi-quotas/main/docs/quotas-dashboard.png"
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

@latentminds/pi-quotas

Quota monitoring for the Pi coding agent. Shows remaining usage and rate limits for Anthropic, OpenAI Codex, GitHub Copilot, and OpenRouter — directly in your Pi session.

Screenshots

/quotas dashboard Footer status
Quotas dashboard Footer status

Install

From npm (recommended):

pi install npm:@latentminds/pi-quotas

From source:

git clone https://github.com/latentminds-ai/pi-quotas.git
pi install ./pi-quotas

Try without installing:

pi -e npm:@latentminds/pi-quotas

Commands

Command Description
/quotas Combined quota dashboard for all providers
/anthropic:quotas Anthropic quotas only
/codex:quotas OpenAI Codex quotas only
/github:quotas GitHub Copilot quotas only
/openrouter:quotas OpenRouter quotas only
/quotas:settings Toggle individual features on or off

Features

Quota dashboard

Run /quotas to open a bordered TUI view showing all providers side by side, with progress bars, used/remaining counts, and reset times. Press r to refresh, q or Esc to close.

Footer status widget

When your active model is from a supported provider, the Pi footer shows real-time quota headroom - updated every 60 seconds and on each turn. Colours shift from green → amber → red as usage climbs.

Quota warnings

Automatic notifications when projected usage is on track to exceed limits before the window resets. Warnings escalate from warninghighcritical based on your consumption pace.

Per-feature toggles

Use /quotas:settings to enable or disable:

  • Combined /quotas command
  • Per-provider commands (/anthropic:quotas, /codex:quotas, /github:quotas, /openrouter:quotas)
  • Footer status widget
  • Quota warning notifications

Settings can be saved globally (~/.pi/agent/extensions/quotas.json) or per-project (.pi/quotas.json). Run /reload after changing command visibility.

Supported providers

Provider Windows Details
Anthropic 5h, 7d, per-model 7d, extra usage Utilization percentages; optional overage budget in local currency
OpenAI Codex 5h, 7d, credits, spend cap Rate-limit percentages; credit balance; spend-cap reached/OK
GitHub Copilot Premium/chat/completions per month Remaining/entitlement counts with overage indicators
OpenRouter Monthly budget, daily/weekly/monthly usage USD spending tracking with cents precision; optional per-key budget limits; UTC-based period resets

Credentials

pi-quotas reads existing Pi auth entries from ~/.pi/agent/auth.json:

  • anthropic — Anthropic OAuth token
  • openai-codex — Codex access token (also reads ~/.codex/auth.json for the account ID)
  • github-copilot — GitHub Copilot OAuth token (falls back to gh auth token if needed)
  • openrouter — OpenRouter API key (Bearer token)

No additional setup is required - if Pi can use the provider, pi-quotas can check its quotas.

Requirements

  • Pi >= 0.61.0

Changelog

See CHANGELOG.md for release notes and recent changes.

License

MIT © Latent Minds Pty Ltd

Acknowledgements

This project was inspired by @aliou/pi-synthetic.