Claude Code Usage Stats
VS Code extension to view your Claude Code usage statistics directly in the editor.
Features
- 📊 Usage Dashboard: Plan-style dashboard with quota bars, token totals, and usage charts
- 📅 Daily Activity: See your recent daily activity with messages, sessions, and tool calls
- 🤖 Model Usage: Breakdown of token usage by model (GLM, Opus, Sonnet, Haiku)
- 📈 Status Bar: Live stats in your status bar (customizable)
- 🔄 Auto-refresh: Stats update when you open the panel
Installation
From Source
- Clone this repository
- Install dependencies:
npm install
- Compile:
npm run compile
- Press F5 in VS Code to open a new Extension Development Host window
Manual Install
- Run
npm run compile
- Package the extension (optional)
- Install the
.vsix file in VS Code
Configuration
Open VS Code settings and search for claudeCodeStats:
| Setting |
Default |
Description |
claudeCodeStats.dataPath |
~/.claude |
Path to Claude Code data directory |
claudeCodeStats.showInStatusBar |
true |
Show stats in status bar |
claudeCodeStats.statusBarFormat |
📊 {messages} msgs |
Status bar display format |
claudeCodeStats.dashboardTitle |
GLM Coding Plan Usage |
Dashboard title |
claudeCodeStats.planTier |
LITE |
Plan tier label in the dashboard header |
claudeCodeStats.fiveHourQuotaTokens |
0 |
Token limit for 5-hour quota progress; 0 infers a visual limit from recent local usage |
claudeCodeStats.monthlyMcpQuota |
100 |
Monthly MCP quota limit for the dashboard progress indicator |
{messages} - Total messages
{sessions} - Total sessions
{tokens} - Total tokens
{cost} - Estimated cost
Commands
| Command |
Description |
Claude Code: Show Claude Code Stats |
Open the stats panel |
Claude Code: Refresh Stats |
Manually refresh statistics |
Claude Code: Toggle Status Bar |
Show/hide status bar item |
Data Source
This extension reads from Claude Code's stats-cache.json file, typically located at:
- macOS/Linux:
~/.claude/stats-cache.json
- Windows:
%USERPROFILE%\.claude\stats-cache.json
Development
# Install
npm install
# Compile
npm run compile
# Watch mode
npm run watch
# Run in development
# Press F5 in VS Code
License
MIT
| |