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 🙏

© 2025 – Pkg Stats / Ryan Hefner

punch-the-clock

v0.1.0

Published

PTC - Punch the Clock: A task-based time tracking CLI for developers and AI coding agents to measure development velocity

Downloads

89

Readme

PTC - Punch the Clock

npm version License: MIT Node.js Version

A task-based time tracking CLI tool designed for developers and AI coding agents to measure development velocity.

Overview

PTC (Punch the Clock) allows you to create projects, attach tasks with numbers, titles, descriptions, states, and tags, then track time using simple start/pause/resume/stop commands. All time calculations are based on timestamps - no actual timers required. Perfect for measuring development velocity and estimation accuracy.

Features

  • Project Management: Create, list, and switch between projects
  • Task Management: Add, update, and track tasks with metadata
  • Time Tracking: Start, pause, resume, and stop time tracking sessions
  • Estimation Tracking: Track size and time estimates for velocity analysis
  • Reporting: Generate time, velocity, and estimation accuracy reports
  • Database Integration: MySQL database with connection pooling
  • Performance: Optimized for large datasets (1000+ tasks)
  • CLI Interface: Simple, intuitive command-line interface
  • Error Handling: Comprehensive error handling with user-friendly messages
  • Configuration: Flexible configuration management

Installation

npm install -g punch-the-clock

Prerequisites

  • Node.js 16.0.0 or higher
  • MySQL 8.0 or higher (local or remote)

Quick Start

# Initialize a new project
ptc init my-project

# Add a task with optional estimates
ptc add "Fix login bug" --estimate 2h --size 3

# Start tracking time
ptc start 1

# Pause, resume, or stop
ptc pause
ptc resume
ptc stop

# Generate velocity reports
ptc report velocity
ptc report estimates

Commands

Project Management

ptc init <project-name>          # Create a new project
ptc list projects                # List all projects
ptc project <project-name>       # Switch to a project

Task Management

ptc add <title>                  # Add a new task
ptc list tasks                   # List tasks in current project
ptc task <task-id>               # Show task details
ptc update <task-id>             # Update task properties

Time Tracking

ptc start <task-id>              # Start time tracking
ptc pause                        # Pause current tracking
ptc resume                       # Resume paused tracking
ptc stop                         # Stop time tracking

Reporting

ptc report time                  # Show time tracking reports
ptc report velocity              # Show velocity metrics
ptc report estimates             # Show estimation accuracy

Configuration

ptc config show                  # Show current configuration
ptc config set <key> <value>     # Set configuration value

Database Setup

PTC will automatically create the database schema on first run. You can also set it up manually:

# Create database
mysql -u root -p -e "CREATE DATABASE ptc;"

# Set up user (optional)
mysql -u root -p -e "CREATE USER 'ptc'@'localhost' IDENTIFIED BY 'password';"
mysql -u root -p -e "GRANT ALL PRIVILEGES ON ptc.* TO 'ptc'@'localhost';"

Configuration

Create a .ptcrc file in your home directory:

{
  "database": {
    "host": "localhost",
    "port": 3306,
    "user": "ptc",
    "password": "password",
    "database": "ptc"
  }
}

Performance

  • CLI commands respond within 100ms
  • Optimized for large datasets (1000+ tasks)
  • Memory usage optimized
  • Concurrent operation support
  • Performance monitoring and metrics

Development

# Clone the repository
git clone https://github.com/ptc-team/punch-the-clock.git
cd punch-the-clock

# Install dependencies
npm install

# Build the project
npm run build

# Run tests
npm test

# Run with coverage
npm run test:coverage

# Lint code
npm run lint

# Fix linting issues
npm run lint:fix

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests for new functionality
  5. Ensure all tests pass
  6. Submit a pull request

License

MIT License - see LICENSE file for details.

Support

Changelog

See CHANGELOG.md for a list of changes and version history.