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

@workingmodel/where-did-my-env-go

v1.0.0

Published

Audits your environment variables — finds what's missing, what's misnamed, and what's set but never actually read.

Readme

@workingmodel/where-did-my-env-go

Audits your environment variables — finds what's missing, what's misnamed, and what's set but never actually read. Developed by Working Model.

npm version npm downloads license

where-did-my-env-go

Scanning: /Users/you/my-app
12 key(s) in .env.example, 84 source file(s) scanned

✖ [Missing] 2 required env var(s) not set in current environment: DATABASE_URL, JWT_SECRET
  → Set these in your .env file, shell profile, or deployment config. They have no default value in .env.example.

⚠ [Misnamed] "DATBASE_URL" is set but .env.example expects "DATABASE_URL" — possible typo.
  → Rename DATBASE_URL → DATABASE_URL in your environment, or update .env.example if the name changed.

⚠ [Undocumented] 3 env var(s) referenced in code but missing from .env.example: STRIPE_SECRET_KEY, RESEND_API_KEY, FEATURE_FLAGS_URL
  → Add these to .env.example so the next person deploying knows they exist.

ℹ [Set But Never Read] 1 env var(s) set but never referenced in source (84 files scanned): OLD_ANALYTICS_ID
  → Either remove them from your environment, or check if they're read by a dependency rather than your own code.

Summary: 2 errors, 2 warnings
Missing required env vars — your app will likely fail to start.

Install

npx @workingmodel/where-did-my-env-go

Or install globally:

npm install -g @workingmodel/where-did-my-env-go

Usage

Run in your project root:

where-did-my-env-go

Or point it at a specific directory:

where-did-my-env-go /path/to/my-app

Exits with code 1 if required env vars are missing — pipe-friendly for CI.

What It Checks

| Check | What it catches | |-------|----------------| | Missing | Keys in .env.example that aren't set in your current environment — errors for required (no default), warnings for optional (has default) | | Misnamed | Keys in your environment that are within edit-distance 2 of an expected key — catches DATABASE_URI when you meant DATABASE_URL | | Set But Never Read | Env vars set in your environment or .env that are never referenced via process.env.KEY in your source code | | Undocumented | Keys referenced in your source code that aren't in .env.example — the ones the next developer won't know to set |

How It Works

The tool reads .env.example as the canonical list of what your app needs, then cross-references three sources:

  1. Your current process.env — what's actually set in the shell running the command
  2. Your .env file — what you've set locally (if present)
  3. Your source code — scans .ts, .tsx, .js, .jsx, .mjs, .cjs files for process.env.KEY references

The misnamed check uses Levenshtein distance — it finds keys in your environment that are one or two edits away from what .env.example expects.

Why This Exists

You've set the env vars. You know you've set them. The app still won't start. Somewhere between your .env.example, your local shell, your deployment config, and the three people who've touched this project in the last six months, something got renamed, dropped, or never documented in the first place.

This tool tells you exactly what's out of alignment — in the time it takes to run one command.


More tools from Working Model → workingmodel.co · npm @workingmodel