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

envsight

v1.0.0

Published

CLI tool for environment variables

Readme

🛡 envsight

A lightweight environment variable validator CLI for Node.js projects.

Prevent runtime crashes caused by missing environment variables by validating your configuration before running your application or deploying.

Features

  • Validate required environment variables
  • Detect missing environment variables
  • Support optional environment variables
  • Generate .env.example automatically
  • Safe overwrite using --force
  • CLI support
  • JSON output mode
  • Config file support
  • GitHub Actions support

Installation

Install globally:

npm install -g envsight

Install Locally:

npm install envsight

Use directly with npx:

npx envsight

Setup

Create a configuration file in your project root:

envsight.config.js

Example:

export default {

    required: [
        "DATABASE_URL",
        "JWT_SECRET"
    ],

    optional: [
        "PORT",
        "REDIS_URL"
    ]
}

Your project Structure:

my-project/
├── src/
├── .env
├── envsight.config.js
├── package.json
└── node_modules/

Example .env:

DATABASE_URL=my_database_url
JWT_SECRET=my_secret
PORT=5000

Usage

  • Check Environment Variables
    Run:
envsight check

Example Output:

🛡 envsight

Checking environment...

✔ DATABASE_URL
✔ JWT_SECRET

✔ Environment validation passed
  • Generate .env.example
    Generate a template file from your .env:
envsight init

Example:
Before:

DATABASE_URL=my_database
JWT_SECRET=my_secret

After:

DATABASE_URL=
JWT_SECRET=
  • Force Regenerate
    If .env.example already exists:
envsight init

will not overwrite it.

To OverWrite :

envsight init --force

Output:

✔ .env.example regenerated
  • JSON Output
    Useful for CI/CD pipelines
envsight check --json

Example :

{
  "success": true,
  "missing": [],
  "present": [
    "DATABASE_URL",
    "JWT_SECRET"
  ]
}

Github Actions

Create:

.github/workflows/env-check.yml

Add :

name: Environment Check


on:

  push:

  pull_request:


jobs:

  check-env:

    runs-on: ubuntu-latest


    steps:

      - name: Checkout repository
        uses: actions/checkout@v4


      - name: Setup Node
        uses: actions/setup-node@v4
        with:
          node-version: 22


      - name: Install dependencies
        run: npm install


      - name: Validate environment
        run: npx envsight check

Now every push and pull request validates your environment automatically.

Commands

| Command | Description | | ----------------------- | ------------------------------ | | envsight check | Validate environment variables | | envsight check --json | Output JSON result | | envsight init | Generate .env.example | | envsight init --force | Regenerate .env.example |

Development

Clone Repository :

git clone https://github.com/Aayush-0821/envsight.git

Install Dependencies:

npm install

Build:

npm run build

Run Tests:

npm test

License

MIT License