Skip to content

hallucinaut/envdiff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EnvDiff - Environment Variable Diff Tool

Compare environment variables between two files and generate sync scripts.

Features

  • Compare two env files (dotenv format)
  • Categorize differences (common, only in left, only in right, modified)
  • Generate sync scripts automatically
  • Color-coded output for easy reading
  • JSON output option for automation

Installation

go build -o envdiff cmd/envdiff/main.go

Usage

./envdiff .env.dev .env.prod
./envdiff config/dev.json config/prod.json --json

Example Output

=== ENVIRONMENT DIFF REPORT ===

Common variables (5):
==================================================
  DATABASE_URL=postgres://...
  API_KEY=***
  LOG_LEVEL=info

Only in left (2):
--------------------------------------------------
  left DEBUG_MODE
    value: enabled

  left LOCAL_SECRET
    value: dev-secret-123

Only in right (1):
--------------------------------------------------
  right STAGING_MODE
    value: true


=== SYNC SCRIPT ===

Sync from left to right:
----------------------------
  export DEBUG_MODE="enabled"
  export LOCAL_SECRET="dev-secret-123"

License

MIT

About

⚙️ Environment Variable Diff Tool - Compare and sync environment variables between dev, staging, prod. Generate sync scripts automatically with categorization.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages