EnvMage
CLI Tool

Manage environment variables with confidence

EnvMage is a powerful CLI tool that simplifies environment variable management for Node.js projects with robust validation, syncing, and TypeScript integration.

Terminal

$ npm install -g env-mage

$ env-mage init

✓ Created .env.example from .env

✓ Added required variable annotations

$ env-mage validate

✓ All required variables present

✓ All variables match expected format

$ env-mage typegen

✓ TypeScript definitions generated at src/env.d.ts

$ env-mage json

✓ JSON structure generated at .env.json

$ env-mage scan

✓ Found 12 environment variables in codebase

✓ All used variables are defined in .env

Powerful Features

Why choose EnvMage?

Built with developer productivity and reliability in mind, EnvMage offers a comprehensive set of features for all your environment variable management needs.

Intuitive CLI

Simple, powerful command-line interface that integrates seamlessly with your development workflow.

Template Management

Create and manage .env.example templates with required and optional variable annotations.

TypeScript Integration

Generate TypeScript definitions for your environment variables with full type safety.

Variable Validation

Validate your environment variables against templates to ensure all required values are present and correctly formatted.

Sync Management

Keep your .env files in sync with your templates across different environments and development stages.

Variable Scanning

Scan your codebase to identify all used environment variables and verify they're properly defined.

JSON Export

Convert your .env files to JSON format with optional value preservation for easier integration with frontend apps.

Flexible Solutions

Perfect For Every Project

EnvMage is designed to work with all kinds of Node.js projects and handle various environment management needs.

API Keys

Secure external services

Databases

Connection strings

Authentication

Auth credentials

Endpoints

Service URLs

Integrations

Third-party services

Features

Feature flags

Cache

Cache settings

Logging

Log levels

Files

Storage paths

Runtime

Runtime configs

Works with all Node.js versions and frameworks

Security Best Practices

  • 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 for your sensitive data

EnvMage is built with security best practices in mind. It helps you properly manage sensitive environment variables and prevents common security issues related to environment configuration.

Manage your environment variables with confidence, knowing your sensitive configuration is handled securely, properly validated, and never exposed inappropriately in your application.

Seamless Integration

Works With Your Tools

EnvMage integrates seamlessly with your existing Node.js workflow and popular frameworks.

Version Control

Works seamlessly with Git workflows, ensuring .env files are properly gitignored while templates are tracked.

CI/CD Pipeline

Validate environment variables in your CI/CD workflow to catch missing or invalid configurations early.

Popular Frameworks

Integrates with Next.js, Express, NestJS, and other popular Node.js frameworks and toolchains.

EnvMage

© 2025 EnvMage. All rights reserved.

Env-mage Documentation | Cerebrix