Skip to content

confdiff

Pythonv0.2.0MIT

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

LongShortDescription
--version-VShow version and license
--brief-bOnly show summary counts
--color-cColorize output (green/red/yellow)
--format-fForce 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
Language
Python
Versionv0.2.0
LicenseMIT
RepositoryGitHub