@qmxme/pi-stats
Stats widget extension for pi - shows token throughput, usage, and duration
Package details
Install @qmxme/pi-stats from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@qmxme/pi-stats- Package
@qmxme/pi-stats- Version
0.2.1- Published
- Apr 1, 2026
- Downloads
- 248/mo · 46/wk
- Author
- qmx
- License
- MIT
- Types
- extension
- Size
- 3.9 KB
- Dependencies
- 0 dependencies · 1 peer
Pi manifest JSON
{
"extensions": [
"./stats.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
@qmxme/pi-stats
Stats widget extension for pi that displays token usage, throughput, and response duration.
Features
- Token throughput: Tokens per second during response
- Token usage: Input → Output tokens per message
- Cache tracking: Cache read (↓) and write (↑) when applicable
- Total tokens: Cumulative token count
- Duration: Response time in seconds or minutes
Widget Display
Example output in the UI status bar:
12.3 tok/s | 1.2k → 450 | cache 500↓ 300↑ | total 2.1k | 3.2s
Installation
pi install npm:@qmxme/pi-stats
With a pinned version:
pi install npm:@qmxme/pi-stats@0.1.0
Project-local installation:
pi install npm:@qmxme/pi-stats -l
Try without installing:
pi -e npm:@qmxme/pi-stats
Development
npm install # install build dependencies
npm run build # compile to dist/
npm run dev # watch mode
License
MIT