kellyjonbrazil/jc
View on GitHub ↗ ★ 8,700 Python
CLI tool and python library that converts the output of popular command-line tools, file-types, and common strings to JSON, YAML, or Dictionaries. This allows piping of output to tools like jq and simplifying automation scripts.
55 mentions on Hacker News by 41 people: 8 stories, 47 comments · first 2020-02-21 · latest 2025-11-12
20082026
-
…from unstructured raw output. Almost any CLI that does this needs to be paired with a parser (like https://github.com/kellyjonbrazil/jc ) and/or a renderer (like https://github.com/charmbracelet/glow ). If no such pairing is available then…
comment by robot-wrangler · 2025-11-12 · in The terminal of the future -
…paired with jc [1] it's pretty much the best shell I've ever used. [0] https://www.nushell.sh/ [1] https://github.com/kellyjonbrazil/jc
comment by account-5 · 2025-04-11 · in Ask HN: What's the Best Open Source Tool You've Discovered Recently? -
How is this different to this https://github.com/kellyjonbrazil/jc
comment by zikohh · 2024-07-03 · in Show HN: Jb / json.bash – Command-line tool (and bash library) that creates JSON -
…more utilities to your system to do more complex logic; ive used similar apps to this in the past: https://github.com/kellyjonbrazil/jc there's also using zero terminiated lines in ls with `--zero`; then piping that to a number of apps…
comment by out-of-ideas · 2024-06-30 · in Why not parse `ls` and what to do instead -
https://github.com/kellyjonbrazil/jc - "CLI tool and python library that converts the output of popular command-line tools, file-types, and common strings to JSON, YAML, or Dictionaries. This allows piping of output to tools like jq and…
comment by Arcuru · 2024-02-14 · in Xonsh: Python-powered, cross-platform, Unix-gazing shell -
…ability to exchange objects in the command line is almost unmatched. On Linux you can use `jc` ( https://github.com/kellyjonbrazil/jc ) combined with `jq` ( https://jqlang.github.io/jq/ ) to glue together command lines, but that's still…
comment by jeroenhd · 2023-12-10 · in Gooey: Turn almost any Python command line program into a full GUI application -
`jc` supports plugins: https://github.com/kellyjonbrazil/jc#parser-plugins
comment by kbrazil · 2023-12-08 · in JC converts the output of popular command-line tools to JSON -
…already broken but they don't know it. [1] https://kellyjonbrazil.github.io/jc/docs/parsers/ls [2] https://github.com/kellyjonbrazil/jc/blob/4cd721be8595db52b6...
comment by follower · 2023-09-02 · in The case for Nushell -
…that reliable & cross-platform parsing of even "basic" commands can be non-trivial. [0] https://github.com/kellyjonbrazil/jc [1] https://kellyjonbrazil.github.io/jc/docs/parsers/ls [2] https://github.com/kellyjonbrazil/jc/blob/4cd721be8595d…
comment by follower · 2023-09-02 · in The case for Nushell -
…to otherwise half-ass parse ifconfig output (that is not trivial, otherwise no one would need https://github.com/kellyjonbrazil/jc ).
comment by ElectricalUnion · 2023-08-08 · in Linux guide for power users (2022) -
https://github.com/kellyjonbrazil/jc which can parse output of various command-line tools into JSON. And jq ( https://stedolan.github.io/jq/ ) of course.
comment by mtmail · 2023-03-13 · in Ask HN: What modern tools should be standard part of a modern unixy distro?Why? -
…https://github.com/jqnatividad/qsv https://csvkit.readthedocs.io/en/latest https://github.com/kellyjonbrazil/jc https://github.com/TomWright/dasel https://github.com/johnkerl/miller https://stedolan.github.io/jq https://github.com/ha
comment by guilhas · 2023-03-13 · in Nushell.sh ls | where size > 10mb | sort-by modified -
…comm before the closing parent after the comm, which would thus make your regexp fail to match. [1] https://github.com/kellyjonbrazil/jc/blob/master/jc/parsers/...
comment by prattmic · 2022-12-22 · in Linux /proc/pid/stat parsing bugs -
…can use dig output, the next time you need to do something like this you might find 'jc' helpful: https://github.com/kellyjonbrazil/jc
comment by dgacmu · 2022-12-21 · in Ask HN: Programs that saved you 100 hours? (2022 edition) -
https://github.com/kellyjonbrazil/jc It's an attempt to do this from outside the house.
comment by AndyKluger · 2022-11-23 · in Posix commands with a flag to output standardized JSON or YAML -
…output JSON" part of the problem. I think I've seen others, but this is the only one I can recall: https://github.com/kellyjonbrazil/jc
comment by lgas · 2022-11-18 · in Idio by Example -
…other widely used format[1]) option for tools that have output that would be useful in scripts. [0] https://github.com/kellyjonbrazil/jc#locale [1] formats should have good library support across many languages and nice filter/query…
comment by kbrazil · 2022-11-03 · in JC – JSONifies the output of many CLI tools -
…self-contained. The binaries and OS package installers are available under the GitHub Releases: https://github.com/kellyjonbrazil/jc/releases This is still python under the hood and not as small of a binary as I would like, but it does…
comment by kbrazil · 2022-11-03 · in JC – JSONifies the output of many CLI tools -
…to community repository they just forgot to stop recommending an AUR wrapper for installing: https://github.com/kellyjonbrazil/jc/commit/f2dd7b8815edc92e... EDIT2: Created a PR with the GitHub.dev editor .. Absolutely blown away by how…
comment by vesinisa · 2022-11-03 · in JC – JSONifies the output of many CLI tools -
…built it in as an option. It would make shell scripts shorter, more readable, and less buggy. [0] https://github.com/kellyjonbrazil/jc
comment by dkarl · 2022-11-01 · in Nushell: Introduction to a new kind of shell -
Here you go: https://github.com/kellyjonbrazil/jc
comment by zokier · 2022-11-01 · in Nushell: Introduction to a new kind of shell -
…output of many common unix utilities to json. So you would not need to parse `ip` for example. https://github.com/kellyjonbrazil/jc#parsers
comment by ducktective · 2022-10-27 · in Shell script best practices, from a decade of scripting things -
…with that is https://wiki.freebsd.org/LibXo Meanwhile, there is jc so that jc df returns JSON. See https://github.com/kellyjonbrazil/jc Hope this helps.
comment by ilyash · 2022-06-09 · in All software is web software now -
…writing a command where 99% of it is describing to jq or awk what an INI file looks like. [1]: https://github.com/kellyjonbrazil/jc
comment by RulerOf · 2022-05-21 · in Cockpit Project -
I hadn't seen jc before (by the author of this piece: https://github.com/kellyjonbrazil/jc ) - what a great idea! It has parsers for around 80 different classic Unix utilities such that it can convert their output to JSON. ~ % dig…
comment by simonw · 2021-12-05 · in Tips on adding JSON output to your CLI app -
…to JSON with jc. (I’m the author) $ jc dig example.com | jq -r '.[].answer[].data' 93.184.216.34 https://github.com/kellyjonbrazil/jc
comment by kbrazil · 2021-12-04 · in How to use dig -
The jc tool ( https://github.com/kellyjonbrazil/jc#readme ) will convert bash command output to JSON. It needs parsers for each command though. https://jc-web-demo.herokuapp.com has a list of supported commands.
comment by mtmail · 2021-11-13 · in Ask HN: Will we ever get JSON output for bash commands? -
Article from 2019 basically advertises https://github.com/kellyjonbrazil/jc which converts output of many unix cli commands into json, depends on Python
comment by xrayarx · 2021-08-22 · in Bringing the Unix philosophy to the 21st century (2019) -
…right flags. Or maybe the existence of some env var like $DEFAULT_OUTPUT=JSON I like this approach: https://github.com/kellyjonbrazil/jc > CLI tool and python library that converts the output of popular command-line tools and file-types to…
comment by tmerse · 2021-06-04 · in Unix Shell Programming: The Next 50 Years [pdf] -
…been done. Creating the schema many times requires more thought than writing the parser itself. [0] https://github.com/kellyjonbrazil/jc
comment by kbrazil · 2021-04-02 · in Terminal escape sequences in Git commit email field -
As I've mentioned in other discussions here, I find jc useful for exactly this purpose -- https://github.com/kellyjonbrazil/jc
comment by gonzus · 2021-03-29 · in Terminal escape sequences in Git commit email field -
JFTR, stumbled over this recently: https://github.com/kellyjonbrazil/jc "CLI tool and python library that converts the output of popular command-line tools and file-types to JSON or Dictionaries. This allows piping of output to tools like…
comment by eMPee584 · 2021-01-20 · in Linux and Powershell -
Consider adding https://github.com/kellyjonbrazil/jc .
comment by _flux · 2020-12-22 · in Parsing JSON at the CLI: A Practical Introduction to jq and more -
..not sure if a plug but this does exactly that: https://github.com/kellyjonbrazil/jc
comment by _flux · 2020-12-22 · in Parsing JSON at the CLI: A Practical Introduction to jq and more -
I find jc useful for exactly this purpose -- https://github.com/kellyjonbrazil/jc
comment by gonzus · 2020-11-09 · in Dog – A command-line DNS client written in Rust -
…including .ini and key/value pair files with various delimiters and comment identifiers. [0] https://github.com/kellyjonbrazil/jc (disclaimer: I am the author)
comment by kbrazil · 2020-08-10 · in Crush: A command line shell that is also a powerful modern programming language -
This is what jc[0] does. [0] https://github.com/kellyjonbrazil/jc (disclaimer: I am the author)
comment by kbrazil · 2020-08-10 · in Crush: A command line shell that is also a powerful modern programming language -
…use jq to filter / count / etc in a structured, non-whitespace-dependent way. A combination of jc ( https://github.com/kellyjonbrazil/jc ) and jq fits the bill for me: ls -l /usr/bin | jc --ls | jq '.[] | select(.size > 50000000)'
comment by gonzus · 2020-08-07 · in Crush: A command line shell that is also a powerful modern programming language -
…(e.g. kubectl) have json and yaml output options, which can be nicely parsed with jq. I also found https://github.com/kellyjonbrazil/jc handy, which attempts to convert many commands to json output.
comment by shric · 2020-05-28 · in CLIs are reified UIs (2017) -
…a nicer json renderer (perhaps table format) to have a similar feature parity to Nushell. [0]: https://github.com/kellyjonbrazil/jc
comment by qqii · 2020-04-15 · in Nushell – A New Type of Shell -
…by a small subset of sysadmins. [1] https://daniel.haxx.se/blog/2020/03/17/curl-write-out-json/ [2] https://github.com/kellyjonbrazil/jc
comment by tlhunter · 2020-03-19 · in Illustrated Jq Tutorial -
…out `jtbl` on my github which prints the JSON or JSON Lines output to a table in your terminal. https://github.com/kellyjonbrazil/jc https://github.com/kellyjonbrazil/jtbl
comment by kbrazil · 2020-03-19 · in Curl will now output JSON -
https://github.com/kellyjonbrazil/jc was posted in another comment; it appears to be exactly that.
comment by matt_kantor · 2020-03-18 · in Curl will now output JSON -
Have you seen jc[0] as an effort to wrap common utilities to output json? [0]: https://github.com/kellyjonbrazil/jc
comment by ayyess · 2020-03-17 · in Curl will now output JSON -
https://github.com/kellyjonbrazil/jc can come pretty handy there
comment by BaltoRouberol · 2020-03-17 · in Text Processing in the Shell -
There's jc [1], that can return the JSON output of standard Linux CLI tools. [1] - https://github.com/kellyjonbrazil/jc
comment by bkq · 2020-02-21 · in Unix Toolbox (2008)