What it does
The problem
Environment variable drift is one of the most common sources of "works on my machine" bugs.
A developer adds STRIPE_WEBHOOK_SECRET to
.env.example — forgets to tell the team.
Three developers miss it. The bug surfaces in production at 2am as a cryptic 500 error, not a clear missing-key message.
Existing tools handle secret storage and syncing — but nothing simply tells you what's different between two config files, without an account, without an API, without sending your secrets anywhere.
Key Capabilities
-
Missing key detection
Catches keys present in
.env.examplebut absent in.env— the most common source of config drift. - Stale variable detection Flags keys that exist locally but were removed from the example file — safe to clean up.
- Value change detection Reports keys that exist in both files but carry different values across environments.
- Truly offline No network calls, no account, no telemetry. Your secrets stay on your machine.
- Single binary Compiled Go binary — runs anywhere with no runtime or dependency installation.
- Cross-platform Ships binaries for Windows, Mac (Intel + M1/M2), and Linux via GitHub Releases.
Install
Requires Go 1.22+
go install github.com/harshitsinghal13/envdiff@latest
Download binary from releases, then:
chmod +x envdiff && sudo mv envdiff /usr/local/bin/
Download binary from releases, then:
chmod +x envdiff && sudo mv envdiff /usr/local/bin/
Download envdiff.exe from releases, move to a folder in your PATH, then:
envdiff compare .env.example .env
Roadmap
- ✓ v0.1 Compare two .env files — missing, extra, and changed keys
- v0.2 Lint a single .env file — duplicates, empty values, malformed lines
- v0.3 Strict validation of .env against .env.example
- v0.4 GitHub Action for CI/CD integration
- v0.5 Docker Compose and Kubernetes ConfigMap support
- v0.6 Interactive TUI mode
Tech Stack
Repository
Source code, install instructions, and binary downloads are available at github.com/harshitsinghal13/envdiff.