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

env-sweeper

v1.0.1

Published

<div align="center">

Readme

🛡️ Env Sweeper

Hunt down exposed .env files and API keys before they get committed and ruin your life.

npm version License: MIT PRs Welcome

    ███████╗███╗   ██╗██╗   ██╗    ███████╗██╗    ██╗███████╗███████╗██████╗ ███████╗██████╗ 
    ██╔════╝████╗  ██║██║   ██║    ██╔════╝██║    ██║██╔════╝██╔════╝██╔══██╗██╔════╝██╔══██╗
    █████╗  ██╔██╗ ██║██║   ██║    ███████╗██║ █╗ ██║█████╗  █████╗  ██████╔╝█████╗  ██████╔╝
    ██╔══╝  ██║╚██╗██║╚██╗ ██╔╝    ╚════██║██║███╗██║██╔══╝  ██╔══╝  ██╔═══╝ ██╔══╝  ██╔══██╗
    ███████╗██║ ╚████║ ╚████╔╝     ███████║╚███╔███╔╝███████╗███████╗██║     ███████╗██║  ██║
    ╚══════╝╚═╝  ╚═══╝  ╚═══╝      ╚══════╝ ╚══╝╚══╝ ╚══════╝╚══════╝╚═╝     ╚══════╝╚═╝  ╚═╝

Did you know thousands of AWS keys, Stripe tokens, and OpenAI keys are leaked on GitHub every single day because developers forget to add .env to their .gitignore?

Env Sweeper is a blazing-fast, interactive CLI security scanner that recursively sweeps your local directories for unprotected .env files and exposed API keys, allowing you to instantly preview, delete, or safely .gitignore them.

✨ Features

  • ⚡ Lightning Fast: Uses fast-glob to rip through massive codebases in milliseconds while aggressively ignoring node_modules.
  • 👀 Smart Preview: Safely peeks inside discovered .env files and automatically masks sensitive keys so you can verify them securely.
  • 🛡️ Instant Remediation: Automatically injects the .env path into the correct local .gitignore file with a single keystroke.
  • 🗑️ Secure Shredding: Permanently deletes dangerous files if you choose to obliterate them.
  • 🎯 Interactive UX: Powered by inquirer for a bulletproof, non-glitchy terminal experience.

🚀 Installation

You can run it instantly without installing:

npx env-sweeper

Or install it globally to sweep any folder at any time:

npm install -g env-sweeper

🎮 Usage

Navigate to any directory you want to scan and run:

env-sweeper

Flow:

  1. Sweeper will scan the directory and list all unprotected .env files.
  2. Select the files you want to handle (Space to select, Enter to proceed).
  3. Choose an action:
    • Preview masked secrets (to see what keys are inside).
    • Shred them (delete permanently).
    • Add to .gitignore (secures them without deleting).

🛠️ How it works

  1. It recursively globs **/.env* while bypassing massive folders like node_modules and .git.
  2. It parses .gitignore files to ensure it doesn't bother you with .env files that are already safely ignored.
  3. It presents a beautiful terminal UI for you to take immediate action on vulnerabilities.

Architected by @lakshanmuruganandam

Built for developers who prefer not to wake up to a $50,000 AWS bill.