@asdsadw12312dwd2112xz/env-compare-cli
v1.0.0
Published
Compare .env files to find missing, extra, and different variables
Downloads
68
Maintainers
Readme
env-compare-cli
Compare .env files to find missing, extra, and different variables.
Installation
npm install -g env-compare-cliUsage
# Basic comparison
env-compare .env .env.example
# Show actual values in diff
env-compare .env .env.production --values
# JSON output (for scripting)
env-compare .env .env.staging --json
# Generate merged file to stdout
env-compare .env .env.example --sync
# CI usage (exits with code 1 if differences found)
env-compare .env.example .env || echo "Environment mismatch!"Options
| Flag | Description |
|------------|------------------------------------------|
| --values | Show actual values in the comparison |
| --json | Output results as JSON |
| --sync | Print a merged env output to stdout |
| -V | Show version |
| -h | Show help |
Output
- 🔴 Missing — variables in file1 but not in file2
- 🟡 Extra — variables in file2 but not in file1
- 🔵 Different — same key, different value
Exit Codes
0— files are identical1— differences found (CI-friendly)
License
MIT
