CLI Tools
python
Intermediate
JSON Diff CLI Tool
Compare two JSON files and highlight added, removed and changed keys.
python
import json, sys
from deepdiff import DeepDiff
from rich.console import Console
from rich import print_json
def diff(a: str, b: str):
with open(a) as f: data_a = json.load(f)
with open(b) as f: data_b = json.load(f)
delta = DeepDiff(data_a, data_b, ignore_order=True).to_dict()
Console().print_json(json.dumps(delta, default=str))
diff(sys.argv[1], sys.argv[2])
Prerequisites
- deepdiff >= 6
- rich >= 13
Pro Tips
- → Use --ignore_string_case=True for case-insensitive comparison.
Commercial Licensing
Acquire a production access token or template license for enterprise deployment.
Module Info
- Language
- python
- Level
- Intermediate
- Read time
- 2 min
- Published
- Mar 2026
- License
- Commercial License
Newsletter
New modules every week, directly to your inbox.
Similar Modules
Rich Progress Bar Script
Display a beautiful progress bar in the terminal using Rich.
python
·
Beginner
Git Commit Message Enforcer
commit-msg hook that enforces Conventional Commits format.
bash
·
Intermediate
System Info Dashboard
Print a compact system summary: CPU, RAM, disk, OS and uptime in one script.
bash
·
Beginner