Skip to content

658jjh/claude-usage-tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧾 AI Usage Tracker

Track and visualize Claude + Codex usage costs across all your local development tools

License Platform Node Downloads Version Premium Build

Quick Start · Screenshots · Features · Supported Tools · Pricing · Contributing


AI Usage Tracker Dashboard




✨ Overview

AI Usage Tracker (formerly Claude Usage Tracker) is a local-first tool that automatically discovers and aggregates your AI coding usage across 10+ development tools — covering both Anthropic Claude and OpenAI Codex. It scans known data directories, parses JSONL/log files, calculates costs using model-specific pricing, and presents everything in a beautiful dark-themed interactive dashboard powered by Chart.js. A top-level All / Claude / Codex pill toggle scopes the entire dashboard to a single provider.

Tip

No cloud. No telemetry. No accounts. Everything stays on your machine — your data never leaves your laptop.

This project is open source under the MIT license. You can build and use it yourself for free. If you want the convenience of a ready-to-use signed macOS app with premium licensing, automatic update checks, and one-click updates, you can buy the Premium Build for $9:

Buy Premium Build →

🎯 Built for developers

  • Auto-discovery — detects Claude + Codex tools
  • Privacy-first — 100% local, zero telemetry
  • Beautiful UI — dark mode dashboard with charts
  • Zero config — just run and open

📦 Works with

OpenClaw · Clawdbot · Claude Code CLI · Claude Desktop · Cursor · Windsurf · Cline · Roo Code · Aider · Continue.dev · Codex CLI · Codex Exec · Codex Review


📸 Screenshots

Dashboard Overview

Dashboard Overview

Top-line stats (Today / Week / Month / All-time / Sessions), provider pill toggle (All / Claude / Codex), daily spend chart with source breakdown, and donut charts for cost-by-source and cost-by-model.


Projects View

Projects View

Cost grouped by working directory — see which projects burn through your token budget. Filter by source, model, date range, and minimum cost.


Session Log — Timeline

Session Log Timeline

Day-by-day session timeline with expandable rows. Color-coded model chips (Claude + GPT/Codex), full token breakdown (input / output / cache read / cache write), and per-day totals.


Peak Hours Heatmap

Peak Hours Heatmap

Hour × day activity grid revealing your most productive — and most expensive — coding hours.


Session Detail

Session Detail Panel

Drill into any session: token breakdown (including Codex reasoning tokens), conversation preview, and a one-click resume command (claude --resume <id> for Claude Code, codex resume <id> for Codex).


🚀 Features

🔍 Discovery

  • Claude + Codex auto-detection
  • 10+ supported tools
  • Silent fallback for missing tools
  • Smart provider-aware deduplication

📊 Analytics

  • Daily / weekly / monthly / all-time
  • Per-provider, per-model, per-source breakdown
  • Per-project cost rollup
  • Monthly cost projections
  • Yesterday delta comparison

🎨 Visualization

  • Dark-themed dashboard
  • Chart.js animated charts
  • Two heatmap views
  • Animated stat counters
  • Responsive layouts

🧮 Cost intelligence

  • Per-million-token pricing
  • Opus / Sonnet / Haiku tiers (Anthropic USD)
  • GPT-5.x / Codex tiers (OpenAI API USD)
  • Cache read / write + reasoning tokens
  • Most-expensive-session callout

🔎 Filtering & search

  • Provider pill (All / Claude / Codex)
  • Multi-criteria filters with chips
  • Source / model / date range
  • Minimum cost threshold

⚡ Productivity

  • Standalone .app bundle
  • Premium build with automatic update checks
  • Keyboard shortcuts (Shift+E)
  • One-click session resume (Claude + Codex)
  • Browser-mode fallback

🚀 Quick Start

Option 1 — Premium Build (Convenience)

The source code is free, but the premium build is the easiest way to use the app on macOS.

  • Price: $9 one-time purchase
  • Includes: signed macOS app, license management, automatic update checks, and one-click updates
  • Requirements: Node.js v16+ · macOS 12.0+

Buy Premium Build →

After purchase, download the .dmg, open it, drag AI Usage Tracker to Applications, and launch.


Option 2 — Build From Source (Free)

