Documentation
¶
Overview ¶
Package usage parses Claude Code JSONL session logs and aggregates token counts. Malformed lines and files degrade gracefully: usage is best-effort, never fatal.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Totals ¶
Totals holds aggregated token counts across all session logs.
func Aggregate ¶
Aggregate walks <configDir>/projects recursively, sums token counts from every *.jsonl file, and returns the combined Totals. A missing projects directory yields zero Totals and a nil error. Individual unreadable files and malformed or usage-less lines are skipped rather than failing the walk.
Click to show internal directories.
Click to hide internal directories.