Skip to content

tom-draper/claude-usage

Repository files navigation

Claude Usage

npx @tomdraper/claude-usage

claude-usage

Claude Code stores detailed session data locally on your machine. Claude Usage reads these JSONL logs and launches a powerful, filter-first dashboard for exploring your usage. 100% local, no data leaves your machine.

Installation

Run without installing:

npx @tomdraper/claude-usage

Or install globally:

npm install -g @tomdraper/claude-usage
claude-usage

Estimations

Estimated (proportional token-share distribution across each day's activity)

  • Per-model messages
  • Per-model sessions
  • Per-model costs, when the stats cache reports zero cost for a model (falls back to API pricing tables)

Model cost estimates are calculated using Anthropic API pricing. Actual costs for Pro, Max, and Teams users are typically far lower, since subscription usage is heavily subsidized.

These are estimated rather than read directly from JSONL files because older sessions may not include fields like model, gitBranch, entrypoint, or cwd, making JSONL-derived counts unreliable across full history. The stats cache has accurate totals going further back, so per-model figures are derived by distributing each day's totals proportionally by token share.

Contributions

Contributions, issues and feature requests are welcome.

  • Fork it (https://github.com/tom-draper/claude-usage)
  • Create your feature branch (git checkout -b my-new-feature)
  • Commit your changes (git commit -am 'Add some feature')
  • Push to the branch (git push origin my-new-feature)
  • Create a new Pull Request

Releases

No releases published

Packages

 
 
 

Contributors