Env-mage Docs

Getting Started

Start using env-mage

Getting Started

Quick guide to using env-mage.

Install

npm install -g env-mage

Basic Usage

Create Template

Create an .env.example from your existing .env:

env-mage init

Validate Environment

Check if all required variables exist:

env-mage validate

Find Variable Usage

Scan your code for environment variables:

env-mage scan

Generate Types

For TypeScript projects:

env-mage typegen

Common Tasks

Project Setup

# Clone project
git clone myproject

# Initialize from template
env-mage init --from .env.example --to .env

# Validate setup
env-mage validate

Before Deployment

# Validate all required variables
env-mage validate --required

# Check for formatting issues
env-mage lint --strict