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

compeek

v0.1.0

Published

A lightweight CLI tool for reviewing Git diffs with a GitHub-like interface

Readme

Compeek

A lightweight command-line tool for reviewing Git commit differences with a GitHub-like interface, inspired by difit.

Name Origin

Compeek is a portmanteau of "Compare" and "Peek" - perfectly capturing what this tool does: it lets you compare Git commits and peek into the differences with an intuitive interface. Just like taking a quick peek at your code changes, Compeek provides a fast and elegant way to review your Git history.

Features

  • Zero Config: Just run npx compeek and it works
  • GitHub-like Interface: Clean, modern web UI for diff viewing
  • Smart Diff Modes: Support for various comparison modes (working, staged, commits)
  • Responsive Design: Works on desktop and mobile
  • Fast: Built with modern web technologies (React, TypeScript, Vite)
  • Syntax Highlighting: Code syntax highlighting for better readability

Quick Start

npx compeek    # View the latest commit diff

Usage

Basic Usage

npx compeek <target>                    # View single commit diff
npx compeek <target> [compare-with]     # Compare two commits/branches

Single commit review

npx compeek          # HEAD (latest) commit
npx compeek 6f4a9b7  # Specific commit
npx compeek feature  # Latest commit on feature branch

Compare two commits

npx compeek HEAD main      # Compare HEAD with main branch
npx compeek @ main         # Compare HEAD with main branch (@ is alias for HEAD)
npx compeek @^ @~3         # Compare previous commit with 3 commits ago
npx compeek feature main   # Compare branches
npx compeek . origin/main  # Compare working directory with remote main

Special Arguments

compeek supports special keywords for common diff scenarios:

npx compeek .        # All uncommitted changes (staging area + unstaged)
npx compeek staged   # Staging area changes
npx compeek working  # Unstaged changes only

CLI Options

| Flag | Default | Description | | ---------------- | ------------ | ------------------------------------------------------------------- | | <target> | HEAD | Commit hash, tag, HEAD~n, branch, or special arguments | | [compare-with] | - | Optional second commit to compare with (shows diff between the two) | | --port <port> | 3000 | Preferred port; falls back to +1 if occupied | | --host <host> | 127.0.0.1 | Host address to bind server to (use 0.0.0.0 for external access) | | --no-open | false | Don't automatically open browser | | --mode <mode> | side-by-side | Display mode: inline or side-by-side | | --clean | false | Start with a clean slate by clearing all existing comments |

Architecture

  • CLI: Commander.js for argument parsing with comprehensive validation
  • Backend: Hono server with simple-git for diff processing
  • Frontend: React 19 + TypeScript + Vite
  • Styling: Tailwind CSS v4 with GitHub-like dark theme
  • Build System: TypeScript + Vite for modern bundling

Development

# Install dependencies
pnpm install

# Start development server (with hot reload)
pnpm run dev

# Build and start production server
pnpm run start <target>

# Build for production
pnpm run build

# Run tests
pnpm test

# Lint and format
pnpm run lint
pnpm run format
pnpm run typecheck

Project Structure

src/
├── cli/           # CLI entry point and utilities
├── server/        # Hono server and git diff parsing
├── client/        # React frontend application
├── types/         # TypeScript type definitions
└── utils/         # Shared utilities

Requirements

  • Node.js 16+
  • Git repository

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

This project is licensed under the MIT License - see the LICENSE file for details.