jc
converts command output to JSON format
TLDR
Parse command output
$ [command] | jc --[parser]
Parse ps output$ ps aux | jc --ps
Parse ls output$ ls -l | jc --ls
Parse ifconfig$ ifconfig | jc --ifconfig
Parse with pretty output$ df | jc --df -p
List available parsers$ jc -a
Parse file contents$ jc --[parser] < [file.txt]
SYNOPSIS
jc [options] --parser [file]
DESCRIPTION
jc converts the output of dozens of standard Unix commands into structured JSON or YAML format, enabling piping to JSON-aware tools like jq for automated processing and scripting.
PARAMETERS
--_PARSER_
Parser name (ps, ls, df, ifconfig, etc.).-a, --about
List available parsers.-p, --pretty
Pretty print JSON output.-r, --raw
Raw parser output.-q, --quiet
Suppress warnings.-m, --monochrome
Disable colored output.-M, --meta-out
Include metadata in output (timestamp, parser name, exit codes).-C, --force-color
Force colored output even when piping.-d, --debug
Enable debug mode (use -dd for verbose).-y, --yaml-out
Output in YAML format instead of JSON.-s, --slurp
Combine multiple lines into a JSON array.-u, --unbuffer
Disable output buffering for streaming.-v, --version
Display version information.--help
Display help information.
INSTALL
sudo dnf install jc
sudo pacman -S jc
sudo apk add jc
sudo zypper install jc
brew install jc
nix profile install nixpkgs#jc
CAVEATS
Parser accuracy varies. Not all command versions supported. May need updates for format changes.
HISTORY
jc was created by Kelly Brazil to enable JSON-based automation from traditional Unix command output.