Compares two configuration files (JSON or .env format) and shows only meaningful differences — ignoring whitespace, comments, and key order. Flattens nested JSON to key paths and diffs the structure. Shows added keys, removed keys, and modified keys with before/after values. Ideal for reviewing config changes between deploys or environments. Colour-coded output for quick scanning.
ConfigurationDevOpsDiffCLI
Features
- JSON and .env format support
- Flattened key-path diff for nested JSON
- Added, removed, and modified key sections
- Colour-coded output (green/red/yellow)
- Brief mode with summary counts only
Flags
| Long | Short | Description |
|---|---|---|
| --version | -V | Show version and license |
| --brief | -b | Only show summary counts |
| --color | -c | Colorize output (green/red/yellow) |
| --format | -f | Force format (json, env) |
Usage
terminal
$ confdiff staging.json production.json
$
$ confdiff --brief --color .env.staging .env.production
Dependencies
stdlib only — json, re, difflib
Install
$ curl -LO https://labs.stech-sol.com/downloads/confdiff/0.2.0/confdiff_0.2.0.tar.gz
$ tar xzf confdiff_0.2.0.tar.gz
$ chmod +x confdiff/confdiff.py
$ sudo ln -s $PWD/confdiff/confdiff.py /usr/local/bin/confdiff
About
Downloads
Verify integrity
SHA256 checksums