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

git-line-visualizer

v1.2.0

Published

Visualize line-count changes of configurable file types across a git branch history in the browser — zero dependencies.

Readme

Git Line Count Visualizer

npm version npm downloads license

A zero-dependency dev tool that analyzes a git branch history and visualizes how the line counts of selected file types (e.g. *.js, *.scss) change over time, rendered as an interactive browser chart.

Install

Install as a dev dependency (recommended) and run it with npx:

npm install -D git-line-visualizer

A local install is recommended over a global one (npm i -g). The CLI command is gitline, a name other globally-installed packages might also use; installing locally keeps the command isolated to your project's node_modules/.bin and avoids any conflict.

Usage

Run it from the root of the target project (a git repository):

npx gitline

Your default browser opens automatically with the time-series chart.

Options

| Option | Default | Description | | ----------------- | --------- | ------------------------------- | | --dir <path> | src | Directory to analyze | | --branch <name> | master | Branch to analyze | | --ext <list> | js,scss | Comma-separated file extensions | | --port <number> | 4711 | Local server port |

You can also configure these via the gitline field in the target project's package.json (CLI arguments take precedence):

{
  "gitline": {
    "dir": "src",
    "branch": "master",
    "ext": "js,scss",
    "port": 4711
  }
}

Examples:

# Track TypeScript and CSS on the develop branch
npx gitline --ext ts,tsx,css --branch develop

# Analyze a different directory on a custom port
npx gitline --dir packages/web/src --port 5050

How it works

  1. Load the .gitline-cache.json cache.
  2. List commits via git log <branch>.
  3. Analyze only newly-seen commits (incremental). Line counts are cached per blob SHA, so files unchanged between commits are counted only once. The cache accumulates across branches — switching from master to develop (and back) only analyzes commits not seen before. Changing the extension set invalidates the cache and triggers a full re-analysis.
  4. Update the cache.
  5. Start a local http server and open the browser.
  6. Render the per-extension line-count chart with ECharts (loaded from CDN).

The chart shows one line series per configured extension. Use zoom/scroll to navigate, and click a commit point to see its full hash, message, author, date, and per-extension line counts (with the delta vs. the previous commit) in the side panel. Navigate between commits with the left/right arrow keys, copy the full hash from the detail panel, switch between dark and light themes, and toggle alternating month background bands — all from the header. Theme and month-shading preferences are persisted to localStorage.

Add .gitline-cache.json to your .gitignore.