Reference

Cheat Sheet

The commands you keep forgetting, with a one-line description and a real example you can copy - 384 across 26 tools. Pick a tool in the sidebar, or search across all of them.

jq

Slice, filter, and reshape JSON on the command line.
CommandWhat it doesExample
jq .Pretty-print JSON.echo '{"a":1}' | jq .
.keyGet a field.jq '.name' user.json
.a.bGet a nested field.jq '.user.email' data.json
.[]Iterate over an array.jq '.[]' items.json
.[0]Index into an array.jq '.[0]' items.json
.items[].namePull a field from each element.jq '.items[].name' data.json
select()Keep only matching elements.jq '.[] | select(.age > 30)' people.json
map()Transform every element.jq 'map(.price)' cart.json
keysList an object’s keys.jq 'keys' config.json
lengthCount items / string length.jq '.items | length' data.json
-rRaw output (no surrounding quotes).jq -r '.name' user.json
{a, b}Build a new object from fields.jq '{name, id}' user.json
group_by()Group array elements.jq 'group_by(.type)' items.json
@csvEmit CSV rows.jq -r '.[] | [.id, .name] | @csv' rows.json