← Catalog

@latentminds/pi-quotas

Quota monitoring for Pi. Shows remaining usage and rate limits for Anthropic, OpenAI Codex, GitHub Copilot, OpenRouter, Synthetic, Grok, Z.ai, OpenCode Go, Kimi Code, and Ollama Cloud — directly in your Pi session.

Extension

Install

Install with PiG

pig install npm:@latentminds/pi-quotas

Install with Pi

pi install npm:@latentminds/pi-quotas
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "image": "https://raw.githubusercontent.com/latentminds-ai/pi-quotas/main/docs/quotas-dashboard.png",
  "extensions": [
    "./src/extensions/core/index.ts",
    "./src/extensions/command-quotas/index.ts",
    "./src/extensions/command-tokens/index.ts",
    "./src/extensions/usage-status/index.ts",
    "./src/extensions/token-status/index.ts",
    "./src/extensions/quota-warnings/index.ts"
  ]
}

README

Written by the package's publisher, shown as published in version 0.5.0 (README.md). PiG does not review it.

@latentminds/pi-quotas

Quota monitoring for Pi. Shows remaining usage and rate limits for Anthropic, OpenAI Codex, GitHub Copilot, OpenRouter, Synthetic, Grok, Z.ai, OpenCode Go, Kimi Code, and Ollama Cloud — directly in your Pi session.

Screenshots

/quotas dashboardFooter status
Quotas dashboardFooter 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

CommandDescription
/quotasCombined quota dashboard for all providers
/anthropic:quotasAnthropic quotas only
/codex:quotasOpenAI Codex quotas only
/github:quotasGitHub Copilot quotas only
/openrouter:quotasOpenRouter quotas only
/synthetic:quotasSynthetic quotas only
/grok:quotasGrok quotas only
/zai:quotasZ.ai quotas only
/opencode-go:quotasOpenCode Go quotas only
/kimi:quotasKimi Code quotas only
/ollama:quotasOllama Cloud quotas only
/tokensCross-session token/cost usage
/quotas:settingsToggle 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.

The combined dashboard hides providers with no configured subscription, credentials that cannot report subscription usage, and successful responses with no quota windows. Provider-specific commands remain available and show detailed authentication or API errors for troubleshooting.

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 warning → high → critical 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, /grok:quotas, /zai:quotas, /opencode-go:quotas, /kimi:quotas, /ollama: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/extensions/quotas.json) or per-project (.pi/quotas.json). Run /reload after changing command visibility.

Supported providers

ProviderWindowsDetails
Anthropic5h, 7d, per-model 7d, extra usageUtilization percentages; optional overage budget in local currency
OpenAI Codex5h, 7d, credits, spend capRate-limit percentages; credit balance; spend-cap reached/OK
GitHub CopilotPremium/chat/completions per monthRemaining/entitlement counts with overage indicators
OpenRouterMonthly budget, daily/weekly/monthly usageUSD spending tracking with cents precision; optional per-key budget limits; UTC-based period resets
SyntheticSubscription, search/hour, free tools, weekly tokens, 5h limitRequest counts and token budgets; rolling five-hour rate limit; weekly token regen
GrokWeekly credits, per-product usage, on-demand spendSuperGrok credit usage from the xAI CLI billing endpoint
Z.ai5h, 7d, monthly web searchesToken utilisation percentages (rolling 5h/7d windows); monthly web-search count limit
OpenCode GoRolling 5h, weekly, monthly USDUSD spend tracking against tier limits; cross-session token/cost aggregation via the /tokens command
Kimi CodeRolling 5h, weeklyCoding Plan request allowances with reset times
Ollama Cloud5h, 7dRolling session (5h) and weekly (7d) usage fractions from the /api/usage endpoint

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)
  • xai — Grok/xAI OAuth access token
  • zai — Z.ai (Zhipu AI / GLM Coding Plan) API key
  • opencode-go — OpenCode Go workspace ID and auth cookie (set the OPENCODE_GO_WORKSPACE_ID and OPENCODE_GO_AUTH_COOKIE environment variables, or configure them in the OpenCode Go config file)
  • kimi-coding — Kimi Code OAuth access token
  • ollama-cloud — Ollama Cloud API key (also reads OLLAMA_API_KEY if set)

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.

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.