cd /news/developer-tools/show-hn-a-pi-extension-to-monitor-yo… · home topics developer-tools article
[ARTICLE · art-116382] src=github.com ↗ pub= topic=developer-tools verified=true sentiment=· neutral

Show HN: A Pi extension to monitor your quota for OpenCode GO et CommandCode

A new open-source extension for the pi.dev terminal AI tool displays subscription quota usage for OpenCode Go and Command Code providers in the status bar, with color-coded 5-hour and monthly windows, reset countdowns, and auto-refresh every 60 seconds. The extension, installable via 'pi install npm:pi-quota-monitoring', queries each provider's usage API and shows the quota only when a supported model is active.

read2 min views1 publishedAug 31, 2026
Show HN: A Pi extension to monitor your quota for OpenCode GO et CommandCode
Image: Michielbdejong (auto-discovered)

A pi extension that shows your subscription quota usage (%) in the status bar.

Supported providers:

Provider Label Quota source
commandcode )

CC

api.commandcode.ai

billing period + 5h windowOpenCode Go(opencode-go

)OG

opencode.ai/zen/go/v1/usage

rolling windowThe quota only appears when you're using a model from a supported provider. Switch to any other provider (e.g. minimax

) and the display clears automatically.

In the pi footer, the extension shows one segment per usage window:

CC 5h: 15% resets in 2h · mois: 3% resets in 4d
OG 5h: 10% resets in 2h · mois: 27% resets in 13d

If you also have pi-token-speed installed, the quota appears to the right of your TPS readout (the zz-quota

status key sorts right after tokenSpeed

).

Two windows shown: the** 5-hourwindow (tighter limit, with reset countdown) and the monthlybilling period Color-coded**: green (ok), yellow (≥70% used), red (≥90% used)** Reset countdown**: each window showsresets in 2h

/5m

/1d

until it resets - the 5h window uses the provider's real reset timestamp; the monthly window uses the provider's reset timestamp when available (OpenCode Go), otherwise the next calendar-month start (Command Code)Auto-refresh: every 60s and after every agent turn** Command Codeshows the 5-hour window + monthly billing-period total OpenCode Go**shows the rolling (≈5h) + monthly windows

pi install npm:pi-quota-monitoring

Then /reload

or restart pi.

Nothing to configure. Pick a model from a supported provider and the quota shows up in the footer.

The extension reads the API key from pi's model registry (falling back to the standard auth stores), then queries each provider's usage endpoint:

Command Code:GET https://api.commandcode.ai/alpha/whoami

GET /alpha/billing/credits

+GET /alpha/usage/summary

  • computes the 5-hour window percentage and the monthly billing-period percentage (used / total

).OpenCode Go:GET https://opencode.ai/zen/go/v1/usage

  • the API returnsrolling

(≈5h) andmonthly

percentages directly.

The status is set under the key zz-quota

, which sorts alphabetically just after tokenSpeed

in pi's footer (when pi-token-speed is installed), placing the quota to the right of the TPS display.

MIT

── more in #developer-tools 4 stories · sorted by recency
── more on @pi.dev 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/show-hn-a-pi-extensi…] indexed:0 read:2min 2026-08-31 ·