oss project
envdiff
Compare, validate, and sync .env files across environments.
$ brew install shahadulhaider/tap/envdiff
- Go
- Bubble Tea
- TOML schemas
- pre-commit
- GitHub Actions
- Go CLI for comparing, validating, and syncing
.envfiles across development / staging / production environments. - TOML schema validation, secret masking, matrix view across N files, git-diff integration, and interactive sync TUI.
- Plays nicely with pre-commit hooks and emits GitHub Actions annotations so missing-secret bugs surface in PRs, not at 2 AM in prod.
Why it exists
Every team I have worked with has lost time to “it works on my machine
because I have a secret you don’t.” envdiff makes the comparison
explicit:
envdiff diff .env .env.staging .env.production
envdiff validate --schema env.schema.toml .env
envdiff sync .env .env.staging
Useful primitives:
- Schema-validated env files — define required keys, types, and patterns in TOML; fail-fast in CI.
- Matrix view — render N env files side-by-side; spot missing keys instantly.
- Pre-commit integration — fail commits that diverge a
.env.examplefrom.env. - GitHub Actions annotations — drift shows up in the PR diff UI.
- Secret masking — values redacted in output unless
--show-values. - Interactive sync TUI — Bubble Tea-driven merge resolver.
brew install shahadulhaider/tap/envdiff