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

env-verifier-cli

v1.1.2

Published

๐Ÿ›ก๏ธ A command-line tool to validate .env files against a defined schema to ensure correct environment variable configurations.

Readme

๐Ÿ›ก๏ธ env-verifier-cli

A lightweight and powerful CLI tool to validate your .env files against a defined schema. Very easy to configure with minimal setup.

๐Ÿš€ Features

Validate .env files for:

  • โ— Missing or invalid required keys
  • โš ๏ธ Unused keys not defined in your schema
  • ๐Ÿงช Type checking: string, number, boolean, array, JSON (object), Object, Date
  • ๐Ÿงฉ Support for optional keys, allowing flexible configurations
  • ๐Ÿ” Works with multiple .env files (e.g., .env.production, .env.staging, .env.test) and supports type-specific validation for each
  • ๐Ÿ› ๏ธ Customizable schema for defining required and optional keys with specific types (string, number, boolean, array, JSON)
  • ๐ŸŒ Multi-environment support with easy-to-understand validation for complex configurations

๐Ÿ“ฆ Installation

Global:

npm install -g env-verifier-cli

Local (as dev dependency):

npm install --save-dev env-verifier-cli

๐Ÿ‘จโ€๐Ÿ’ป Usage

env-verifier --env .env --schema env.schema.json

Or

env-verifier --env .env.staging --schema env.schema.json

Or for different folder paths

env-verifier --env %USERPROFILE%\Downloads\.env --schema %USERPROFILE%\Downloads\env.schema.json --exit true
env-verifier --env $HOME/Downloads/.env --schema $HOME/Downloads/env.schema.json --exit 1
env-verifier --env ~/Downloads/.env --schema ~/Downloads/env.schema.json --exit false

Options:

--env     Path to the .env file to validate                                               (default: .env)
--schema  Path to the schema JSON file                                                    (default: env.schema.json)
--exit    Set true, 'true' or 1 if you want to throw on invalids or warnings              (default: true)

๐Ÿ“‚ Example (for more details see env.schema.json)

.env file:

API_KEY=abc123
DEBUG_MODE=true
PORT=3000

env.schema.json file:

{
    "REQUIRED_KEYS": {
        "API_KEY": "string",
        "DEBUG_MODE": "boolean"
    },

    "OPTIONAL_KEYS": {
        "PORT": "number"
    }
}

๐Ÿงฉ Supported Types

  • string โ†’ my-api-key, https://example.com, debug
  • number โ†’ 3000, 42, 3.14
  • boolean โ†’ true, false
  • array โ†’ ["https://myapp.com", "https://admin.myapp.com"], ["feature1", "feature2", "feature3"]
  • JSON (object) โ†’ {"theme": "dark", "notifications": true}, {"maxRetries": 3, "timeout": 5000}
  • date โ†’ 2025-01-01, 2023-05-01T15:30:00Z

๐Ÿ” FAQ

Don't worry, the .env files provided in this repository contain dummy data only.