CodeStats Tracker


CodeStats Tracker is a Visual Studio Code extension that tracks your Claude Code usage — models, tokens, sessions, estimated context-window usage and cost — right from the status bar and a built-in dashboard. It reads the session transcripts Claude Code already saves locally on your machine; nothing is sent anywhere.
A legacy module (coding time by project/language) from earlier versions is still available as a secondary tab.
Breadcrumbs
Features
- Status bar showing your active model, tokens used today, and the context-window usage of your latest session.
- Claude Usage dashboard with:
- Tokens per day (input / output / cache), by model.
- Tokens by model and by project.
- Estimated context-window usage per session (how close a session got to compaction).
- Active vs. idle time within your Claude Code sessions.
- Recent sessions table and per-model breakdown.
- Optional, clearly-labeled cost estimate (off by default).
- Legacy module: the original coding-time-by-project/language tracker, kept as a secondary tab.
- Modern, dark, responsive interface.
How to use CodeStats Tracker?
1. Start tracking
- Nothing to configure: the extension reads the transcripts Claude Code already writes to
~/.claude/projects/**/*.jsonl on this machine.
- The status bar updates automatically once you've used Claude Code at least once.
2. Open the dashboard
- Click the status bar item, or
- Press
Ctrl+Shift+P and run CodeStats: View Dashboard.
3. Explore your Claude usage
- 🤖 Uso de Claude (default tab): tokens, sessions, models, context %, active/idle time, top projects.
- 🗂️ Legacy: Tiempo de código: the original per-project/per-language coding-time tracker.
4. Settings
| Setting |
Default |
Description |
codestats.claudeUsage.dataDir |
(auto) |
Override the folder where Claude Code stores its data (must contain a projects subfolder). |
codestats.claudeUsage.contextWindowTokens |
200000 |
Context-window size used to estimate the % consumed per session. |
codestats.claudeUsage.showCostEstimates |
false |
Show an estimated USD cost based on public Anthropic API pricing. Approximate — doesn't apply to Claude Pro/Max plans. |
🔒 Where does the data come from?
Everything is read locally from the transcript files Claude Code already saves on your machine — no network calls, no telemetry, no credentials involved. You can point the extension at a different folder with codestats.claudeUsage.dataDir if your Claude Code data lives somewhere non-default.
🚀 What's New in Version 0.2.0
- Pivoted to Claude usage tracking: tokens, models, sessions, context-window %, and active/idle time, read from local Claude Code transcripts.
- Legacy module: the previous coding-time tracker is still there, one click away.
- Optional cost estimates, off by default and clearly marked as approximate.
Contributing
Contributions are welcome! You can open issues or pull requests to suggest improvements or report bugs.
Questions or suggestions?
Open an issue in the repository or contact the author!

Author
Hi! I'm David Bedoya Hernández, a passionate software developer focused on productivity tools and automation.
Feel free to reach out for feedback, collaboration, or just to connect!
License 
MIT
Thank you for using CodeStats Tracker!