https://github.com/yurukusa/cc-project-stats
Time spent per project in Claude Code — ranked by hours, you vs AI
https://github.com/yurukusa/cc-project-stats
ai claude claude-code developer-tools productivity
Last synced: 3 months ago
JSON representation
Time spent per project in Claude Code — ranked by hours, you vs AI
- Host: GitHub
- URL: https://github.com/yurukusa/cc-project-stats
- Owner: yurukusa
- Created: 2026-02-28T17:06:03.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2026-02-28T19:32:25.000Z (4 months ago)
- Last Synced: 2026-02-28T22:50:25.313Z (4 months ago)
- Topics: ai, claude, claude-code, developer-tools, productivity
- Language: HTML
- Homepage: https://yurukusa.github.io/cc-project-stats/
- Size: 9.77 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cc-project-stats
Where are you actually spending your Claude Code time? This tool breaks down your hours by project — ranked by total time, split between you and AI.
## Usage
```bash
npx cc-project-stats # last 7 days
npx cc-project-stats --days=30 # last 30 days
npx cc-project-stats --all # all time
npx cc-project-stats --json # raw JSON output
```
## Output
```
cc-project-stats — last 7 days
2026-02-22 → 2026-03-01
──────────────────────────────────────────────────────────────────
Project You AI Total
──────────────────────────────────────────────────────────────────
cc-loop ██████████████ 24.6h 11.1h 35.7h
~ ████████░░░░░░ 4.8h 11.1h 15.9h
──────────────────────────────────────────────────────────────────
Total 29.3h 22.2h 51.5h
Top: cc-loop — 69% of total, human-led (69% interactive)
```
The bar chart shows cyan (█) for your interactive hours and yellow (█) for AI autonomous hours within each project.
## Options
| Flag | Description |
|------|-------------|
| `--days=` | Look back N days (default: 7) |
| `--all` | Show all-time stats |
| `--json` | Print raw JSON for scripting |
| `--help` | Show help |
## How it works
Reads session files directly from `~/.claude/projects/`. Uses the same methodology as [cc-agent-load](https://www.npmjs.com/package/cc-agent-load):
- **Your hours** (cyan): direct conversation sessions
- **AI hours** (yellow): autonomous subagent sessions in `*/subagents/`
- **Duration**: time between first and last message in each session file
## Requirements
- Node.js 18+
- Claude Code with `~/.claude/projects/` session history
No external dependencies needed. Works independently of cc-agent-load.
## Part of cc-toolkit
This tool is part of the [cc-toolkit](https://yurukusa.github.io/cc-toolkit/) collection of Claude Code utilities.
**Zero dependencies. No data sent anywhere. Runs entirely local.**