Ad

claude-usage: Local Dashboard for Claude Code Usage

Track your Claude Code token usage, costs, and history. This project provides a local dashboard for monitoring Claude Code usage and estimating costs, offering valuable insights beyond the standard API interface.
Screenshot of phuryn/claude-usage homepage

claude-usage empowers users to monitor their Claude Code token consumption and associated costs. It captures usage data from the Claude Code CLI, VS Code extension, and dispatched Code sessions, storing it locally for analysis. By reading usage logs and presenting data through a simple dashboard, it provides enhanced visibility into API usage compared to the official interface.

This project distinguishes itself through its lightweight design, requiring no external dependencies beyond the Python standard library. It focuses on providing a self-contained solution for tracking Claude Code usage, eliminating the need for complex configurations or external services. The streamlined approach and clear, concise data presentation make it easily accessible and user-friendly.

  • Cross-Platform Compatibility: Functions on API, Pro, and Max plans, capturing usage regardless of subscription tier.
  • No External Dependencies: Relies solely on the standard Python library, simplifying installation and deployment.
  • Local Data Storage: Stores usage data in a local SQLite database for privacy and offline access.
  • Cost Estimation: Integrates Anthropic API pricing to provide accurate cost estimates based on usage.
  • User-Friendly Dashboard: Presents usage data through an intuitive, auto-refreshing web dashboard.
  • Flexible Scanning: Supports custom project directories for granular usage tracking.
  • Incremental Scanning: Optimizes scan performance by only processing new or modified files.

The project appears to be actively maintained, with recent commits and a responsive issue tracker. Comprehensive documentation and clear usage instructions contribute to its overall reliability. The reliance on standard tools and a straightforward architecture suggest a stable and dependable solution.

claude-usage benefits developers and power users who want detailed control and insight into their Claude Code API consumption. It provides a valuable alternative to Anthropic's web interface, enabling better cost management and usage optimization. By offering a local, self-contained tracking solution, it empowers users to fully understand their API costs and usage patterns, leading to more efficient and cost-effective Claude Code development.

Languages:
Summarize:
Share:
Stars
2,080
Forks
384
Issues
15
Created
5 months ago
Commit
1 month ago
License
MIT
Archived
No
Updated 3 days ago

Similar Repositories