Config Diff makes configuration reviews easier by comparing nested JSON or TOML files and showing exactly which paths were added, removed, or changed. It can emit JSON for automation and return a failing exit code when changes are found.
- 🧭 Flatten nested objects into readable dotted paths
- ➕ Report added, removed, and changed values
- 📄 Read JSON and TOML without third-party libraries
- 🚫 Ignore selected path prefixes
- ⚙️ Return a non-zero exit code when CI should fail on any difference
python main.py config-old.json config-new.json
python main.py settings.toml settings-next.toml --jsonThe text report uses +, -, and ~ markers for added, removed, and changed paths.
Requires Python 3.11+ for the built-in TOML parser.
python main.py before.json after.json
python main.py before.toml after.toml --ignore-prefix logging --fail-on-change
python -m unittest discover -s tests- 🐍 Python 3.11+
- 📄 json and tomllib
- 🧪 unittest
config-diff/
├── assets/overview.svg
├── tests/test_main.py
├── main.py
├── requirements.txt
├── .gitignore
└── README.md
- 🧩 Add YAML support as an optional extra
- 📊 Add a compact summary by change type
- 🧪 Add allowlist files for ignored paths
Bug reports and focused pull requests are welcome. Include a reproducible example or a test when changing behavior.
MIT — see LICENSE.