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

envdoc

v1.0.2

Published

Env Doctor: Diagnose, validate, and audit your .env files and environment variables in seconds.

Readme

Env Doctor

Diagnose, validate, and audit your environment variables across your entire project.

Env Doctor scans all your .env files and your source code to catch missing and unused environment variables.


Features

  • Recursively finds all .env files in your project

  • Scans source files (.js, .ts, .jsx, .tsx, .mjs, .cjs)

  • Detects environment usage via:

    • process.env.KEY / process.env["KEY"]
    • import.meta.env.KEY
    • $env/static/* or astro:env/* imports
  • Reports missing and unused keys

  • Pretty output with spinners and colors


Installation

npm install -g envdoc

Usage

Run inside any project:

envdoc diagnose

That’s it — Env Doctor will automatically:

  1. Find all .env files
  2. Parse them
  3. Scan your codebase for environment variable usage
  4. Compare → Report missing & unused keys

Example

Project structure:

my-app/
 ├─ src/
 │   ├─ index.js
 │   └─ utils.ts
 ├─ .env
 └─ .env.local

.env file:

PORT=3000
DATABASE_URL=
DEBUG_MODE=true

src/index.js:

console.log(process.env.PORT);
console.log(process.env.DATABASE_URL);

Run:

envdoc diagnose

Output:

SUCCESS: Found 2 .env file(s).
SUCCESS: Parsed all .env files (3 unique keys found).
SUCCESS: Scan complete.

Used keys in code: [ 'PORT', 'DATABASE_URL' ]
Keys defined in .env files: [ 'PORT', 'DATABASE_URL', 'DEBUG_MODE' ]

WARNING: Missing keys in .env file(s): [ 'DATABASE_URL' ]
WARNING: Unused keys in .env file(s): [ 'DEBUG_MODE' ]

🛠 CLI

| Command | Description | | --------------------- | ---------------------------------------------------- | | envdoc diagnose | Scan your project and report missing/unused env keys | more commands coming soon


Contributing

  1. Fork the repo
  2. Create a branch (git checkout -b feature/my-feature)
  3. Commit your changes (git commit -m "Add feature")
  4. Push (git push origin feature/my-feature)
  5. Open a Pull Request

License

MIT License © 2025 Adarsh Antony