Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

jd

$ jd Community Low Risk
Joseph Burnett · Database & Data · MIT · macos / linux / windows

jd compares JSON and YAML documents structurally rather than line-by-line, supporting set/multiset array matching (-set, -mset), RFC 6902 JSON Patch (-f patch), and applying patches cleanly via -p.

FCRS-1.0 Score
91 /100
Excellent
Medium Confidence
Zero-Friction Install
brew install jd
CLI vs MCP Decision CLI Only

Computes exact structural diffs and RFC 6902 patches locally without burning LLM tokens comparing raw JSON files.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
✓ NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 23 / 25

Supports -f patch / -f merge structured JSON outputs, -yaml conversion, non-colored output by default, and predictable exit codes (0 match, 1 diff).

  • Supports -f patch (RFC 6902) and -f merge (RFC 7386)
  • No color unless -color is passed
Trust & Safety 24 / 25

Read-only diffing to stdout by default; patching outputs to stdout unless -o is explicitly supplied.

  • Read-only default; explicit -p and -o required for patch writes
Setup & Portability 15 / 15

Single static Go binary available via Homebrew, go install, and GitHub Releases.

  • Single Go binary (brew install jd)
Utility & Efficiency 13 / 15

Eliminates key-order and array-order noise via -set and -mset while also acting as a format translator (-t yaml2json).

  • Structural diffing with -set, -mset, and -yaml
Maintenance & Lineage 8 / 10

Actively maintained by Joseph Burnett under the MIT license.

  • Active josephburnett/jd repository under MIT
Docs & Verifiability 8 / 10

Clear README examples and concise -h flag documentation covering patch formats and set semantics.

  • Documented CLI flags and RFC patch examples in README

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

None; operates purely on local JSON/YAML files and stdin/stdout.

Side Effects
Read-Only Local Write
Cost & Quotas

MIT open-source CLI; completely free.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# jd Agent Rules
- Use `jd -f patch` for machine-parseable RFC 6902 JSON Patch output.
- Write patched outputs to a new file with `-o <out>` before replacing the original.

Agent-Ready Command Recipes

Safe Read-Only Queries

Generate an RFC 6902 JSON Patch diff
jd -f patch a.json b.json

Compares a.json and b.json structurally and emits a machine-readable RFC 6902 JSON Patch array.

Diff JSON ignoring array element order
jd -set a.json b.json

Treats JSON arrays as sets so reordered elements do not trigger noisy false-positive diffs.

Controlled Writes & Previews

Apply a structural patch to a target file
jd -p -o patched.json diff.jd target.json

Applies diff.jd to target.json and writes the result to a new file via -o instead of overwriting in place.

Strengths for Agents

  • + Outputs standard RFC 6902 (-f patch) and RFC 7386 (-f merge) JSON diffs.
  • + -set and -mset prevent noisy diffs on unordered JSON arrays.
  • + Color is off by default (-color opt-in), keeping stdout clean for agents.

Caveats & Pitfalls

  • ! Diff mode returns exit code 1 when differences exist, which scripts using set -e must handle explicitly.
  • ! Native jd patch format is custom syntax unless -f patch or -f merge is specified.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI