Stats

ctx stats¶
Display per-session token usage statistics from the local stats
JSONL files written by the heartbeat hook. By default, shows the
last 20 entries across all sessions. Use --follow to stream new
entries as they arrive (like tail -f).
The name stays plural by convention: stats is an idiomatic
abbreviation of "statistics" in CLI tooling, not a countable noun.
Flags:
| Flag | Description |
|---|---|
-f, --follow |
Stream new entries as they arrive |
-s, --session |
Filter by session ID (prefix match) |
-n, --last |
Show last N entries (default: 20) |
-j, --json |
Output raw JSONL |
Examples: