DEV Community

Yurukusa
Yurukusa

Posted on • Edited on

I Discovered I'd Spent 116 Hours with Claude Code in 50 Days — So I Built a CLI to Track It

?
I've been running Claude Code every day for 50 days straight. $200/month for Claude Max.

I had absolutely no idea how many hours I was actually spending.

So I built this:

npx cc-session-stats
Enter fullscreen mode Exit fullscreen mode

Try it in your browser (no install needed): yurukusa.github.io/cc-session-stats

My actual numbers

When I finally ran it:

Total sessions:     3,485
Total hours:        116 h
Active days:        47 / 50
Longest streak:     35 consecutive days
Avg session:        120 min
Enter fullscreen mode Exit fullscreen mode

The tool said: "Rest days exist for a reason."

That hit different.

How it works

Claude Code generates JSONL session transcripts in ~/.claude/projects/. Each file has timestamps. The tool reads the first and last line of each file to compute session duration - no API calls, no server, zero dependencies.

~/.claude/
  projects/
    -home-user-projects-myapp/
      abc123.jsonl   ? timestamps in here
    -home-user-projects-other/
      def456.jsonl
Enter fullscreen mode Exit fullscreen mode

One npx command. That's it.

Note: Session count includes autonomous subagent sessions spawned via Claude Code's Task tool. Your interactive sessions are a subset of the total.

What it shows

  • Total hours and session count
  • Day-of-week heatmap (which days you code most)
  • Streak counter - consecutive active days
  • Health warnings when usage is excessive
  • Top projects by time spent

Health warnings

This was the unexpected part.

When you see "35 consecutive days without rest" printed in your terminal, it's not the same as vaguely knowing you've been working a lot. It's quantified. It's undeniable.

The tool checks for:

  • Sessions over 3 hours
  • 7+ consecutive active days
  • Active on >90% of days in the past month

I added these warnings for myself. I needed them.

Also: what's your developer archetype?

If you want to go one level deeper, I also built:

npx cc-personality
Enter fullscreen mode Exit fullscreen mode

Browser version: yurukusa.github.io/cc-personality

This diagnoses your coding archetype from the same data. I'm a ?? Midnight Beast (51% of sessions between 10pm-5am).


Zero dependencies. Reads locally. Data never leaves your machine.

GitHub: cc-session-stats | cc-personality

What did your numbers say?


More tools: Dev Toolkit - 56 free browser-based tools for developers. JSON, regex, colors, CSS, SQL, and more. All single HTML files, no signup.

Top comments (0)