🍺 BREW Explorer

← all formulae

jd

brew install jd v2.5.0 MIT

JSON diff and patch

267
30-day installs · #2329
1.4k
90-day · #1851
9.4k
365-day · #1463
2.3k
★ GitHub stars · updated 4mo ago

Build dependencies

go

GitHub topics

diff json patch yaml

Links

Raw metadata
{
  "aliases": [],
  "alternatives": [],
  "build_dependencies": [
    "go"
  ],
  "categories": [],
  "caveats": null,
  "conflicts_with": [],
  "dependencies": [],
  "deprecated": 0,
  "deprecation_reason": null,
  "desc": "JSON diff and patch",
  "disable_reason": null,
  "disabled": 0,
  "enrichment_fetched_at": "2026-06-20T23:38:59+00:00",
  "first_seen": "2026-06-20T23:34:18+00:00",
  "full_name": "jd",
  "github_default_branch": "master",
  "github_last_commit_at": "2026-04-22T19:22:57Z",
  "github_readme_excerpt": "[![Go Report Card](https://goreportcard.com/badge/josephburnett/jd)](https://goreportcard.com/report/josephburnett/jd)\n\n# JSON diff and patch\n\n`jd` is a commandline utility and Go library for diffing and patching\nJSON and YAML values. It supports a native `jd` format (similar to\nunified format) as well as JSON Merge Patch ([RFC\n7386](https://datatracker.ietf.org/doc/html/rfc7386)) and a subset of\nJSON Patch ([RFC\n6902](https://datatracker.ietf.org/doc/html/rfc6902)). Try it out at\nhttp://play.jd-tool.io/.\n\n## Example\n\nDiff `jd a.json b.json`:\n\n```JSON\n{\"foo\":[\"bar\",\"baz\"]}\n```\n\n```JSON\n{\"foo\":[\"bar\",\"bam\",\"boom\"]}\n```\n\nOutput:\n\n```DIFF\n@ [\"foo\",1]\n  \"bar\"\n- \"baz\"\n+ \"bam\"\n+ \"boom\"\n]\n```\n\n## Features\n\n1. Human-friendly format, similar to Unified Diff.\n2. Produces a minimal diff between array elements using LCS algorithm.\n3. Adds context before and after when modifying an array to prevent bad patches.\n4. Create and apply structural patches in jd, patch (RFC 6902) and merge (RFC 7386) patch formats.\n5. Translates between patch formats.\n6. Includes Web Assembly-based UI (no network calls).\n\n## Installation\n\nGitHub Action:\n\n```yaml\n    - name: Diff A and B\n      id: diff\n      uses: josephburnett/jd@v2.1.2\n      with:\n        args: a.json b.json\n    - name: Print the diff\n      run: echo \u0027${{ steps.diff.outputs.output }}\u0027\n    - name: Check the exit code\n      run: if [ \"${{ steps.diff.outputs.exit_code }}\" != \"1\" ]; then exit 1; fi\n```\n\nTo get the `jd` commandline utility:\n* run `brew install jd`, or\n* run `mise use -g jd@latest` if you are using [mise](https://jdx.mise.dev), or\n* run `go install github.com/josephburnett/jd/v2/jd@latest`, or\n* visit https://github.com/josephburnett/jd/releases/latest and download the pre-built binary for your architecture/os, or\n* run in a Docker image `jd(){ docker run --rm -i -v $PWD:$PWD -w $PWD josephburnett/jd \"$@\"; }`.\n\nTo use the `jd` web UI:\n* visit http://play.jd-tool.io/, or\n* run `jd -port 8080` and visit http://localhost:8080.",
  "github_repo": "josephburnett/jd",
  "github_stars": 2277,
  "github_topics": [
    "diff",
    "json",
    "patch",
    "yaml"
  ],
  "homepage": "https://github.com/josephburnett/jd",
  "homepage_og_description": null,
  "homepage_og_image": null,
  "homepage_title": null,
  "installs_30d": 267,
  "installs_365d": 9422,
  "installs_90d": 1427,
  "keg_only": 0,
  "keg_only_reason": null,
  "last_seen": "2026-06-20T23:34:18+00:00",
  "license": "MIT",
  "llm_generated_at": null,
  "llm_model": null,
  "name": "jd",
  "oldnames": [],
  "one_liner": null,
  "optional_dependencies": [],
  "rank_30d": 2329,
  "rank_365d": 1463,
  "rank_90d": 1851,
  "raw_hash": "2d1e4a195fccad44",
  "recommended_dependencies": [],
  "revision": 0,
  "ruby_source_path": "Formula/j/jd.rb",
  "tap": "homebrew/core",
  "test_dependencies": [],
  "uses_from_macos": [],
  "version_head": "HEAD",
  "version_stable": "2.5.0",
  "versioned_formulae": [],
  "why_use_this": null
}