Skip to content

ocodista/claude-usage

Repository files navigation

Claude Code Usage

Bun TypeScript React

A live dashboard that reads Claude Code’s local files, tracks token usage by project and session, and estimates what you would pay using API pricing.

demo-final.mov

What it does

  • Measures input, output, and cache tokens per session and project
  • Shows activity peaks by hour, day, and time range
  • Estimates API equivalent cost, including cache savings
  • Updates live while you work
  • Never inspects content, only volume and time ⌛️

How it works

  • Watches ~/.claude for file changes (using Chokidar)
  • Parses Claude JSONL session logs
  • Aggregates usage in memory
  • Streams updates to a local React dashboard using WebSocket

More details in docs/how-it-works.md.


Install

curl -fsSL https://ocodista.com/claude-usage-install.sh | bash

Run

claude-code-usage

Opens at http://localhost:3190


Uninstall

curl -fsSL https://ocodista.com/claude-usage-uninstall.sh | bash

Privacy

All data stays on your machine. This tool reads files Claude already wrote.


License

MIT

About

A live dashboard that reads Claude Code’s local files, tracks token usage by project and session, and estimates what you would pay using API pricing.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors