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

envsane

v1.0.0

Published

A lightweight CLI tool for validating and comparing .env files

Readme

envsane

A lightweight CLI tool for validating and comparing .env files.

Stop shipping broken env files.

npm version License: MIT


Why envsane?

Environment variables are a common source of silent failures:

  • .env and .env.example drifting over time
  • Production having variables that development does not
  • Variables existing but being empty
  • Case mismatches (DB_url vs DB_URL)
  • Old variables lingering with no usage

envsane catches these issues before they hit production.


Installation

npm install -g envsane

Quick Start

# Navigate to your project
cd your-project

# Run the check
envsane check

That's it. No configuration needed.


Commands

envsane check

Validates environment consistency by comparing .env against .env.example.

envsane check

Checks performed:

  • Missing variables
  • Empty values
  • Extra variables not defined in the example
  • Case mismatches
  • Duplicate keys
  • Whitespace issues

Options:

  • -e, --env <file> - Path to .env file (default: .env)
  • -x, --example <file> - Path to .env.example file (default: .env.example)

Exit codes:

  • 0 - No issues found
  • 1 - Warnings or errors detected

envsane diff <fileA> <fileB>

Compares two .env files and highlights differences.

envsane diff .env.production .env.staging

Output includes:

  • Variables only in file A
  • Variables only in file B
  • Value differences (with --values flag)

Options:

  • -v, --values - Show value differences for common variables

envsane explain <VAR_NAME>

Explains an environment variable using comments from .env.example.

envsane explain DB_POOL_SIZE

Example .env.example:

# Maximum number of database connections
# Must be a positive integer
DB_POOL_SIZE=10

Output:

DB_POOL_SIZE

Purpose: Maximum number of database connections Must be a positive integer
Expected type: integer
Example: 10

Options:

  • -x, --example <file> - Path to .env.example file (default: .env.example)

Global Options

These options work with all commands:

| Option | Description | |--------|-------------| | --strict | Treat warnings as errors | | --json | Output results as machine-readable JSON | | --no-color | Disable colored output |


Examples

CI/CD Integration

# In your CI pipeline
envsane check --strict --json

Compare environments

# See what's different between production and staging
envsane diff .env.production .env.staging --values

Document your variables

# Get info about a specific variable
envsane explain API_SECRET

Philosophy

envsane is intentionally minimal:

  • No configuration files - works out of the box
  • No network access - runs entirely locally
  • No framework coupling - works with any project
  • No magic - does exactly what you expect

Language Agnostic

envsane works with any project that uses .env files:

  • Node.js
  • Python
  • Go
  • Ruby
  • PHP
  • Docker
  • And anything else

License

MIT © Ay7ot


No dashboards. No magic. Just fewer broken deploys.