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-vanish

v1.2.0

Published

Interactively browse your repo and permanently vanish sensitive files from all git commit history — secrets gone from every commit, file preserved on disk as untracked.

Readme

git-vanish 🔥

git-vanish

Interactively browse your repo and permanently vanish a sensitive file from all git commit history — without deleting your other commits.

The problem

You git pushed a file containing secrets (API keys, passwords, .env, credentials.json, etc.) to GitHub. Once it's in history, just deleting the file and committing again is not enough — the secret is still visible in every past commit.

git-vanish surgically removes that file from every single commit across all branches and tags, while preserving the rest of your history exactly as it was.


Install globally

npm install -g git-vanish

Usage

Run inside any git repository:

git-vanish

This opens an interactive terminal file browser where you can navigate your repo and pick the file to scrub.

Options

| Flag | Description | | ------------------- | --------------------------------------------- | | -r, --repo <path> | Path to git repo (default: current directory) | | -f, --file <path> | Skip browser — provide the file path directly | | --dry-run | Preview what would happen, no changes made | | --no-gc | Skip the aggressive garbage collection step | | -V, --version | Show version | | -h, --help | Show help |

Examples

# Interactive file browser
git-vanish

# Vanish a specific file directly
git-vanish --file config/secrets.json

# Preview only (no changes)
git-vanish --dry-run

# Different repo
git-vanish --repo /path/to/my-project

Keyboard Controls (file browser)

| Key | Action | | ----------------- | ---------------------------------------- | | / | Navigate up/down | | / Enter | Open directory or quick-select file | | / Backspace | Go up one directory | | j / k | Vim-style up/down | | Space | Toggle file selection (multi-select) | | a | Select all tracked files in current view | | u | Deselect all | | / | Search/filter entries | | Escape | Clear search | | Page Up/Down | Jump one page | | Home / End | Jump to first/last | | q | Quit without selecting |


What it does (step by step)

  1. Finds your git repo root (walks up from cwd)
  2. Loads all git-tracked files — both current and historic
  3. Opens TUI browser — navigate directories, see only tracked files highlighted
  4. Shows every commit that ever contained the file
  5. Confirms with a warning before changing anything
  6. Rewrites history using git filter-repo (if installed) or git filter-branch (built into git) — removes the file from every commit
  7. Cleans up reflogs and runs git gc --aggressive --prune=now
  8. Adds the file to .gitignore so it can never be committed again
  9. Prints force-push commands to update your remote

After running

You must force-push to update the remote:

git push origin --force --all
git push origin --force --tags

Then rotate any leaked secrets immediately (GitHub and other platforms may cache content in their CDN even after a rewrite).

All collaborators must re-clone or run:

git fetch --all
git reset --hard origin/<branch>

Speed tip — git filter-repo

git-vanish automatically prefers git-filter-repo if it's installed — it's ~10-50× faster than filter-branch on large repos.

pip install git-filter-repo
# or
brew install git-filter-repo

How history rewriting works

Before scrub:
  commit A  – adds secret.json ← 🔒 secret visible here
  commit B  – other changes
  commit C  – other changes
  commit D  – deletes secret.json
  commit E  – other changes   ← HEAD (secret STILL in history)

After scrub:
  commit A' – (secret.json never existed)
  commit B' – other changes   (identical diff, different hash)
  commit C' – other changes
  commit D' – (empty commit pruned if nothing else changed)
  commit E' – other changes   ← HEAD (clean history)

All other files, diffs, messages, authors, and timestamps are preserved exactly.


Requirements

  • Node.js ≥ 14
  • Git ≥ 2.x (must be in PATH)

License

MIT