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

dotenv-doc

v0.1.0

Published

Checks your .env against your .env.example and tells you exactly what's missing, empty, or stale. Zero dependencies.

Downloads

183

Readme

Dotenv Doc

Checks your .env against your .env.example and tells you exactly what's missing, empty, or undocumented. Zero runtime dependencies.

$ npx dotenv-doc

Dotenv Doc  checking ./.env against ./.env.example

✓ 8 variables set

✗ 1 missing
  - STRIPE_SECRET_KEY

! 1 empty
  - DATABASE_URL

2 problems found. Run with --fix to resolve them interactively.

Why

You clone a repo, run npm install, run the dev server, and it crashes on a missing env var three files deep in a stack trace. Or a teammate adds a new required variable and doesn't tell anyone, and it only shows up as a production incident. This is the five-second check that catches both, before either happens.

Use it locally

npx dotenv-doc

No install, no config. It looks for .env and auto-detects .env.example / .env.sample / .env.template / .env.dist in the current directory. If .env doesn't exist yet, it lists everything you need to create one — handy right after cloning a repo, before you've even made a .env.

Fix it interactively

npx dotenv-doc --fix

Prompts for each missing or empty value, one at a time, and writes them straight into your .env. Leave a line blank to skip it — nothing is overwritten unless you type a value.

Use it in CI

npx dotenv-doc --strict

Exit code is 0 when everything's fine, 1 otherwise — drop it into any CI pipeline as a required check. See .github/workflows/check-env.yml.example for a ready-made GitHub Action that catches the specific failure mode of "added a var to .env.example, forgot to wire the matching secret into CI or deploy."

Options

| Flag | Effect | |---|---| | --fix | Interactively fill in missing/empty values | | --json | Machine-readable output instead of colored text | | --strict | Also fail if .env has keys not in the example | | --env <path> | Path to your real env file (default: .env) | | --example <path> | Path to the example file (default: auto-detected) | | -h, --help | Show usage | | -v, --version | Show the version |

Install

npm install -g dotenv-doc
# or just use npx, no install needed

Development

npm install
npm run build
npm test

npm test builds the CLI and runs it against real fixture .env / .env.example pairs under test/fixtures — including the --fix flow, piping simulated answers into it — rather than just asserting on individual functions.