npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

workday-daemon

v0.2.2

Published

Lightweight activity tracker & timesheet tool

Readme

workday-daemon

Background daemon that tracks developer activity via git and pushes timesheets to Tempo.

Polls git repos every 30s, detects work sessions from diffs/reflog/commits, scores activity, and produces daily JSON logs. Supports multi-repo tracking with automatic leader election, adaptive idle timeouts, and manual time adjustments.

Install

npm install -g workday-daemon

Requires Node.js 20+.

Quick Start

workday init                  # creates ~/.workday/ with config templates
# edit ~/.workday/config.json — add repo paths
# edit ~/.workday/secrets.json — set Developer name
workday start                 # start background daemon
workday status                # check running sessions
workday today                 # full day summary

Commands

workday init                           Initialize config in ~/.workday/
workday start                          Start daemon (background)
workday stop                           Stop daemon
workday status                         Show daemon status and sessions
workday today                          Today's summary
workday day YYYY-MM-DD                 Past day summary
workday pause [repo]                   Pause sessions
workday resume                         Resume paused sessions
workday autopause on|off [repo]        Toggle idle auto-pause
workday adjust <target> +N "reason"    Add manual time
workday set-start HH:MM               Set day start earlier
workday tempo                          Show report (month to date)
workday tempo --push                   Push to Tempo
workday daemon                         Run in foreground (live dashboard)

Configuration

~/.workday/config.json

{
  "repos": ["/path/to/repo-a", "/path/to/repo-b"],
  "dayBoundaryHour": 4,
  "taskPattern": "PROJ-\\d+",
  "genericBranches": ["develop", "main", "master"],
  "session": {
    "diffPollSeconds": 30,
    "signalDeduplicationSeconds": 300,
    "reflogCount": 20
  },
  "report": { "roundingMinutes": 15 },
  "workDays": [1, 2, 3, 4, 5]
}

~/.workday/secrets.json

{
  "Developer": "your-git-username",
  "TempoToken": "",
  "JiraToken": "",
  "JiraBaseUrl": ""
}

Config can also live next to package.json for local development — the daemon checks there first before falling back to ~/.workday/.

How It Works

  1. Polls git diff --numstat, git status, and git reflog for each repo
  2. Filters branches by developer name
  3. Computes diff deltas between snapshots (dynamics = actual keystrokes)
  4. Manages session lifecycle: IDLE → PENDING → ACTIVE
  5. Scores activity via EMA with adaptive idle timeout (15–45 min)
  6. Elects a leader session across repos (highest score wins)
  7. Writes atomic JSON logs to ~/.workday/data/YYYY-MM/MM-DD.json
  8. Day boundary detected automatically (default 4:00 AM)

Data

Daily logs stored as JSON in ~/.workday/data/. Sessions recover after crashes (up to 7 days lookback).

License

MIT