Introduction
As a heavy Claude Code user, I often wondered: "How much did Claude actually work for me today?" So I created ccstat - a CLI tool that visualizes your Claude Code sessions in a GitHub contribution graph style. Think of it as monitoring your AI pair programmer's productivity! 🤖
Features
Claude Code stores session logs in ~/.claude/projects for each directory where it's executed. ccstat analyzes these logs to display and aggregate activity history by directory over specified time periods.
Main features:
- 📊 Activity visualization: GitHub-style contribution heatmap with color-coded intensity
- ⏱️ Smart time tracking: Calculates actual active time as accurately as possible
- 📁 Project-wise aggregation: Track work volume per directory
- 🌲 Git integration: Repository-based aggregation with worktree support
The Git integration is particularly useful when using git worktree - different directories might represent work on the same repository. ccstat intelligently groups these together and can display parent-child relationships at the repository level.
Getting Started
Installation
curl -fsSL https://ktny.github.io/ccstat/install.sh | sh
Basic Usage
Simply run:
ccstat
This shows Claude Code activity for the past 24 hours, organized by project.
Advanced Usage
# Display worktree relationships
ccstat --worktree
# Show past 7 days of activity
ccstat --days 7
# Show detailed activity for past 6 hours
ccstat --hours 6
# Focus on specific project
ccstat --project myproject
Use Cases
Understanding Your Development Rhythm
# Check this week's work patterns
ccstat --days 7
# See concentration on a specific project
ccstat --project important-feature --hours 12
Behind the Scenes
Building this tool was incredibly fast thanks to Claude Code itself - the speed of development was unimaginable just a short while ago. Ideas that used to take forever to complete (and often led to abandonment) can now be built rapidly.
I'm also considering Gemini CLI support in the future.
Wrapping Up
If you try ccstat, I'd love to hear your feedback! Stars on GitHub are always appreciated too! ⭐
Top comments (0)