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

@superxepic/usopp

v1.0.1

Published

Scan your project for environment variables and generate a .env.usopp template file

Readme

usopp 🎯

"I'm going to be the greatest sniper in the world — and I never miss an env variable."

usopp scans your entire project for every environment variable reference and generates a .env.usopp template so your team never ships broken configs again.


Install

# globally
npm install -g usopp

# or run without installing
npx usopp

Usage

# Scan the current directory and write .env.usopp
usopp

# Scan a specific project
usopp --dir ./my-project

# Custom output path
usopp --dir ./my-project --out ./infra/.env.template

# Preview without writing any file
usopp --dry

# Strip source-file comments from output
usopp --no-comments

# Suppress terminal output
usopp --quiet

What it detects

| Language / Tool | Pattern | |---|---| | JavaScript / TypeScript | process.env.FOO, process.env['FOO'] | | Vite | import.meta.env.VITE_FOO | | Python | os.environ['FOO'], os.getenv('FOO') | | Ruby | ENV['FOO'], ENV.fetch('FOO') | | Shell / Dockerfile | $FOO, ${FOO} | | Docker Compose / YAML | KEY= assignments, ${KEY} references | | Terraform | ${VAR} interpolations |


Output

Running usopp produces a .env.usopp file like this:

# ─────────────────────────────────────────────
# .env.usopp — generated by usopp
# Scanned root: /your/project
# Generated at: 2026-04-13T00:00:00.000Z
# ─────────────────────────────────────────────

# ── AWS ──
# found in: api/server.js:14  |  docker-compose.yml:9
AWS_REGION=
AWS_S3_BUCKET=

# ── DB ──
# found in: api/server.js:2,3,4,5,6  |  docker-compose.yml:6,7
DB_HOST=
DB_NAME=
DB_PASSWORD=
DB_PORT=
DB_USER=

Variables are grouped by prefix (DB_, AWS_, VITE_, etc.) and each entry notes exactly which files and line numbers reference it.


Recommended workflow

  1. Run usopp at project setup or in CI.
  2. Copy .env.usopp.env and fill in real values.
  3. Add .env to .gitignore, commit .env.usopp as a documented template.
  4. Re-run usopp whenever you add new variables to keep the template fresh.

Programmatic API

const { scanProject, generateEnvFile } = require("usopp");

const { variables, scannedCount } = await scanProject("/path/to/project");
const content = generateEnvFile(variables, "/path/to/project");
console.log(content);

License

MIT