{"_id":"@claudeboat/rhythm-claude","name":"@claudeboat/rhythm-claude","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@claudeboat/rhythm-claude","version":"1.0.0","description":"Health & momentum tracker for Claude Code — pace, sleep, streaks","main":"scripts/hooks.py","bin":{"rhythm":"bin/rhythm.sh"},"scripts":{"install":"./install.sh","test":"python3 -c \"import scripts.signals; print('OK')\"","postinstall":"node -e \"console.log('Run: npx rhythm install   to set up hooks')\""},"keywords":["claude-code","time-tracking","health","developer-tools","burnout-prevention"],"author":{"name":"Charkrid"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/boatnoy/rhythm-claude.git"},"engines":{"node":">=16"},"os":["darwin","linux"],"_id":"@claudeboat/rhythm-claude@1.0.0","gitHead":"48864a109cd4bbb00ec8b1ee90532a9a5a25766b","bugs":{"url":"https://github.com/boatnoy/rhythm-claude/issues"},"homepage":"https://github.com/boatnoy/rhythm-claude#readme","_nodeVersion":"22.22.0","_npmVersion":"10.9.4","dist":{"integrity":"sha512-XXdBRRThWbM8CPO1dZbbubx4zmxy4vGsx0lGdfGcPJNDSoY4eivN4cqI61ncbf+pyoTGHIbVmOUYPgtZLi6HIg==","shasum":"5f66b81d76349516e45f33dcde2bca0552909e1e","tarball":"https://registry.npmjs.org/@claudeboat/rhythm-claude/-/rhythm-claude-1.0.0.tgz","fileCount":12,"unpackedSize":65354,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIF1WCRFpKvCrSrGGb4UxbvLSe5sRFzNosd/VSFU0kr0MAiAYa0UMoErmzKMjrVpEIzNKyEPF+kqS1Cp4JpjNPOv6bQ=="}]},"_npmUser":{"name":"claudeboat","email":"charkrid@gmail.com"},"directories":{},"maintainers":[{"name":"claudeboat","email":"charkrid@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/rhythm-claude_1.0.0_1776312321144_0.07916103723056489"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-16T04:05:21.084Z","1.0.0":"2026-04-16T04:05:21.276Z","modified":"2026-04-16T04:05:21.511Z"},"maintainers":[{"name":"claudeboat","email":"charkrid@gmail.com"}],"description":"Health & momentum tracker for Claude Code — pace, sleep, streaks","homepage":"https://github.com/boatnoy/rhythm-claude#readme","keywords":["claude-code","time-tracking","health","developer-tools","burnout-prevention"],"repository":{"type":"git","url":"git+https://github.com/boatnoy/rhythm-claude.git"},"author":{"name":"Charkrid"},"bugs":{"url":"https://github.com/boatnoy/rhythm-claude/issues"},"license":"MIT","readme":"# rhythm\n\n**Health & momentum tracker for Claude Code.** Zero-config. Reads your existing prompt history, then shows pace, sleep patterns, streaks, and break classification at every session start.\n\n```\n🕐 Last session: 2h 15m (47p) in my-saas-app — ended 3m ago\n   ▓▓▓▓▓▓▓░░░ 7h 12m today · 9h 27m/d weekly · ✓ on pace\n   🔥 14-day streak · 🎯 focused on my-saas-app\n```\n\nOverdoing it? You'll know:\n\n```\n   ██████████ 13h 22m today · 9h 27m/d weekly · ⚠ overdoing\n   🌀 last night 02:47 · 🟠 5/7 nights past midnight — take a break\n```\n\nCome back from holiday? AI knows:\n\n```\n┌─ ⏰ VIRTUAL WAKE-UP ─────────────────────────────────\n│ Welcome back from holiday!\n│ Holiday break: 10 days 6h offline (Sat 05 Apr → Tue 15 Apr Bangkok)\n│ ░░░░░░░░░░ 0m today · 8h 40m/d weekly · 💤 resting\n│ 🆘 broken streak (was 14 days)\n└────────────────────────────────────────────────────\n```\n\n## Quick Install (1 command)\n\n```bash\ngit clone https://github.com/boatnoy/rhythm-claude.git ~/tools/rhythm && ~/tools/rhythm/install.sh\n```\n\nThat's it. Next Claude Code session starts showing rhythm signals.\n\n## What it measures\n\nThree axes from `~/.claude/history.jsonl` (already on your machine):\n\n| Axis | What | Signals |\n|---|---|---|\n| **PACE** | Today vs your 7-day avg | 💤 resting · 🌱 warming up · ✓ on pace · ⚡ strong · ⚠ overdoing · ☢ burnout risk |\n| **HEALTH** | Sleep time, late-night patterns | 🌙 early night · 🌑 past midnight · 🌀 graveyard · 🟡 sleep debt · 🔴 chronic |\n| **MOMENTUM** | Streaks, focus, breaks | 🏁 fresh start · 💪 consistent · 🏆 marathon · 🎯 focused · 🧩 scattered |\n\nFull signal library: [`docs/SIGNALS.md`](docs/SIGNALS.md)\n\n## Architecture\n\n```\n~/.claude/settings.json          (hooks config — points to scripts)\n     │\n     ├─ SessionStart ──→ hooks.py start ──→ banner (3 lines)\n     ├─ UserPromptSubmit → hooks.py prompt → virtual wake-up check\n     └─ Stop ───────────→ hooks.py stop\n                              │\n                   ┌──────────┴──────────┐\n                   │                     │\n              timelog.jsonl          signals.py\n           (append-only log)    (pace/health/momentum)\n                                      │\n                                history.jsonl\n                             (Claude Code built-in)\n```\n\n**Data flow:** Hooks fire on every Claude Code event → append to `timelog.jsonl` → on SessionStart (or virtual wake-up), `signals.py` reads `history.jsonl` to compute 3-axis signals → formatted as 2-3 lines → shown to user + given to AI as context.\n\n### Files\n\n```\nscripts/\n  hooks.py      Event handler. SessionStart banner + virtual wake-up detection.\n  signals.py    Pure signal computation. PACE/HEALTH/MOMENTUM axes.\n  hours.py      /hours CLI. Workday breakdown, blocks, Pandan cross-validation.\ndocs/\n  DESIGN.md     Philosophy, definitions, display rules, roadmap.\n  SIGNALS.md    Every emoji, threshold, and when it triggers.\nSKILL.md        Claude Code skill definition for /hours command.\ninstall.sh      One-command install + auto-configure hooks.\nuninstall.sh    Clean removal.\n```\n\n### Data files (created at runtime, not in repo)\n\n```\n~/.claude/skills/hours/\n  timelog.jsonl   Hook events (session_start, prompt, stop, resume_session)\n  cache/          Cached computation results for /hours CLI\n```\n\n## Customization\n\nEdit `scripts/signals.py` to tune for your rhythm:\n\n| Setting | Default | Where | Why |\n|---|---|---|---|\n| `TZ` | UTC+7 (Bangkok) | signals.py:8 | Your timezone. Affects workday boundary. |\n| `WORKDAY_CUTOFF_HOUR` | 4 (04:00) | signals.py:9 | When \"today\" starts. If you finish at 2am, it's still today. |\n| `BREAK_MS` | 3600000 (60 min) | signals.py:10 | Gaps longer than this = not active time. |\n| Pace thresholds | 40/70/85/115/140/170/220% | `_pace_signal()` | Tune after 2 weeks of real data. |\n| Wake-up threshold | 4 hours | hooks.py:31 | Gap before triggering virtual wake-up. |\n\n**macOS users:** If `wasp clean` or similar needs high file descriptors, add `ulimit -n 10240` to `~/.zshrc`.\n\n## For Other Machines (YOGI, SHIBA, etc.)\n\n```bash\n# On the new machine:\ngit clone https://github.com/boatnoy/rhythm-claude.git ~/tools/rhythm\ncd ~/tools/rhythm\n./install.sh\n\n# Verify:\necho '{}' | python3 ~/.claude/skills/hours/scripts/hooks.py start\n# Should output JSON with systemMessage\n```\n\nThe install script:\n1. Copies scripts to `~/.claude/skills/hours/`\n2. Auto-patches `~/.claude/settings.json` with the 3 hooks (backs up first)\n3. No dependencies — pure Python 3.8+ (ships with macOS)\n\nHistory builds up from the first session. Signals need ~3 days of data to be meaningful (7-day avg needs 7 days).\n\n## npm (future)\n\n```bash\n# Coming soon:\nnpx rhythm-claude install\n```\n\nTracked in the roadmap. The package will wrap `install.sh` + add `rhythm update` for pulling new versions.\n\n## Commands\n\n```\n/hours                  # today's workday breakdown\n/hours --week           # last 7 workdays table\n/hours --month          # last 30 workdays\n/hours --all            # since day 1 summary\n/hours --pandan         # cross-validate with Pandan app (macOS)\n/hours --day 2026-04-15 # specific day\n/hours --project my-app  # filter by project\n/hours --export         # JSON dump\n```\n\n## Why\n\nBuilt to answer: *\"Am I overworking, or am I slacking — honestly?\"*\n\nNo self-report. No timer app. No manual tracking. Just the data that's already there — every prompt you type is timestamped in `history.jsonl`. Rhythm turns that into self-awareness.\n\nSelf-relative, not absolute. Your baseline is *your* 7-day rhythm, not a global average. Warn both ways — below 40% is also information.\n\nMIT License.\n","readmeFilename":"README.md","_rev":"1-c4d26ef8a97f43430014df7b925143cc"}