{"id":47996576,"url":"https://github.com/yurukusa/cc-session-stats","last_synced_at":"2026-04-04T12:00:47.839Z","repository":{"id":341079900,"uuid":"1168747639","full_name":"yurukusa/cc-session-stats","owner":"yurukusa","description":"See how much time you actually spend with Claude Code. Session durations, daily patterns, health warnings.","archived":false,"fork":false,"pushed_at":"2026-03-21T11:37:33.000Z","size":84,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-04-04T11:59:56.942Z","etag":null,"topics":["ai","claude","claude-code","cli","developer-tools","productivity"],"latest_commit_sha":null,"homepage":"https://yurukusa.github.io/cc-session-stats/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yurukusa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-27T18:48:36.000Z","updated_at":"2026-03-21T11:37:36.000Z","dependencies_parsed_at":"2026-04-04T12:00:31.445Z","dependency_job_id":null,"html_url":"https://github.com/yurukusa/cc-session-stats","commit_stats":null,"previous_names":["yurukusa/cc-session-stats"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yurukusa/cc-session-stats","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yurukusa%2Fcc-session-stats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yurukusa%2Fcc-session-stats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yurukusa%2Fcc-session-stats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yurukusa%2Fcc-session-stats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yurukusa","download_url":"https://codeload.github.com/yurukusa/cc-session-stats/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yurukusa%2Fcc-session-stats/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31398770,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","claude","claude-code","cli","developer-tools","productivity"],"created_at":"2026-04-04T12:00:27.448Z","updated_at":"2026-04-04T12:00:47.825Z","avatar_url":"https://github.com/yurukusa.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cc-session-stats\n\nSee how much time you actually spend with Claude Code.\n\n**Try it in your browser:** [yurukusa.github.io/cc-session-stats](https://yurukusa.github.io/cc-session-stats/)\n\n```\nnpx cc-session-stats\n```\n\n## What it shows\n\n- Total sessions and hours\n- Average session duration\n- Longest session (your personal record)\n- Hours by day of week\n- Active hours heatmap\n- Project breakdown\n- Consecutive day streak\n- Health warnings when usage looks concerning\n\n## Sample output\n\n```\n  Claude Code Session Stats v1.0\n  ═══════════════════════════════════════\n  Scanning: ~/.claude/projects/\n\n  ▸ Overview\n    Sessions:     3396\n    Total hours:  101h\n    Active days:  47 / 50 days\n    First seen:   2026-01-10\n    Last seen:    2026-02-28\n\n  ▸ Averages\n    Per session:  0.0h\n    Per day:      2.1h\n    Last 7 days:  23.4h across 8 days\n\n  ▸ Longest Session\n    2.7h on 2026-02-28 — cc-loop\n\n  ▸ Hours by Day of Week\n    Sun  ███████████████   20.3h\n    Mon  █████████████░░   17.2h\n    ...\n\n  ▸ Streak\n    Longest consecutive days: 35\n\n  ▸ Health Warnings\n    ⚠ 35 consecutive days of AI usage. Rest days exist for a reason.\n\n  ▸ Tips\n    → Schedule at least one AI-free day per week.\n    → Stretch your hip flexors. They're angry. Trust me.\n```\n\n## JSON output\n\nFor CI pipelines, dashboards, or programmatic use:\n\n```\nnpx cc-session-stats --json\n```\n\nOutputs structured JSON to stdout:\n\n```json\n{\n  \"version\": \"1.0\",\n  \"totalSessions\": 3405,\n  \"totalHours\": 102.12,\n  \"activeDays\": 47,\n  \"totalDaysSpan\": 50,\n  \"firstSeen\": \"2026-01-10\",\n  \"lastSeen\": \"2026-02-28\",\n  \"averages\": { \"perSession\": 0.03, \"perDay\": 2.17 },\n  \"longestSession\": { \"hours\": 3.89, \"date\": \"2026-02-28\", \"project\": \"cc-loop\" },\n  \"hoursByDayOfWeek\": { \"Sun\": 20.27, \"Mon\": 17.2, \"...\" : \"...\" },\n  \"topProjects\": [{ \"name\": \"~\", \"hours\": 89.47 }, \"...\"],\n  \"streak\": 35,\n  \"healthWarnings\": [\"35 consecutive days of AI usage. Rest days exist for a reason.\"],\n  \"last7Days\": { \"hours\": 24.72, \"activeDays\": 8 }\n}\n```\n\n## How it works\n\n1. Scans `~/.claude/projects/` for session transcript files (.jsonl)\n2. Reads first and last line of each file for timestamps\n3. Calculates session durations and aggregates stats\n4. Includes subagent sessions (Task tool spawns)\n\n**Zero dependencies. No data sent anywhere. Runs entirely local.**\n\n## Health warnings\n\nThe tool flags concerning patterns:\n\n| Pattern | Warning |\n|---------|---------|\n| Sessions over 3 hours | Your spine has opinions |\n| 7+ consecutive days | Rest days exist for a reason |\n| Average session \u003e 2 hours | 90-minute focus blocks are backed by research |\n| 6+ hours/day average | That's a full workday of sitting |\n\n## Part of cc-toolkit\n\ncc-session-stats is one of 100+ free tools for Claude Code users.\n\n**→ [See all cc-toolkit tools](https://yurukusa.github.io/cc-toolkit/)**\n\n| Tool | What it checks |\n|------|---------------|\n| [cc-health-check](https://github.com/yurukusa/cc-health-check) | Is your AI **setup** safe? |\n| **cc-session-stats** | How much are you **using** AI? |\n| [cc-agent-load](https://github.com/yurukusa/cc-agent-load) | Is it **you** or the AI working? |\n| [cc-audit-log](https://github.com/yurukusa/cc-audit-log) | What did your AI **do**? |\n| [cc-cost-check](https://yurukusa.github.io/cc-cost-check/) | Cost per commit calculator |\n| [cc-wrapped](https://yurukusa.github.io/cc-wrapped/) | Your AI year in review (Spotify Wrapped style) |\n| [cc-personality](https://github.com/yurukusa/cc-personality) | What kind of Claude Code developer are you? |\n| [cc-roast](https://yurukusa.github.io/cc-roast/) | Your CLAUDE.md, brutally honest |\n| [cc-ops-kit](https://yurukusa.github.io/cc-ops-kit-landing/?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=cc-session-stats) | Production hooks to keep autonomous Claude Code safe ($19) |\n\n### Want more than stats? Make your sessions safer.\n\n**Quick safety setup:** `npx cc-safe-setup` — 8 hooks in 10 seconds (free). [GitHub](https://github.com/yurukusa/cc-safe-setup)\n\n**[Claude Code Ops Kit](https://yurukusa.github.io/cc-ops-kit-landing/?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=cc-session-stats)** — 16 production hooks + 5 templates + 3 tools. Built from 160+ hours of autonomous operation.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyurukusa%2Fcc-session-stats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyurukusa%2Fcc-session-stats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyurukusa%2Fcc-session-stats/lists"}