pi-daily-cost
Daily spend tracker for the Pi coding agent — shows total API cost across all of today's sessions in the footer status bar
Package details
Install pi-daily-cost from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-daily-cost- Package
pi-daily-cost- Version
0.1.0- Published
- May 14, 2026
- Downloads
- 48/mo · 7/wk
- Author
- briandoll
- License
- MIT
- Types
- extension
- Size
- 6.6 KB
- Dependencies
- 0 dependencies · 0 peers
Pi manifest JSON
{
"extensions": [
"./extensions"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-daily-cost
Daily spend tracker for the Pi coding agent. Shows your total API cost across all sessions today in the footer status bar — not just the current session.
today: $1.24
Why
Pi's built-in footer shows per-session cost. If you run multiple sessions in a day (different projects, resuming earlier sessions, etc.) there's no easy way to see your total daily spend at a glance. This extension adds that.
Install
pi install npm:pi-daily-cost
How it works
On session start, the extension scans all JSONL session files under ~/.pi/agent/sessions/ for today's date and sums assistant message costs. New costs in the active session are accumulated live via the message_end event. The footer updates in real time as you work.
Handles:
- Multiple sessions across different projects
- Resumed or forked sessions (no double-counting)
- Sessions that span midnight (costs are attributed to the local date of each message)
- Fresh installs with no prior sessions
Display
The status appears in your footer as today: $X.XX. Works best alongside pi-powerline-footer, which styles footer status segments.
Cost format:
$0.00— nothing spent yet<$0.001— sub-millicent amounts$0.0423— fractions of a cent$0.142— cents range$1.24— dollar range
Notes
- Costs are read from Pi's local session files — no network calls, no external tracking
- If a session file is unreadable or malformed, it's skipped silently
- Branched/abandoned conversation paths are included in the cost total (the API cost was incurred either way)