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

@bobfromarcher/leaksweep

v1.0.1

Published

Scan your code for committed secrets (API keys, tokens, private keys, high-entropy strings) before they hit GitHub. Pre-commit hook + CI gate. Zero dependencies.

Downloads

290

Readme

leaksweep

npm CI license zero deps

Scans your code for committed secrets: API keys, tokens, private keys and high-entropy strings. Run it as a pre-commit hook to stop a secret before it is committed, or in CI to fail the build if one slips through. No dependencies, no AI.

Secrets are always masked in the output. leaksweep never prints the full value, so the report itself is safe to paste into a ticket or a CI log.

Install

npm install -g @bobfromarcher/leaksweep
# or once:
npx @bobfromarcher/leaksweep

Use it as a pre-commit hook

The point is to catch the secret before it is committed:

# .git/hooks/pre-commit
#!/bin/sh
npx @bobfromarcher/leaksweep --staged || exit 1

--staged scans only what you have staged, so the hook is fast.

Use it in CI

# .github/workflows/secrets.yml
- run: npx @bobfromarcher/leaksweep

A non-zero exit on any finding fails the build.

Usage

leaksweep [path] [options]

| Option | Description | | --- | --- | | --staged | Scan only git-staged changes (pre-commit hook mode) | | --all | Walk the filesystem instead of git-tracked files | | --json | Output JSON | | --quiet, -q | No output, just the exit code | | -h, --help | Show help | | -v, --version | Show version |

What it detects

AWS access keys and secret keys, GitHub tokens and fine-grained PATs, GitLab tokens, Slack tokens and webhooks, Stripe live keys, Google API keys, npm tokens, OpenAI keys, Twilio and SendGrid keys, JWTs, PEM private-key blocks, and a generic high-entropy detector for anything assigned to a secret, token, password or api_key style name.

Obvious placeholders such as your_api_key_here, xxxx, <token> and example, plus low-entropy dummy values, are filtered out to keep the noise down.

leaksweep is a fast first line of defense, not a guarantee. It favors high-signal matches over exhaustive coverage. Pair it with secret rotation and server-side scanning for defense in depth.

Development

git clone https://github.com/bobfromarcher/leaksweep
cd leaksweep
node test/test.js

CI runs the suite on Node 18, 20 and 22 across Linux, macOS and Windows.

License

MIT, bobfromarcher.