The chief cook and bottle washer of json patching
json-patcher is a tool that processes JSON files and generates patches, fixes, and changelogs. This project helps manage and track changes between different JSON files.
- Generate patches between JSON files
- Generate human-readable descriptions from patch files
- Apply patch files to JSON files
- Append generated descriptions to a changelog
- Emit JSON output for automation with
--json
The describe command currently expects an OpenAI-compatible Chat
Completions API.
- Expected request shape:
{"model": "...", "messages": [...]} - Expected response shape:
choices[0].message.content
This works with OpenAI and providers/proxies exposing an OpenAI-compatible Chat Completions endpoint. Anthropic’s native Messages API is not directly supported.
bbin install io.github.200ok-ch/json-patcherExamples
json-patcher diff old.json new.json --out changes.patch
json-patcher describe changes.patch --append CHANGELOG.md
json-patcher apply old.json fix.patch --out old-fix.json
json-patcher diff old.json new.json --json- Babashka
- jsondiff/jsonpatch
- OpenAI API Key (optional)
./json_patcher.bb diff li-20260302T092642Z-v1.json li-20260302T092703Z-v2.json --out patch-v1-v2.json --json