Hacker GitHub

← All repos

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

Mentions per year 55 mentions · busiest year 2020 (16)
20082026
  1. …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
  2. …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
  3. How is this different to this https://github.com/kellyjonbrazil/jc
  4. …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
  5. 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…
  6. …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…
  7. `jc` supports plugins: https://github.com/kellyjonbrazil/jc#parser-plugins
  8. …tools, which I use alongside jq are jo [0] and jc [1]. [0]: https://github.com/jpmens/jo [1]: https://github.com/kellyjonbrazil/jc
    comment by nikolay · 2023-09-07 · in jq 1.7
  9. …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
  10. …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
  11. …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)
  12. 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.
  13. …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
  14. …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
  15. …can use dig output, the next time you need to do something like this you might find 'jc' helpful: https://github.com/kellyjonbrazil/jc
  16. https://github.com/kellyjonbrazil/jc It's an attempt to do this from outside the house.
  17. …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
  18. …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…
  19. …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…
  20. …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…
  21. …built it in as an option. It would make shell scripts shorter, more readable, and less buggy. [0] https://github.com/kellyjonbrazil/jc
  22. Here you go: https://github.com/kellyjonbrazil/jc
  23. …output of many common unix utilities to json. So you would not need to parse `ip` for example. https://github.com/kellyjonbrazil/jc#parsers
  24. …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
  25. …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
  26. 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…
  27. …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
  28. 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.
  29. Article from 2019 basically advertises https://github.com/kellyjonbrazil/jc which converts output of many unix cli commands into json, depends on Python
  30. …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…
  31. …been done. Creating the schema many times requires more thought than writing the parser itself. [0] https://github.com/kellyjonbrazil/jc
  32. As I've mentioned in other discussions here, I find jc useful for exactly this purpose -- https://github.com/kellyjonbrazil/jc
  33. 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
  34. Consider adding https://github.com/kellyjonbrazil/jc .
  35. ..not sure if a plug but this does exactly that: https://github.com/kellyjonbrazil/jc
  36. I find jc useful for exactly this purpose -- https://github.com/kellyjonbrazil/jc
  37. …including .ini and key/value pair files with various delimiters and comment identifiers. [0] https://github.com/kellyjonbrazil/jc (disclaimer: I am the author)
  38. This is what jc[0] does. [0] https://github.com/kellyjonbrazil/jc (disclaimer: I am the author)
  39. …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)'
  40. …(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)
  41. …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
  42. …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
  43. …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
  44. 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
  45. 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
  46. https://github.com/kellyjonbrazil/jc can come pretty handy there
    comment by BaltoRouberol · 2020-03-17 · in Text Processing in the Shell
  47. 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)