install-work-tracker
v1.0.0
Published
One-command installer for Claude Code work session tracking. Automatically adds exact timestamps and duration to every git commit.
Maintainers
Readme
install-work-tracker
One-command installer for automatic work session tracking in any git repo. Built for Claude Code.
Every git commit automatically gets exact timestamps:
feat: add user dashboard
Work-Session-Start: 2026-05-02T14:03:13.298Z
Work-Session-Duration: 45Install
From any git repo:
npx install-work-trackerOr install globally:
npm i -g install-work-tracker
install-work-trackerYou can also pass a path:
npx install-work-tracker /path/to/repoWhat it sets up
.claude/hooks/track-session.mjs— Runs on every Claude Code tool use, tracks when you start and stop working.git/hooks/prepare-commit-msg— InjectsWork-Session-StartandWork-Session-Durationtrailers into every commit message.claude/settings.json— Adds the PreToolUse hook (merges with existing settings).claude/work-session.json— Session state file (auto-gitignored)
How it works
- The session timer starts when Claude Code runs any tool
- If you're idle for 30+ minutes, the timer resets
- When you commit, the hook calculates the duration and appends it to the commit message
- Sessions are capped at 8 hours max
- Safe to re-run — it won't duplicate hooks or overwrite existing settings
Requirements
- Node.js 16+
- A git repository
- Claude Code (for the PreToolUse hook to fire)
License
MIT
