1
0
Fork
You've already forked pi-quotas
0
No description
  • TypeScript 100%
2026年06月17日 13:12:06 -03:00
.pi feat: initial pi-quotas package 2026年04月22日 15:34:07 +10:00
docs docs: add changelog and refresh release documentation 2026年04月22日 19:16:32 +10:00
src feat: add Z.ai (GLM) quota provider 2026年06月17日 13:12:06 -03:00
.gitignore feat: add open source publishing files 2026年04月22日 16:36:34 +10:00
AGENTS.md docs: add AGENTS.md and credit upstream fork in README 2026年06月17日 12:51:27 -03:00
CHANGELOG.md migrate versioning to CalVer (0Y.0M.0D) 2026年06月06日 17:53:26 -03:00
CONTRIBUTING.md migrate versioning to CalVer (0Y.0M.0D) 2026年06月06日 17:53:26 -03:00
LICENSE feat: add open source publishing files 2026年04月22日 16:36:34 +10:00
package-lock.json migrate versioning to CalVer (0Y.0M.0D) 2026年06月06日 17:53:26 -03:00
package.json migrate versioning to CalVer (0Y.0M.0D) 2026年06月06日 17:53:26 -03:00
README.md docs: add AGENTS.md and credit upstream fork in README 2026年06月17日 12:51:27 -03:00
tsconfig.json feat: initial pi-quotas package 2026年04月22日 15:34:07 +10:00

pi-quotas

Quota monitoring for Pi. Shows remaining usage and rate limits for Anthropic, OpenAI Codex, GitHub Copilot, OpenRouter, and Synthetic — 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 (this fork):

jj git clone https://codeberg.org/Su3h7aM/pi-quotas.git
pi install ./pi-quotas

From upstream 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
/synthetic:quotas Synthetic quotas only
/opencode-go:quotas OpenCode Go 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.

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, /synthetic:quotas, /opencode-go:quotas)
  • Footer status widget
  • Quota warning notifications
  • Defer to Synthetic — when both pi-quotas and pi-synthetic are loaded, pi-quotas hides its own Synthetic footer to avoid showing duplicate quota information. Enabled by default; disable if you prefer to see both footers.

Settings can be saved globally (~/.pi/agent/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
Synthetic Subscription, search/hour, free tools, weekly tokens, 5h limit Request counts and token budgets; rolling five-hour rate limit; weekly token regen
OpenCode Go Rolling, weekly, monthly Dashboard scraping via workspace ID + auth cookie; footer support for opencode-go models

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)
  • synthetic — Synthetic API key (set the SYNTHETIC_API_KEY environment variable)
  • opencode-go — set OPENCODE_GO_WORKSPACE_ID + OPENCODE_GO_AUTH_COOKIE, or add opencodeGo to ~/.pi/agent/quotas.json

No additional setup is required - if Pi can use the provider, pi-quotas can check its quotas. For Synthetic, export SYNTHETIC_API_KEY in your shell or Pi environment. For OpenCode Go, use env vars or central quotas config:

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

Requirements

  • Pi >= 0.61.0

Changelog

See CHANGELOG.md for release notes and recent changes.

License

MIT © Latent Minds Pty Ltd

Acknowledgements