By grant-unwin
Tracks input and output token usage across a session, displaying a running total after each response.
Displays a running count of input and output tokens after every Claude response, with an estimated session cost.
After each response, this appears in your Claude Code terminal:
┌─ Token Usage ────────────────────────────────────────┐
│ Model : Opus 4.6 │
│ Input : 4,821 Output : 1,203 │
│ Cache↑ : 0 Cache↓ : 0 │
│ Total : 6,024 tokens ~ $0.0326 │
└──────────────────────────────────────────────────────┘
At session end, it shows the same box labelled Session Final.
claude --plugin-dir /path/to/claudecode-plugin-token-usage-status-bar
In Claude Code, run:
/plugin marketplace add grant-unwin/claudecode-plugin-token-usage-status-bar
/plugin install token-tracker@token-usage-status-bar
Use /token-tracker:usage at any time to display the current session totals inline.
Add to ~/.tmux.conf:
set -g status-interval 2
set -g status-right '#(cat ~/.claude/token-stats.txt.compact 2>/dev/null || echo "–") | %H:%M '
Then reload: tmux source-file ~/.tmux.conf
Run in a split terminal pane for a live updating view:
watch -n 1 cat ~/.claude/token-stats.txt
The plugin automatically detects which Claude model is being used and applies the correct pricing. Prices are per 1M tokens (source: Anthropic pricing):
| Model | Input | Output | Cache Write | Cache Read |
|---|---|---|---|---|
| Opus 4.6 | $5 | $25 | $6.25 | $0.50 |
| Opus 4.5 | $5 | $25 | $6.25 | $0.50 |
| Opus 4.1 | $15 | $75 | $18.75 | $1.50 |
| Sonnet 4.6 | $3 | $15 | $3.75 | $0.30 |
| Sonnet 4.5 | $3 | $15 | $3.75 | $0.30 |
| Haiku 4.5 | $1 | $5 | $1.25 | $0.10 |
If the model can't be detected, Sonnet pricing is used as a fallback.
/plugin uninstall token-tracker
Clean up status files:
rm -rf ~/.claude/token-tracker ~/.claude/token-stats.txt ~/.claude/token-stats.txt.compact
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
npx claudepluginhub grant-unwin/claudecode-plugin-token-usage-status-bar --plugin token-trackerPostToolUse hook that reports estimated token usage and cost per tool call
Analyze Claude Code session token usage, costs, trends, and anomalies
htop for your Claude Code sessions — real-time cost tracking, cache efficiency, model comparison, smart alerts, web dashboard, and session analytics
Real-time session dashboard for Claude Code — cost tracking, analytics, and smart alerts
Audit, fix, and monitor Claude Code context window usage. Find the ghost tokens.
Per-session token usage breakdown.