Documentationnpm Package

npm Package

Automatic time tracking via git commits. Install once and forget about it!

Zero Manual Work

After installation, every git commit is automatically logged as a worklog entry. You never have to manually track time again!

How It Works

  1. Install the package globally
  2. Setup authentication (one-time)
  3. Commit your code with conventional format
  4. 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

1

Install the package globally

Open your terminal and run:

npm install -g @svenjens/mcp-autotrack-server
This automatically installs the git hooks that activate worklog tracking for all git repositories.
2

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.

Don't have an account? Sign up here - it's free!
3

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:

feat: - New Features
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)

fix: - Bug Fixes
git commit -m "fix: resolve API timeout issues"
git commit -m "fix(auth): correct JWT token expiration"

Estimated duration: 20-45 minutes

refactor: - Code Refactoring
git commit -m "refactor: improve dashboard component structure"
git commit -m "refactor(utils): simplify date formatting"

Estimated duration: 45 minutes - 1.5 hours

docs: / test: / chore: - Other
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

Duration is intelligently estimated based on:
  • 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:

  1. You make a commit with conventional format
  2. Git post-commit hook is triggered
  3. Entry is created with project, task, and duration
  4. Entry is directly sent to dashboard via API
  5. You see the entry in your dashboard
Entries are also stored locally as backup, in case you're offline!

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 TypeLines ChangedEstimated Duration
feat (feature)1-5030m - 1h
feat (feature)50-1001h - 2h
feat (feature)100+2h+
fix (bugfix)Any20m - 45m
refactorAny45m - 1h30m
docs / test / choreAny15m - 30m

Troubleshooting

Git hooks not installed

Reinstall the git hooks:

npx @svenjens/mcp-autotrack-server postinstall

No automatic entries

  1. Check if you're in a git repository
  2. Use conventional commit format (feat:, fix:, etc.)
  3. Run status check: npx @svenjens/mcp-autotrack-server status
  4. Check the git hooks folder: ls -la .git/hooks/

Entries not visible in dashboard

  1. Check if WORKLOG_AUTO_SUBMIT is set to true
  2. Verify your authentication: run autotrack init again
  3. Check your internet connection
  4. 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.

More problems? Check the full troubleshooting guide.

Uninstall

If you want to remove the package:

npm uninstall -g @svenjens/mcp-autotrack-server

This removes the package and all git hooks.