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

@himpel/work-log

v0.1.2

Published

A starter for creating a TypeScript package.

Readme

work-log

📊 A CLI tool that tracks time spent in git branches using reflog analysis and displays results in a beautiful table format.

Features

  • Time tracking: Automatically calculates time spent in each git branch today
  • Git reflog analysis: Uses git reflog to track branch switches and calculate durations
  • Beautiful output: Terminal table display using Ink React
  • Real-time data: Shows current day's branch activity with last active times
  • Zero configuration: Works out of the box in any git repository

Installation

# Clone and install dependencies
git clone <repo-url>
cd work-log
pnpm install

# Build the project
pnpm run build

# Run the CLI tool
pnpm run work-log

Usage

Development Mode

# Run directly with tsx (development)
pnpm run work-log

Built Version

# Run the built CLI tool
node dist/main.js

# Or use the npm script
pnpm start

Global Installation (after publishing)

# Install globally
npm install -g work-log

# Run anywhere
work-log

Example Output

📊 Git Branch Time Tracker - Today

Branch          Time      Last Active
────────────────────────────────────────
feature/login   2h 34m    14:23
main           1h 12m    16:45
bugfix/auth    45m       13:10
────────────────────────────────────────
Total          4h 31m

How It Works

  1. Reflog Analysis: Parses git reflog to find branch checkout events from today
  2. Time Calculation: Calculates duration between branch switches
  3. Data Aggregation: Sums up total time spent per branch
  4. Table Display: Uses Ink React to render a beautiful terminal table

Requirements

  • Node.js (latest LTS recommended)
  • Git repository (tool must be run inside a git repo)
  • Branch switching activity (tool shows data for current day only)

Development

Setup

# Install dependencies
pnpm install

# Run in development mode
pnpm run dev

Available Scripts

  • pnpm run build - Build with tsdown
  • pnpm run dev - Development mode with watch
  • pnpm run test - Run tests with vitest
  • pnpm run lint - Lint code with ESLint
  • pnpm run format - Format code with Prettier
  • pnpm run format:check - Check formatting
  • pnpm run typecheck - TypeScript type checking
  • pnpm run work-log - Run CLI tool in development

Tech Stack

  • Build Tool: tsdown
  • Runtime: Node.js
  • UI Framework: Ink (React for CLI)
  • Git Operations: simple-git
  • Language: TypeScript
  • Testing: Vitest
  • Linting: ESLint + Prettier

Code Conventions

  • Use type instead of interface for TypeScript
  • File naming: kebab-case (work-log-app.tsx)
  • ESM modules with strict TypeScript

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Follow the code conventions in CLAUDE.md
  4. Run tests and linting: pnpm run test && pnpm run lint
  5. Submit a pull request

License

MIT