Replies: 1 comment
|
No, However, since all the data is saved locally, you can easily generate your own cross-session token report using a simple Bash/ Here is a snippet you can use or alias in your terminal to calculate aggregate usage: # Adjust the path to point to your global or project-level Pi sessions directory
find ~/.pi/sessions -type f -name "*.jsonl" -exec cat {} + | \
jq -c 'select(.usage != null) | .usage' | \
jq -s '{
total_input_tokens: map(.prompt_tokens // .input_tokens // 0) | add,
total_output_tokens: map(.completion_tokens // .output_tokens // 0) | add,
total_cache_read: map(.cache_read_tokens // 0) | add,
total_cache_write: map(.cache_write_tokens // 0) | add,
total_cost: map(.cost // 0) | add
}' |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
There was a package that could do this for Claude Code. I am not looking for a plugin that shows the states in the Pi TUI, something that I can execute like
pi --export-states.All reactions