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

web-git-viewer

v1.0.2

Published

A visual git repository browser in your browser — commit graph, diffs, file explorer, markdown rendering

Readme

Web Git Viewer

A visual git repository browser in your browser, with a VS Code-inspired dark theme. Browse commit history with a branch graph, view diffs with syntax highlighting, and explore files with markdown rendering and media previews.

No install required — just npx web-git-viewer inside any git repo.

Screenshots

Git Mode — Commit graph, file list, and diff viewer

Git View

Files Mode — File explorer with syntax highlighting

Files View

Features

  • Commit graph — visual branch/merge graph like GitLens or Fork
  • Diff viewer — side-by-side line numbers, additions/deletions, syntax highlighting
  • File browser — explore the working tree with a file explorer sidebar
  • Markdown rendering.md and .mdx files render as formatted HTML
  • Media previews — images, audio, and video files display inline
  • Download — download any file directly from the viewer
  • Uncommitted changes — see working tree modifications at the top of the log
  • Password protection — optional password auth via CLI flag
  • Responsive — works on mobile with swipe-style panel navigation
  • Syntax highlighting — JS/TS, Python, Go, Rust, Java, C/C++, Ruby, PHP, SQL, Shell, and more

Usage

# View the current directory (must be a git repo)
npx web-git-viewer

# View specific repositories
npx web-git-viewer /path/to/repo1 /path/to/repo2

# Custom port
npx web-git-viewer -p 3000

# Password-protect the viewer
npx web-git-viewer --password mysecret

# Combine — cwd is auto-added if it's a git repo
npx web-git-viewer -p 8080 --password mysecret /path/to/other-repo

Then open http://localhost:6181 in your browser.

Options

| Flag | Description | |------|-------------| | -p, --port <port> | Port to listen on (default: 6181) | | --password <password> | Require password to access the viewer | | -h, --help | Show help message |

How repos are resolved

  1. Any paths passed as arguments are validated and added
  2. If the current working directory contains a .git folder, it is automatically added to the list
  3. If no paths are given and cwd is not a git repo, the command exits with an error

Password Protection

When --password is set, all routes are protected behind a login page. Authentication uses:

  • Timing-safe comparison (crypto.timingSafeEqual) to prevent timing attacks
  • Cryptographically random session tokens (crypto.randomBytes) — 32 bytes / 256 bits
  • HttpOnly, SameSite=Strict cookies — not accessible to JavaScript, no CSRF
  • Rate limiting — 500ms delay on failed login attempts
  • Sessions expire after 24 hours.

Modes

Git Mode

Browse commit history with a visual branch graph. Click a commit to see changed files, click a file to see the diff. Uncommitted changes appear at the top when on the default branch.

Files Mode

Explore the repository's working tree. Navigate folders, view files with syntax highlighting, preview images and audio, and read markdown files with full formatting.

Requirements

  • Node.js 18+
  • git CLI available on the PATH

Tech Stack

  • Backend — Node.js, Express, git CLI
  • Frontend — vanilla JS, HTML, CSS (no build step, no framework)
  • Zero config — no database, just point at a repo

Publishing (for maintainers)

npm login
npm publish

License

ISC