Day 020 / Python / Configuration

Config Diff

View source ↗Scroll to explore ↓
Config Diff project cover
/ Overview

A dependency-free Python CLI that compares JSON configurations and reports changed paths without exposing their values.

NameConfig Diff

ClientIndependent daily build

IndustriesDeveloper tools

DateDay 020 · September 19, 2026

/ Challenge

Configuration drift can hide inside nested JSON, but printing complete before-and-after documents may expose tokens, passwords or other sensitive values.

/ Provided services

Clear thinking.
Practical delivery.

01

Recursive comparison

Walks nested objects and arrays with stable dot-and-index paths so structural drift stays easy to locate.

02

Privacy-conscious reporting

Reports paths, statuses and types while deliberately excluding the original and replacement values.

03

Automation-ready behavior

Provides readable and JSON output plus separate exit codes for matches, differences and invalid inputs.

Config Diff feature visual
/ Solution

Config Diff recursively compares two JSON files and reports only the affected paths, change categories and types. It supports ignored branches, deterministic text or JSON reports, and distinct exit codes without modifying either input.

/ Impact

Added, removed, changed and type-changed paths

Configuration values omitted from reports

Ignored paths and deterministic ordering

Nine passing standard-library tests

/ Tech stack

Python standard library

Argparse, pathlib, json, dataclasses and type hints provide the complete dependency-free CLI.

JSON path comparison

Recursive traversal classifies scalar, type, object-key and array-index differences in deterministic order.

Unittest

Nine tests cover nesting, arrays, ignores, privacy, ordering, output formats and CLI exit behavior.

Next project

Cron Explainer

View case study ↗