Token use and spending are easy to lose track of during long Pi sessions.
cost keeps session activity visible with token totals, current-turn cost, session cost, and a nonzero monthly usage-cost total when it differs from session cost.
Use
Nothing to invoke.
Start using Pi and the figures update as responses and tools complete.
In the terminal UI they appear in the shared footer when available, otherwise in Pi's status area.
Cost honors provider-reported totals, including zero; otherwise zero totals fall back to Pi's model pricing catalog.
≈ marks any total containing estimates or historical responses without provider provenance.
A model absent from that catalog contributes no estimated cost.
Session totals include all recorded branches and Pi's native usage entries, including tool work, compaction, and branch summaries.
The monthly figure counts stored native usage in the same session stores as pi --resume, across projects and child sessions, by recorded timestamps in the local calendar month, not by session filenames.
It includes assistant responses, standalone usage, tool results, compaction, and branch-summary usage.
Each session file counts its own records once, so tools must not also report work persisted in a child session.
Sessions recorded by tools that did so, such as older PiPi versions, count that child work twice.
Copied fork records are counted once when their persisted identity and usage match; legacy records without usable identity are retained.
Pi's native Usage schema requires a numeric monetary total, so media without native usage or a known amount remains uncovered rather than displayed as free.
Use this extension only where that local-session summary is appropriate for you.
<img src="assets/banner.svg" alt="cost" height="70">
# cost
Token use and spending are easy to lose track of during long Pi sessions.
cost keeps session activity visible with token totals, current-turn cost, session cost, and a nonzero monthly usage-cost total when it differs from session cost.
## Use
Nothing to invoke.
Start using Pi and the figures update as responses and tools complete.
In the terminal UI they appear in the shared footer when available, otherwise in Pi's status area.
Cost honors provider-reported totals, including zero; otherwise zero totals fall back to Pi's model pricing catalog.
`≈` marks any total containing estimates or historical responses without provider provenance.
A model absent from that catalog contributes no estimated cost.
Session totals include all recorded branches and Pi's native usage entries, including tool work, compaction, and branch summaries.
The monthly figure counts stored native usage in the same session stores as `pi --resume`, across projects and child sessions, by recorded timestamps in the local calendar month, not by session filenames.
It includes assistant responses, standalone usage, tool results, compaction, and branch-summary usage.
Each session file counts its own records once, so tools must not also report work persisted in a child session.
Sessions recorded by tools that did so, such as older PiPi versions, count that child work twice.
Copied fork records are counted once when their persisted identity and usage match; legacy records without usable identity are retained.
Pi's native `Usage` schema requires a numeric monetary total, so media without native usage or a known amount remains uncovered rather than displayed as free.
Use this extension only where that local-session summary is appropriate for you.
[Installation](../../README.md#install)
<!-- config:start -->
<!-- config:end -->