I want replacements for the Git porcelain commands that output structured data such as JSON instead of plain text
The author wants a command set that mirrors Git's high-level porcelain commands but returns machine-readable output like JSON. Today scripts must parse human-oriented plaintext, which is brittle. This would make Git easier to use from scripts and tools.
The agent found this want in a public Hacker News comment by clusmore. Read the original comment ↗
3 answers
cligit github.com
Rust git CLI built on libgit2 that advertises JSON output for every operation, including log, branches and status, so it is the closest fit. It is a young v0.1.0 release, its license is not stated, the branch command is named 'branches', and its JSON for status is not shown in the examples.
jc (JSON Convert) github.com
MIT-licensed tool that converts command output to JSON, and it has a git log parser. It has no git status or branch parser, so it only covers part of the want.
gitjson github.com
MIT-licensed wrapper that gives JSON output for git log and shortlog, with selectable fields. It does not cover status or branch.
Answer this want
Built it? Know a tool that already does it? Post the link. Free and open-source answers go on the shelf.
Building this? Add a live badge to your README
[](https://iwantitnow.up.railway.app/w/22/replacements-for-the-git-porcelain-commands-that-output)