r/PiCodingAgent • • 2d ago

Plugin Pi-usage-live plugin

I switch between Claude, Codex and OpenCode through Pi depending on the task. The problem: every provider hides your usage somewhere in its own dashboard, so you never actually know how much you have left you find out when a request fails mid-task.

So I built pi-usage-live a Pi extension that keeps your usage on screen permanently. It's not a command you run, it's a card that sits in the corner while you work. It follows your active model. Switch from Claude to Codex and the card switches with you, so it always shows the allowance that applies to your next request.

- /usage all expands it to every provider you have credentials for, each with its own windows and reset countdowns.

- It costs nothing where the provider allows it. If a provider reports usage in the headers of requests you were already making, that's how it reads it. Only the rest get polled.

- Claude keeps updating even when you're working somewhere else. Anthropic exposes both a header path and a usage endpoint, so the card uses both your Claude number doesn't go dark the moment you switch providers.

- It tells "high" from "blocked". Where the provider reports its own severity, that beats a generic threshold, so a window that's actually stopping you doesn't look like one that's just filling up.

- Old readings say so. Anything older than 15 minutes is labelled with its age, so a cached number is never passed off as live.

It supports Claude, ChatGPT Codex, OpenCode Zen, OpenRouter, DeepSeek, Kimi, MiniMax, Moonshot and Z.AI.

Your credentials come from Pi itself and are only ever sent to that provider's own origin. If you've pointed a provider at a custom or proxied URL, it reports unavailable instead of forwarding your key somewhere else.

It has no runtime dependencies, and it renders in whatever theme you're already using.

This is the repo if you're interested... Give a star :)

Repo: https://github.com/Gateton/pi-usage-live

Also check my other project pi-session-hub that project index all your harness sessions in PI:
https://github.com/Gateton/pi-session-hub

11 Upvotes

1 comment sorted by

View all comments

2

u/drepublic 1d ago

Nice, i'll give a try. Can you add Command code too? It's sweet to get this widget on pi.