Now on Omarchy: read the manual without leaving your desktop

Cheat Sheet

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

Showing jq. Choose another tool in the sidebar, or search all 629 commands.

jq

Slice, filter, and reshape JSON on the command line.

14 commands
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