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. ▲ 324
    JC converts the output of popular command-line tools to JSON
    story by tosh · 2023-12-08 · 159 comments
  9. …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
  10. …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
  11. …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
  12. …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)
  13. 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.
  14. …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
  15. …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
  16. …can use dig output, the next time you need to do something like this you might find 'jc' helpful: https://github.com/kellyjonbrazil/jc
  17. https://github.com/kellyjonbrazil/jc It's an attempt to do this from outside the house.
  18. …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
  19. …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…
  20. …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…
  21. …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…
  22. …built it in as an option. It would make shell scripts shorter, more readable, and less buggy. [0] https://github.com/kellyjonbrazil/jc
  23. Here you go: https://github.com/kellyjonbrazil/jc
  24. …output of many common unix utilities to json. So you would not need to parse `ip` for example. https://github.com/kellyjonbrazil/jc#parsers
  25. …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
  26. …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
  27. ▲ 2
    JSON Output in Sh
    story by debdut · 2021-12-07 · 0 comments
  28. 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…
  29. …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
  30. 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.
  31. ▲ 3
    Jc – Convert Linux CLI Tools Output to JSON
    story by ggeorgovassilis · 2021-09-16 · 0 comments
  32. ▲ 2
    Jc – CLI, Python library to convert output of popular CLI tools to JSON, Dicts
    story by gilad · 2021-09-09 · 0 comments
  33. Article from 2019 basically advertises https://github.com/kellyjonbrazil/jc which converts output of many unix cli commands into json, depends on Python
  34. …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…
  35. ▲ 3
    JC: JSON CLI Output Utility
    story by gk1 · 2021-04-10 · 0 comments
  36. ▲ 2
    JC: Convert output of CLI tools to JSON
    story by ducktective · 2021-04-09 · 0 comments
  37. …been done. Creating the schema many times requires more thought than writing the parser itself. [0] https://github.com/kellyjonbrazil/jc
  38. As I've mentioned in other discussions here, I find jc useful for exactly this purpose -- https://github.com/kellyjonbrazil/jc
  39. 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
  40. Consider adding https://github.com/kellyjonbrazil/jc .
  41. ..not sure if a plug but this does exactly that: https://github.com/kellyjonbrazil/jc
  42. I find jc useful for exactly this purpose -- https://github.com/kellyjonbrazil/jc
  43. …including .ini and key/value pair files with various delimiters and comment identifiers. [0] https://github.com/kellyjonbrazil/jc (disclaimer: I am the author)
  44. This is what jc[0] does. [0] https://github.com/kellyjonbrazil/jc (disclaimer: I am the author)
  45. ▲ 5
    Jc: JSONify the output of Linux CLI tools for easier parsing in scripts
    story by pcr910303 · 2020-08-07 · 0 comments
  46. …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)'
  47. …(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)
  48. …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
  49. …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
  50. …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