tomnomnom/gron is tracked by TopGit as a developer tool, with 14.5k stars on GitHub, written primarily in Go. Make JSON greppable!
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
gron transforms JSON into discrete assignments to make it easier to grep for what you want and see the absolute 'path' to it.
It eases the exploration of APIs that return large blobs of JSON but have terrible documentation.
Disclaimer: the GitHub API has fantastic documentation, but it makes for a good example.
Installation
gron has no runtime dependencies. You can just download a binary for Linux, Mac, Windows or FreeBSD and run it.
Put the binary in your $PATH (e.g. in /usr/local/bin) to make it easy to use:
▶ tar xzf gron-linux-amd64-0.1.5.tgz
▶ sudo mv gron /usr/local/bin/
If you're a Mac user you can also install gron via brew:
▶ brew install gron
Or if you're a Go user you can use go install:
▶ go install github.com/tomnomnom/gron@latest
It's recommended that you alias ungron or norg (or both!) to gron --ungron. Put something like this in your shell profile (e.g. in ~/.bashrc):
alias norg="gron --ungron"
alias ungron="gron --ungron"
Or you could create a shell script in your $PATH named ungron or norg to affect all users:
If you get creative you can do some pretty neat tricks with gron, and
then ungron the output back into JSON.
Get Help
▶ gron --help
Transform JSON (from a file, URL, or stdin) into discrete assignments to make it greppable
Usage:
gron [OPTIONS] [FILE|URL|-]
Options:
-u, --ungron Reverse the operation (turn assignments back into JSON)
-v, --values Print just the values of provided assignments
-c, --colorize Colorize output (default on tty)
-m, --monochrome Monochrome (don't colorize output)
-s, --stream Treat each line of input as a separate JSON object
-k, --insecure Disable certificate validation
-j, --json Represent gron data as JSON stream
--no-sort Don't sort output (faster)
--version Print version information
Exit Codes:
0 OK
1 Failed to open file
2 Failed to read input
3 Failed to form statements
4 Failed to fetch URL
5 Failed to parse statements
6 Failed to encode JSON
Examples:
gron /tmp/apiresponse.json
gron http://jsonplaceholder.typicode.com/users/1
curl -s http://jsonplaceholder.typicode.com/users/1 | gron
gron http://jsonplaceholder.typicode.com/users/1 | grep company | gron --ungron
FAQ
Wasn't this written in PHP before?
Yes it was! The original version is preserved here for posterity.
Why the change to Go?
Mostly to remove PHP as a dependency. There's a lot of people who work with JSON who don't have PHP installed.
Why shouldn't I just use jq?
jq is awesome, and a lot more powerful than gron, but with that power comes
complexity. gron aims to make it easier to use the tools you already know, like grep and sed.
gron's primary purpose is to make it easy to find the path to a value in a deeply nested JSON blob
when you don't already know the structure; much of jq's power is unlocked only once you know that structure.
No homepage URL was recorded for tomnomnom/gron in TopGit's last sync. The README tab above frequently contains screenshots and demo links, or check the repository description on GitHub.
How active is development on tomnomnom/gron?
The most recent commit recorded on tomnomnom/gron was 1.5 years ago, based on the GitHub push timestamp. The repository has 348 forks — one of the better signals of community interest.
Is tomnomnom/gron open source?
Yes — tomnomnom/gron ships under the MIT license, which makes its source code freely readable (and, depending on license terms, forkable and reusable). Source: github.com/tomnomnom/gron.
What license does tomnomnom/gron use?
tomnomnom/gron is released under the MIT license. Always verify the LICENSE file directly on GitHub for the authoritative terms — license strings can be edited out of sync with a project's actual stance.
What topics is tomnomnom/gron associated with?
GitHub's repository topics for tomnomnom/gron: "cli", "json". TopGit's editorial category is Developer Tools.
Where do I read more about tomnomnom/gron?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/tomnomnom/gron is the definitive source.
Read full README in the tab above.
Still deciding about gron?
One click hands the question to an AI along with this page — see what it says about gron.