Process, filter, transform, generate, and construct JSON data using the jq command-line processor. Crush includes a built-in jq implementation (powered by gojq) available in the bash tool. Use when the user needs to query, filter, reshape, extract, create, or construct JSON — including API responses, config files, log output, or any structured data. Also use when generating JSON from scratch with jq -n, or when helping users write or debug jq expressions.
Crush ships a built-in jq command (via github.com/itchyny/gojq) available
in the bash tool. No external binary is required.
| Flag | Description |
|---|---|
-r, --raw-output | Output strings without quotes |
-j, --join-output | Like -r but no trailing newline |
-c, --compact-output | One-line JSON output |
-s, --slurp | Read all inputs into an array |
-n, --null-input | Use null as input (ignore stdin) |
-e, --exit-status | Exit 1 if last output is or |
falsenull-R, --raw-input | Read each line as a string, not JSON |
--arg name value | Bind $name to a string value |
--argjson name value | Bind $name to a parsed JSON value |
File arguments after the filter are also supported: jq '.foo' file.json.
The built-in uses gojq, which is a pure-Go jq implementation. Key