100% offline · No cloud · No AI

env-diff

A local terminal UI to compare .env, .yaml, and .json config files side-by-side. Your secrets never leave your machine.

Get Started Download Binary View on GitHub
env-diff .env.staging .env.production
$ env-diff .env.staging .env.production

 #A  #B
KEY
staging
production
2   ─
GCS_BUCKET
myapp-staging
──────
+
─   2
GCS_BUCKET_PROD
──────
myapp-production
~
4   4
DATABASE_URL
postgres://user:pass@localhost:5432/myapp
postgres://user:pass@db.prod.internal:5432/myapp
~
7   7
APP_ENV
staging
production
·
9   9
PORT
8080
8080
·
12  12
SECRET_KEY
****
****

3 modified · 1 added · 1 removed · 8 unchanged

Features

Everything in the terminal

No browser, no cloud service, no copy-pasting secrets into a website.

🔒

100% Offline

Nothing ever leaves your machine. Built for engineers who handle real credentials.

🎨

Char-level Diff

Modified values highlight exactly which characters changed using an LCS algorithm.

🔑

Secret Masking

Keys matching *_KEY, *_SECRET, *_TOKEN and more are masked with **** by default.

📁

Multi-format

Supports .env, .yaml/.yml, and .json with full recursive key flattening.

🔍

Search & Filter

Type to filter keys in real-time. Filter by status: added, removed, modified, unchanged.

⚙️

CI-friendly

Exits with code 1 when differences exist. Use it in pipelines to detect config drift.

📋

Copy to Clipboard

Press c or right-click to copy any value. Supports xclip, wl-copy, pbcopy, and OSC 52.

📦

Single Binary

Download a standalone executable. No runtime required, no node_modules.


Install

Get up and running

Requires Bun. Or just download a prebuilt binary.

From source

# Clone and install
git clone https://github.com/m-elbably/env-diff
cd env-diff && bun install

# Run
bun run src/index.tsx .env.staging .env.production

With ignore pattern

env-diff .env.stg .env.prod --ignore-pattern "^CI_"

In a CI pipeline

# Fail the build if dev and prod configs have drifted
env-diff .env.dev .env.prod || echo "Config drift detected!"

Keyboard

Shortcuts

No mouse required — full keyboard navigation.

↑ ↓ Scroll / navigate cursor
j k Vim-style scrolling
g G Jump to top / bottom
/ Search keys
f Cycle status filter
d Show diffs only
a Show all keys
o Cycle sort mode
h Toggle char-diff highlight
s Toggle secret masking
c Copy value to clipboard
q Quit

Download

Prebuilt binaries

Standalone executables — no Bun or Node.js required.

🐧 Linux x64 (amd64) 🐧 Linux arm64 🍎 macOS x64 (Intel) 🍎 macOS arm64 (Apple Silicon) 🪟 Windows x64 📦 All releases →