Open Source · CLI Tool

envdiff

Catch .env config drift before it breaks your team. Detects missing keys, stale variables, and mismatched values — offline, zero dependencies.

By Harshit Singhal  ·  July 2026  ·  Go

Zero Dependencies Cross-platform Binary Offline — No Data Sent MIT License

What it does

bash
$ envdiff compare .env.example .env
Comparing .env.example → .env
STRIPE_WEBHOOK_SECRET in .env.example, missing in .env
+ OLD_DEBUG_FLAG in .env, not in .env.example (stale)
~ API_TIMEOUT different value
$ envdiff compare .env.example .env.staging
✓ No differences found

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.example but 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

Go CLI GoReleaser GitHub Actions Open Source MIT

Repository

Source code, install instructions, and binary downloads are available at github.com/harshitsinghal13/envdiff.