git clone https://github.com/658jjh/claude-usage-tracker.git
cd claude-usage-tracker
./build-app.sh

Then double-click AI Usage Tracker.app — it collects fresh data and renders everything in a native window.

The source build is open source and does not include the premium license gate or premium update checker.


Option 3 — Browser Mode (any OS)

cd src
node collect-usage.js
python3 -m http.server 8765
open http://localhost:8765/dashboard.html

Note

Upgrading from 2.x? Your data carries over automatically — the app migrates ~/Library/Application Support/ClaudeUsageTrackerAIUsageTracker on first launch.


📦 Supported Tools

Tool Provider Data Location Format
OpenClaw / Clawdbot Claude ~/.openclaw/agents/main/sessions/ JSONL
Claude Code CLI Claude ~/.claude/projects/ JSONL
Claude Desktop Claude ~/Library/Application Support/Claude/ JSONL
Cursor Claude ~/.cursor/projects/ JSONL
Windsurf Claude ~/.windsurf/ JSONL
Cline Claude ~/.cline/ JSONL
Roo Code Claude ~/.roo-code/ JSONL
Aider Claude ~/.aider/ JSONL (litellm)
Continue.dev Claude ~/.continue/sessions/ JSON
Codex CLI / Exec / Review Codex ~/.codex/sessions/ JSONL (rollout-*)

Note

Tool detection is automatic. If a tool isn't installed or has no data, it's silently skipped.


💰 Pricing Models

Costs are calculated using each provider's per-million-token pricing — Anthropic's published USD for Claude, OpenAI API standard USD for Codex. Totals stay comparable in a single dollar figure regardless of which provider you're viewing.

Anthropic Claude

Model Input Output Cache Write Cache Read
🔴 Opus 5.0 $20.00 $100.00 $25.00 $2.00
🟠 Opus 4.5 — 4.9 $5.00 $25.00 $6.25 $0.50
🟡 Opus 4.0 / 4.1 $15.00 $75.00 $18.75 $1.50
🟢 Sonnet 3.5 — 4.6 $3.00 $15.00 $3.75 $0.30
🔵 Haiku 4.0 / 4.5 $1.00 $5.00 $1.25 $0.10
🟣 Haiku 3.0 / 3.5 $0.25 $1.25 $0.30 $0.03

OpenAI Codex

Model Input Output Cache Read
🟢 GPT-5.5 $5.00 $30.00 $0.50
🟢 GPT-5.4 $2.50 $15.00 $0.25
🟢 GPT-5.4 Mini $0.75 $4.50 $0.075
🟢 GPT-5.3 Codex $1.75 $14.00 $0.175
🟢 GPT-5.2 $2.00 $10.00 $0.20

All prices in USD per million tokens. OpenAI bills reasoning tokens as part of output_tokens, so they aren't double-counted — the dashboard shows reasoning separately in the session detail modal for visibility only.


🤝 Contributing

Contributions are welcome — bug fixes, new tool integrations, and design improvements all encouraged.

1. Fork the repository
2. Create a feature branch:  git checkout -b feat/my-feature
3. Commit your changes:      git commit -m "feat: add my feature"
4. Push to your fork:        git push origin feat/my-feature
5. Open a Pull Request

Please follow the existing code style and commit message conventions (feat:, fix:, docs:, chore:).

💡 Ideas for contributions

  • 🔌 Add support for additional AI tools (Gemini CLI, Copilot CLI, etc.)
  • 📱 Improve mobile responsiveness
  • 📤 Add data export (CSV, JSON)
  • 🔔 Add cost alerts / budget thresholds
  • 🐧 Linux / Windows path support
  • 🖥️ Electron or Tauri desktop app

📄 License

This project is licensed under the MIT License.


Built with ❤️ for the AI developer community


☕ Support the project

If this tool saves you time, consider buying the premium convenience build or buying me a coffee:

Buy Premium Build — $9

Buy Me a Coffee



Made by developers, for developers. Star ⭐ the repo if you find it useful.

About

Track and visualize Claude AI usage costs across all local tools — OpenClaw, Claude Code, Claude Desktop, Cursor, Windsurf, Cline, Roo Code, Aider, and Continue.dev

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors