npm Package
Automatic time tracking via git commits. Install once and forget about it!
Zero Manual Work
How It Works
- Install the package globally
- Setup authentication (one-time)
- Commit your code with conventional format
- Automatic sync - entries are sent directly to dashboard!
📊 What gets logged?
- • Project: Repository name
- • Task: Commit message
- • Duration: Intelligently estimated based on code changes
- • Files: Which files were modified
- • Branch: Which branch you're working on
Installation
Install the package globally
Open your terminal and run:
npm install -g @svenjens/mcp-autotrack-server
Setup authentication
Run the init command:
autotrack init
You'll be asked for:
- Your email address
- Your password
Your credentials are securely stored locally and used for API authentication.
Start committing!
That's it! You're ready. Every commit is now automatically logged.
Installation complete! 🎉
Usage
Conventional Commit Format
Use the conventional commit format for best results. The package automatically recognizes the type of change:
git commit -m "feat: implement user authentication system"
git commit -m "feat(api): add endpoint for worklog entries"
Estimated duration: 1-2 hours (depending on lines changed)
git commit -m "fix: resolve API timeout issues"
git commit -m "fix(auth): correct JWT token expiration"
Estimated duration: 20-45 minutes
git commit -m "refactor: improve dashboard component structure"
git commit -m "refactor(utils): simplify date formatting"
Estimated duration: 45 minutes - 1.5 hours
git commit -m "docs: update API documentation"
git commit -m "test: add unit tests for auth service"
git commit -m "chore: update dependencies"
Estimated duration: 15-30 minutes
Smart Duration Estimation
- Type of change (feat, fix, refactor, etc.)
- Number of lines changed
- Number of files changed
Automatic Sync
After each commit, entries are automatically sent to your dashboard:
- You make a commit with conventional format
- Git post-commit hook is triggered
- Entry is created with project, task, and duration
- Entry is directly sent to dashboard via API
- You see the entry in your dashboard
Manual Commands (Optional)
Check Status
Check if everything is configured correctly:
npx @svenjens/mcp-autotrack-server status
Log Work Manually
Add an entry manually:
npx @svenjens/mcp-autotrack-server log --task="Manual work entry" --duration="1h"
Estimate Duration
Estimate a duration based on code changes:
npx @svenjens/mcp-autotrack-server estimate --linesChanged=50 --changeType=feature
Configuration (Optional)
You can customize behavior with environment variables:
# Dashboard URL (default: https://app.autotrack.dev/api/worklog)
export WORKLOG_DASHBOARD_URL="https://app.autotrack.dev/api/worklog"
# Auto-submit to dashboard (default: true)
export WORKLOG_AUTO_SUBMIT="true"
# Default project name (optional, otherwise repo name is used)
export WORKLOG_PROJECT="my-project"
More about configuration in the Configuration guide.
Duration Estimation Logic
The package uses a smart algorithm to estimate duration:
Change Type | Lines Changed | Estimated Duration |
---|---|---|
feat (feature) | 1-50 | 30m - 1h |
feat (feature) | 50-100 | 1h - 2h |
feat (feature) | 100+ | 2h+ |
fix (bugfix) | Any | 20m - 45m |
refactor | Any | 45m - 1h30m |
docs / test / chore | Any | 15m - 30m |
Troubleshooting
Git hooks not installed
Reinstall the git hooks:
npx @svenjens/mcp-autotrack-server postinstall
No automatic entries
- Check if you're in a git repository
- Use conventional commit format (feat:, fix:, etc.)
- Run status check:
npx @svenjens/mcp-autotrack-server status
- Check the git hooks folder:
ls -la .git/hooks/
Entries not visible in dashboard
- Check if
WORKLOG_AUTO_SUBMIT
is set totrue
- Verify your authentication: run
autotrack init
again - Check your internet connection
- Look in the browser console of your dashboard for errors
Dashboard not reachable
If the dashboard is temporarily unreachable, entries are stored locally. They will be automatically synced on your next commit when the connection works again.
Uninstall
If you want to remove the package:
npm uninstall -g @svenjens/mcp-autotrack-server
This removes the package and all git hooks.