@monopi/extension-usage-tracker
v0.6.1
Published
Monopi usage-tracker pi extension.
Readme
@monopi/extension-usage-tracker
The usage-tracker extension is a CodexBar-inspired provider quota and cost monitor for pi. It shows provider-level rate limits for Anthropic, OpenAI, and Google using pi-managed auth, while also tracking per-model token usage and session costs locally.
Install
pi install npm:@monopi/extension-usage-trackerUsage-tracker persists rolling 30-day cost history and the last known provider rate-limit snapshot under the pi agent directory. That lets the widget and dashboard survive restarts and keep showing recent subscription windows when a live provider probe is temporarily rate-limited or unavailable.
Key usage-tracker surfaces:
- widget above the editor for at-a-glance quotas and session totals
/usagefor the full dashboard overlayCtrl+Shift+Uas a shortcut for the same overlay/usage-toggleto show or hide the widget/usage-refreshto force fresh provider probesusage_reportso the agent can answer quota and spend questions directly
Attribution
This extension is inspired by CodexBar and adapted from the upstream usage tracker in mitsuhiko/agent-stuff. Adapted upstream code is Copyright Armin Ronacher and contributors and licensed under Apache-2.0. Monopi package metadata and surrounding repository files remain MIT licensed.
