Overview
A Pi extension that displays aggregated usage statistics across all sessions. Track costs, tokens, and session counts by provider and model.
Features
- Time periods – Today, This Week, All Time (Tab to switch)
- Provider breakdown – Expand to see per-model stats
- Cost tracking – Total cost in USD from API responses
- Token details – Input, output, and cache tokens
- Session deduplication – Handles branched session files
Usage
/usage
| Key | Action |
|---|---|
Tab / ← → | Switch time period |
↑ ↓ | Select provider |
Enter / Space | Expand/collapse provider |
q / Esc | Close |
Installation
npm install @tmustier/pi-usage-extension
Or via git:
pi install git:github.com/tmustier/pi-extensions
Why?
When you're running multiple agent sessions, it's easy to lose track of costs. This gives you a quick overview without leaving the terminal.