Star us on GitHub for updates!
GitHub
NPM
Documentation
Terminal
Download
v1.0.3 • Latest Release

Validate and document your environment variables

A zero-config, framework-agnostic NPM package that prevents runtime errors by validating your environment variables directly from your .env.example file.

npm install @arshtiwari/envguard

Powerful Features

Everything you need to validate, document, and manage your environment variables

Zero-config

Works out-of-the-box with your existing .env.example file

Framework-agnostic

Use in any Node.js or frontend project

Auto-documentation

Keeps .env.example up-to-date automatically

CLI & API

Validate env vars in scripts, CI, or app startup

React UI

Visualize, debug, and document env variables (dev only)

Descriptive errors

Friendly messages for missing/misconfigured variables

See It In Action

envguard Dashboard

aceternity logo
esc
F1
F2
F3
F4
F5
F6
F7
F8
F8
F10
F11
F12
~`
!1
@2
#3
$4
%5
^6
&7
*8
(9
)0
_
+ =
delete
tab
Q
W
E
R
T
Y
U
I
O
P
{[
}]
|\
caps lock
A
S
D
F
G
H
J
K
L
:;
"'
return
shift
Z
X
C
V
B
N
M
<,
>.
?/
shift
fn
control
option
command
command
option
Live Demo

How It Works

Simple, powerful, and zero-config environment variable validation

1

Parse .env.example

envguard reads your .env.example file to understand your environment variable requirements.

2

Generate Schema

Automatically creates a validation schema based on your .env.example structure.

3

Validate Environment

Checks your actual environment variables against the schema at runtime.

4

Report & Visualize

Provides clear error messages and optional UI for visualizing your environment.

.env.example
# API Keys (required)
API_KEY=your-api-key-here
# Database connection (required)
DB_HOST=localhost
DB_PORT=5432
DB_USER=postgres
DB_PASSWORD=password
# Feature flags (optional)
ENABLE_FEATURE_X=true
DEBUG_MODE=false

Quick Start

Get up and running in seconds with these simple commands

CLI Validation
Validate your environment variables directly from the command line
npx envguard validate

Output:

[envguard] Environment Variable Errors:
  - Missing required environment variable: API_KEY
  - Invalid value for DB_PORT: Expected number, got "string"
error Command failed with exit code 1
41+

Weekly Downloads

v1.0.3

Latest Version

MIT

License

7.06 kB

Unpacked Size

Arsh Tiwari

About the Developer

Hey everyone! I'm Arsh Tiwari, a 2nd-year CSE student at GGSIPU Delhi and also pursuing a B.S. in Data Science from IIT Madras (online).

I'm passionate about full-stack development, open-source collaboration, AI/LLMs, and building scalable systems. envguard is one of my contributions to making developer experience better.

Ready to Secure Your Environment Variables?

Start validating your environment variables today and prevent runtime errors before they happen.