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.
apt-cache-show
command parserapt-get-sqq
command parserethtool
command parserneedrestart
command parserdf
parser to add human readable output support. Note: the size
field has been changed to an integer and all size values have been normalized
to bytes.free
parser to add human readable output support. All size values
have been normalizd to bytes.iptables
parser to handle -x output/proc/pid/stat
parser to support "Idle" staterpm_qi
and pkg_index_deb
parsers to split list fields into arraysiwconfig
parser to handle more special characters in the SSID namexrandr
parser to ignore extra horizontal and vertical stats linesini
parser crashing with some keys with no valuesxrandr
parser to extract more EDID datauptime
parser to support output with no user information--quiet
CLI option to cover more warning messages--slurp
functionality to wrap output from multiple lines into a single array.
Note, this only works with single-line input parsers. (e.g. date
, ip-address
, url
, etc.)
Streaming parsers are not supported. Use jc -hhh
to find parsers compatible with the slurp option./proc
file magic syntax to allow slurping when multiple files are selected
and to include the _file
metadata field in the data--meta-out
functionality to include a list of the input data when using --slurp
or /proc
file magic syntax. For slurpable parsers, this is a list of string inputs in order.
For /proc
file magic syntax, this is a list of /proc
filenames in order. This can help with
identifying which input matches to which output when using --slurp
or when converting multiple
files via /proc
file magic syntax.curl-head
command parser for curl --head
or curl -I
with verbose supportefibootmgr
command parserhttp-headers
parser for plain HTTP header outputkv-dup
parser for Key/Value files with duplicate keyspath
string parser to parse posix pathpath-list
string parser to parse path list strings found in env variablesremove_quotes
function to utils.py
normalize_key
function to utils.py
line_slice
function to utils.py
get_parser
function to lib.py
nsd-control
parser to support more zone informationping
and ping-s
parsers to support the -I
command optionproc-net-tcp
parser to add opposite endian support for architectures
like the s390xurl
parser to add parent
, filename
, stem
, and extension
fieldsini
and ini-dup
parsers to consistently handle null values as empty stringskv
, pkg_index_deb
, lsb_release
, and os-release
debconf-show
command parseriftop
command parserpkg-index-apk
parser for Alpine Linux Package Index filespkg-index-deb
parser for Debian/Ubuntu Package Index filesproc-cmdline
parser for /proc/cmdline
fileswapon
command parsertune2fs
command parseriso-datetime
parser deprecated since v1.22.1. (use datetime-iso
instead)acpi
command parser for code cleanupiptables
parser for cases where the target
field is blank in a rulevmstat
parsers for some cases where wide output is usedmount
parser for cases with spaces in the mount point namexrandr
parser for infinite loop issueswho
command parser for cases when the from field contains spaceshost
command parsernsd-control
command parserlsb_release
command parser/etc/os-release
file parserenv
command parser to support multi-line valuesping
and ping-s
parsers to add error and corrupted supportxml
parser to include comments in the JSON outputpidstat
command parser when using -T ALL
x509-cert
parser to allow negative serial numbersx509-cert
parser for cases when bitstrings are larger than standardxrandr
command parser for associated device issues/etc/resolve.conf
file parser/proc/net/tcp
and /proc/net/tcp6
file parserfind
command parserip route
command parsercertbot
command parser to be more robust with different line endingslsattr
command parsersrt
file parserveracrypt
command parserdig
command parser to support the +nsid
optionlast
and lastb
command parser to support the -x
optionroute
command parser to add Windows supportnetstat
command parser to add Windows supportss
command parser to support extended optionsbluetoothctl
command parser for some mouse devicesping
command parsers for output with missing hostnamestat
command parser for older versions that may not contain all fieldssetup.cfg
bluetoothctl
command parsercertbot
command parser for certificates
and show_account
optionsacpi
command parser for "Not charging" battery status linesiwconfig
command parser for SSIDs with dashes in the namecrontab
command parsers for incorrect variable parsing in some casesgit-log
and git-log-s
command parsers for incorrect insertion/deletion parsingufw-appinfo
command parser for parsing errors on multiline description fieldszpool-status
command parser for lines that start with tabtimedatectl
command parser when RTC set to localpy.typed
file is included in the package wheellsusb
command parser to support CDC MBIM and CDC MBIM Extended fieldstimesync-status
for the timedatectl
command parser