envdiff
Snapshots a machine's system info, runtimes, env vars and network config to JSON, diffs snapshots, and validates environments against a YAML file.
envdiff is a Go command-line tool that captures an environment as a JSON snapshot and compares snapshots to show what differs between machines, such as a local workstation and a CI runner. A snapshot records system info (OS, architecture, kernel, memory, CPU), runtime versions (go, node, python, docker, plus custom-defined tools), environment variables, and network info (/etc/hosts and listening ports). Secrets in environment variables are detected and redacted by default; --no-redact includes the values.
The envdiff compare command takes two or more snapshots (for example local, CI and staging) and produces a categorized diff, which can be saved with -o. envdiff render turns a saved snapshot or diff into terminal output or Markdown (--md), which can be pasted into a pull request or issue.
For validation, envdiff init creates an envdiff.yaml template and envdiff check tests the current machine against it. The file sets runtime version constraints (e.g. go: ">= 1.21.0"), required and expected environment variables, ignore patterns, required system packages, custom runtime probes (command, args, regex), and per-tool fix hints such as nvm use 20. check only probes the runtimes listed in the file. It supports --json and --quiet (exit code only), so it can run in CI jobs or hooks. It is aimed at developers and DevOps engineers debugging "works on my machine" problems. It runs on Linux, macOS and Windows.
Installation
# via Go install
go install github.com/GBerghoff/envdiff/cmd/envdiff@latest
# via Install script (Linux/macOS)
curl -fsSL https://raw.githubusercontent.com/GBerghoff/envdiff/main/install.sh | sh



Alternatives & related tools
awsesh
TUI and CLI tool for managing AWS SSO sessions with fuzzy search, account switching, and shell integration.
octocov
Code metrics toolkit for collecting coverage, code-to-test ratio, test execution time, and custom metrics from multiple report formats
nap
Code snippet manager with CLI and TUI for creating, organizing, and accessing snippets in the terminal
freeze
Generate PNG, SVG, and WebP images of code and terminal output with syntax highlighting and customizable styling.
Docker CLI
Source repository for the Docker command-line client, written in Go and built with docker buildx bake, with cross-platform and glibc/musl build targets.
add a badge to your README
Maintain envdiff? Show that it's featured on trmn. The badge links back to this page.
[](https://www.trmn.sh/tools/envdiff?utm_source=badge)<a href="https://www.trmn.sh/tools/envdiff?utm_source=badge"><img src="https://www.trmn.sh/badge/envdiff.svg" alt="Featured on trmn" height="20"></a>