@artale/pi-tokens
v1.1.0
Published
Token cost intelligence for Pi. Per-tool cost breakdown, $/call estimates, budget alerts, expensive call finder.
Readme
pi-tokens
Real-time token usage tracking for Pi. Per-message, per-tool, and session totals.
Install
pi install npm:@artale/pi-tokensCommands
/tokens — session summary (input, output, total, rate)
/tokens tools — breakdown by tool (which tools eat the most tokens)
/tokens messages — per-message breakdown (last 20)
/tokens reset — reset all countersTools
tokens_usage— session summarytokens_tools— per-tool breakdown
What it tracks
- Input tokens per message
- Output tokens per message
- Tool result sizes (estimated)
- Token rate (tokens/minute)
- Top tools by token consumption
Why
Context windows aren't infinite. Know what's eating yours. If bash is consuming 60% of your tokens, maybe you need pi-lean to truncate its output.
License
MIT
