$CLI Tool for Node.js
Manage environment variables with confidence
EnvMage is a powerful CLI that simplifies .env management — validate against templates, sync across environments, scan your codebase, and generate TypeScript types. All from your terminal.
# MIT licensed · Zero config to start · Works with any Node.js project
env-mage — bash
typegen
src/env.d.ts
validated
12/12 vars
$ env-mage stats
✓ 7
CLI commands
✓ 100%
Type-safe output
✓ 0
Dependencies
✓ 24/7
Open source
// Features
Everything your .env files need
A complete toolkit for environment variable management, built around a simple, predictable CLI.
$ env-mage intuitive-cli
Intuitive CLI
Simple, powerful commands that integrate seamlessly with your existing workflow.
$ env-mage template-management
Template Management
Create and manage .env.example templates with required and optional variable annotations.
$ env-mage typescript-integration
TypeScript Integration
Generate typed definitions so your config is checked at compile time, not at runtime.
$ env-mage variable-validation
Variable Validation
Validate values against templates to ensure everything required is present and correct.
$ env-mage sync-management
Sync Management
Keep .env files in sync with templates across environments and development stages.
$ env-mage codebase-scanning
Codebase Scanning
Scan your codebase to find every used variable and verify it is properly defined.
$ env-mage json-export
JSON Export
Convert .env files to JSON for frontend bundlers and container tooling.
// Use cases
Perfect for every project
From API keys to feature flags, EnvMage keeps every kind of configuration honest.
// Security
Security for your sensitive data
EnvMage is built with security best practices in mind. It helps you manage sensitive variables properly and prevents the most common environment-config mistakes.
env-mage scan --security
Scanning project…
✓Never commits .env files to version control
✓Separates sensitive data from template files
✓Validates environment variables for required values
✓Prevents leaking sensitive values in logs or error messages
✓ Security report generated — 0 issues found
// FAQ
Questions, answered
Take control of your environment
Install EnvMage, initialize a template, and let validation watch your back. You'll wonder how you managed without it.
$ npm install -g env-mage