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

ccworktime

v0.0.5

Published

Calculate your Claude Code work time from session logs

Readme

ccworktime

Calculate how much time you've spent working with Claude Code, based on your local session logs.

Install

Homebrew (macOS / Linux)

brew install ShahadIshraq/tap/ccworktime

Download binary

Grab the latest binary from GitHub Releases:

# macOS (Apple Silicon)
curl -fsSL https://github.com/ShahadIshraq/ccworktime/releases/latest/download/ccworktime-darwin-arm64.tar.gz | tar xz
sudo mv ccworktime-darwin-arm64 /usr/local/bin/ccworktime

# macOS (Intel)
curl -fsSL https://github.com/ShahadIshraq/ccworktime/releases/latest/download/ccworktime-darwin-x64.tar.gz | tar xz
sudo mv ccworktime-darwin-x64 /usr/local/bin/ccworktime

# Linux (x64)
curl -fsSL https://github.com/ShahadIshraq/ccworktime/releases/latest/download/ccworktime-linux-x64.tar.gz | tar xz
sudo mv ccworktime-linux-x64 /usr/local/bin/ccworktime

# Windows (x64, PowerShell)
Invoke-WebRequest -Uri https://github.com/ShahadIshraq/ccworktime/releases/latest/download/ccworktime-windows-x64.zip -OutFile ccworktime.zip
Expand-Archive ccworktime.zip -DestinationPath .
Move-Item ccworktime-windows-x64.exe "$env:LOCALAPPDATA\Microsoft\WindowsApps\ccworktime.exe"

npm (requires Node.js >= 18)

npx ccworktime

Or install globally:

npm install -g ccworktime

Usage

ccworktime [options]

| Flag | Description | Default | |------|-------------|---------| | --today | Show today's work time | (default) | | --yesterday | Show yesterday's work time | | | --week | Show current week (Mon–Sun) | | | --month | Show current month | | | --from <YYYY-MM-DD> | Start date | today | | --to <YYYY-MM-DD> | End date | today | | --pause <minutes> | Inactivity gap to split sessions | 10 | | --overlap merge\|accumulate | Cross-project overlap handling | merge | | --project <path> | Filter to a project directory (repeatable) | | | --no-subagents | Exclude subagent (Task tool) activity | | | --claude-dir <path> | Override ~/.claude directory | | | --version, -v | Show version number | | | --help, -h | Show help message | |

Examples

# Today's total
ccworktime

# All of February
ccworktime --from 2026-02-01 --to 2026-02-28

# This week, one project only
ccworktime --week --project ~/workspace/myapp

# Tighter session gap, accumulate overlaps
ccworktime --pause 5 --overlap accumulate

# Yesterday, no subagent time
ccworktime --yesterday --no-subagents

Sample Output

╭─────────────────────────────────────────────╮
│   Claude Code Work Time Report              │
│   Period: 2026-03-03 to 2026-03-03          │
╰─────────────────────────────────────────────╯

┌──────────────┬────────────┬───────────────────────────────────┐
│ Date         │ Duration   │ Work Blocks                       │
├──────────────┼────────────┼───────────────────────────────────┤
│ 2026-03-03   │ 3h 02m     │ 09:15 - 11:29  (2h 14m)          │
│              │            │ 14:00 - 14:48  (0h 48m)           │
├──────────────┼────────────┼───────────────────────────────────┤
│ Total        │ 3h 02m     │ 2 blocks across 1 days            │
└──────────────┴────────────┴───────────────────────────────────┘

Colors are shown in TTY terminals. Set NO_COLOR=1 to disable.

How It Works

  1. Reads JSONL conversation logs from ~/.claude/
  2. Extracts message timestamps per project
  3. Clusters timestamps into work blocks using the pause threshold
  4. Merges (or accumulates) overlapping blocks across projects
  5. Reports total focused work time per day

Requirements

  • Claude Code installed and used at least once
  • Node.js >= 18 (only for npm/npx — Homebrew and binary installs need no runtime)

License

MIT