npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

cc-session-stats

v1.1.0

Published

See how much time you actually spend with Claude Code. Session durations, daily patterns, health warnings.

Downloads

322

Readme

cc-session-stats

See how much time you actually spend with Claude Code.

Try it in your browser: yurukusa.github.io/cc-session-stats

npx cc-session-stats

What it shows

  • Total sessions and hours
  • Average session duration
  • Longest session (your personal record)
  • Hours by day of week
  • Active hours heatmap
  • Project breakdown
  • Consecutive day streak
  • Health warnings when usage looks concerning

Sample output

  Claude Code Session Stats v1.0
  ═══════════════════════════════════════
  Scanning: ~/.claude/projects/

  ▸ Overview
    Sessions:     3396
    Total hours:  101h
    Active days:  47 / 50 days
    First seen:   2026-01-10
    Last seen:    2026-02-28

  ▸ Averages
    Per session:  0.0h
    Per day:      2.1h
    Last 7 days:  23.4h across 8 days

  ▸ Longest Session
    2.7h on 2026-02-28 — cc-loop

  ▸ Hours by Day of Week
    Sun  ███████████████   20.3h
    Mon  █████████████░░   17.2h
    ...

  ▸ Streak
    Longest consecutive days: 35

  ▸ Health Warnings
    ⚠ 35 consecutive days of AI usage. Rest days exist for a reason.

  ▸ Tips
    → Schedule at least one AI-free day per week.
    → Stretch your hip flexors. They're angry. Trust me.

JSON output

For CI pipelines, dashboards, or programmatic use:

npx cc-session-stats --json

Outputs structured JSON to stdout:

{
  "version": "1.0",
  "totalSessions": 3405,
  "totalHours": 102.12,
  "activeDays": 47,
  "totalDaysSpan": 50,
  "firstSeen": "2026-01-10",
  "lastSeen": "2026-02-28",
  "averages": { "perSession": 0.03, "perDay": 2.17 },
  "longestSession": { "hours": 3.89, "date": "2026-02-28", "project": "cc-loop" },
  "hoursByDayOfWeek": { "Sun": 20.27, "Mon": 17.2, "..." : "..." },
  "topProjects": [{ "name": "~", "hours": 89.47 }, "..."],
  "streak": 35,
  "healthWarnings": ["35 consecutive days of AI usage. Rest days exist for a reason."],
  "last7Days": { "hours": 24.72, "activeDays": 8 }
}

How it works

  1. Scans ~/.claude/projects/ for session transcript files (.jsonl)
  2. Reads first and last line of each file for timestamps
  3. Calculates session durations and aggregates stats
  4. Includes subagent sessions (Task tool spawns)

Zero dependencies. No data sent anywhere. Runs entirely local.

Health warnings

The tool flags concerning patterns:

| Pattern | Warning | |---------|---------| | Sessions over 3 hours | Your spine has opinions | | 7+ consecutive days | Rest days exist for a reason | | Average session > 2 hours | 90-minute focus blocks are backed by research | | 6+ hours/day average | That's a full workday of sitting |

Part of cc-toolkit

cc-session-stats is one of 36 free tools for Claude Code users.

See all 36 tools at yurukusa.github.io/cc-toolkit

| Tool | What it checks | |------|---------------| | cc-health-check | Is your AI setup safe? | | cc-session-stats | How much are you using AI? | | cc-agent-load | Is it you or the AI working? | | cc-audit-log | What did your AI do? | | cc-cost-check | Cost per commit calculator | | cc-wrapped | Your AI year in review (Spotify Wrapped style) | | cc-personality | What kind of Claude Code developer are you? | | cc-roast | Your CLAUDE.md, brutally honest | | cc-ops-kit | Production hooks to keep autonomous Claude Code safe ($19) |

License

MIT