@monopi/extension-usage-tracker

Monopi usage-tracker pi extension.

Packages

Package details

extension

Install @monopi/extension-usage-tracker from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@monopi/extension-usage-tracker
Package
@monopi/extension-usage-tracker
Version
0.6.1
Published
Aug 28, 2026
Downloads
238/mo · 175/wk
Author
ifiokjr
License
MIT
Types
extension
Size
101.3 KB
Dependencies
1 dependency · 5 peers
Pi manifest JSON
{
  "extensions": [
    "./index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

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-tracker

Usage-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
  • /usage for the full dashboard overlay
  • Ctrl+Shift+U as a shortcut for the same overlay
  • /usage-toggle to show or hide the widget
  • /usage-refresh to force fresh provider probes
  • usage_report so 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.