pi-stats-ext
Dense local-first Pi coding-agent usage dashboard for tokens, costs, models, projects, and sessions.
Package details
Install pi-stats-ext from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-stats-ext- Package
pi-stats-ext- Version
0.2.0- Published
- Jul 11, 2026
- Downloads
- 402/mo · 203/wk
- Author
- irfansofyana
- License
- MIT
- Types
- extension
- Size
- 657.7 KB
- Dependencies
- 0 dependencies · 2 peers
Pi manifest JSON
{
"extensions": [
"./src/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-stats-ext
Local-first Pi coding-agent usage dashboard.


Dashboard
/pi-stats opens a dense Ops-console TUI over local session history:
- global date ranges: default
30d, plustoday,7d,90d,all, orYYYY-MM-DD..YYYY-MM-DD - multi-view layout: Overview, Models, Projects, Sessions
- responsive, Pi-theme-aware summary cards for fresh tokens, cost, cache leverage, and cost per million fresh tokens
- previous-period comparisons that expose changes in spend, usage, cache leverage, and efficiency
- decision signals for cost shifts, cache regressions, stable usage, and model concentration
- responsive Activity panel with a calendar heatmap, collision-free month labels, active-day cadence, peak/average usage, streaks, busiest weekday, and a fresh-token trend
- keyboard-driven model efficiency table with usage share, cost, cache leverage, and cost per million fresh tokens
- model inspector with provider, reach, efficiency baseline, and a practical routing recommendation
- bordered tables for projects and sessions by cost/tokens
- keyboard controls:
1today,27d,330d,490d,5all,dcustom date input,o/m/p/sviews, tab cycles views, left/right cycles range, up/down orj/kselects a model, enter inspects it,q/esccloses - incremental JSON cache at
~/.pi/agent/pi-stats/cache.json
Installation
npm
pi install npm:pi-stats-ext
Then reload Pi and run:
/pi-stats
Local development install
npm install
pi install ./
# then reload pi and run:
/pi-stats
Develop
npm test
npm run build