by hmenzagh
Deep analytics and session insights for your Claude Code usage
# Add to your Claude Code skills
git clone https://github.com/hmenzagh/CCMetercurl --proto '=https' --tlsv1.2 -LsSf https://github.com/hmenzagh/CCMeter/releases/latest/download/ccmeter-installer.sh | sh
ccmeter # launch the dashboard
# press `.` for the settings panel, `q` to quit
CCMeter reads your local Claude Code session data and renders an interactive TUI dashboard. Data refreshes every 5 minutes (manual reload with r).
Metrics & analytics
Visualizations
No comments yet. Be the first to share your thoughts!
Project handling & performance
Shift+Tabcurl --proto '=https' --tlsv1.2 -LsSf https://github.com/hmenzagh/CCMeter/releases/latest/download/ccmeter-installer.sh | sh
Install prebuilt binaries via Homebrew:
brew install hmenzagh/tap/ccmeter
git clone https://github.com/hmenzagh/CCMeter.git
cd CCMeter
cargo install --path . # installs `ccmeter` to ~/.cargo/bin (make sure it's in $PATH)
Or build without installing — the binary will be at target/release/ccmeter:
cargo build --release
Requirements (from source): Rust 1.85+ and Cargo.
ccmeter
| Key | Action |
|-----|--------|
| Tab | Cycle time filter |
| Shift+Tab | Switch source root |
| j / k or Up / Down | Scroll projects |
| h / l or Left / Right | Navigate between projects |
| Esc | Deselect project |
| . | Open settings panel |
| r | Reload data |
| q / Ctrl+C | Quit |
Press . to open the settings panel, where you can:
CCMeter discovers Claude Code sessions by scanning your home directory for any folder whose name contains claude and that has a projects/ subdirectory with session logs (so ~/.claude/projects, ~/.config/claude/projects, and other Claude-compatible CLIs are all picked up automatically). It parses JSONL session files in parallel using rayon, extracts token counts and model identifiers, and computes costs from built-in pricing tables.
Session JSONL → parallel parse → daily aggregates → cached history → TUI render
Parsed metrics are persisted to ~/.config/ccmeter/history.json. On subsequent launches, only new or modified session files are parsed, everything else is served from cache, making startup near-instant even with thousands of sessions.
Use h/l or arrow keys to select a project card. The dashboard switches to a detail view showing:
Press Esc to go back to the global overview.
User overrides are stored at ~/.config/ccmeter/overrides.json and can be edited through the settings panel or manually.
| Crate | Role | |-------|------| | ratatui | Terminal UI framework | | crossterm | Terminal event handling | | clap | CLI argument parsing | | rayon | Parallel JSONL parsing | | chrono | Date/time handling | | serde / serde_json | Serialization & JSONL parsing | | dirs | Cross-platform home/config paths |
src/
├── main.rs # Entry point & event loop
├── app.rs # Core application state
├── config/
│ ├── mod.rs
│ ├── discovery.rs # Project auto-discovery
│ └── overrides.rs # User configuration & merges
├── data/
│ ├── mod.rs
│ ├── parser.rs # JSONL session parsing
│ ├── cache.rs # Persistent metric cache
│ ├── tokens.rs # Daily token aggregation
│ └── models.rs # Model pricing tables
└── ui/
├── mod.rs
├── dashboard.rs # Main layout
├── heatmap.rs # Heatmap rendering
├── theme.rs # Color theme
├── time_filter.rs # Time range logic
├── settings_view.rs # Settings panel
└── cards/
├── mod.rs
├── data.rs # Card data aggregation
└── render.rs # Card rendering
MIT