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/envdoc

v1.0.1

Published

Find every environment variable your code reads, then document it - generate .env.example, a Markdown table, and fail CI on undocumented vars. Zero dependencies.

Readme

envdoc

npm CI license zero deps

Finds every environment variable your code reads and tells you which ones are documented. It can generate a .env.example, print a Markdown table, or fail CI when code references a variable that is missing from your .env.example. No dependencies, no AI.

A new process.env.SOMETHING that never makes it into .env.example is a common cause of "works on my machine". envdoc reads your source the way your runtime does and reports the drift.

Install

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

Languages

envdoc recognises environment access in JavaScript and TypeScript (process.env.X, process.env['X'], import.meta.env.X), Python (os.environ['X'], os.environ.get('X'), os.getenv('X')), Go (os.Getenv("X"), os.LookupEnv), and Ruby (ENV['X']).

Usage

envdoc [path] [options]

| Option | Description | | --- | --- | | --write | Write or update .env.example (existing values are kept) | | --check | Exit 1 if code uses vars missing from .env.example | | --markdown, --md | Print a Markdown table of all referenced variables | | --json | Print raw JSON | | --env <file> | The dotenv file to diff against (default .env.example) | | -h, --help | Show help | | -v, --version | Show version |

Examples

envdoc                      # summary for the current directory
envdoc --write              # regenerate .env.example, keeping known values
envdoc src --markdown > ENV.md

Guard it in CI

# .github/workflows/env.yml
- run: npx @bobfromarcher/envdoc --check

The build fails the moment someone references a variable that is not documented, so your code and your .env.example stay in sync.

Fast path

When ripgrep is on your PATH, envdoc uses it to list files (respecting .gitignore) and scans thousands of files in milliseconds. Without ripgrep it falls back to a built-in Node walk with the same results and still zero npm dependencies.

Development

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

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

License

MIT, bobfromarcher.