jq
/install jq
jq
Command-line JSON processor for extracting, filtering, and transforming JSON.
Installation
macOS / Linux (Homebrew):
brew install jq
All platforms: See jqlang.org/download for packages, binaries, and build instructions.
Usage
jq '[filter]' [file.json]
cat file.json | jq '[filter]'
Quick Reference
.key # Get key
.a.b.c # Nested access
.[0] # First element
.[] # Iterate array
.[] | select(.x > 5) # Filter
{a: .x, b: .y} # Reshape
. + {new: "val"} # Add field
del(.key) # Remove field
length # Count
[.[] | .x] | add # Sum
keys # List keys
unique # Dedupe array
group_by(.x) # Group
Flags
-r raw output (no quotes) · -c compact · -s slurp into array · -S sort keys
Examples
jq '.users[].email' data.json # Extract emails
jq -r '.name // "default"' data.json # With fallback
jq '.[] | select(.active)' data.json # Filter active
jq -s 'add' *.json # Merge files
jq '.' file.json # Pretty-print
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install jq - After installation, invoke the skill by name or use
/jq - Provide required inputs per the skill's parameter spec and get structured output
What is jq?
Command-line JSON processor. Extract, filter, transform JSON. It is an AI Agent Skill for Claude Code / OpenClaw, with 4209 downloads so far.
How do I install jq?
Run "/install jq" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is jq free?
Yes, jq is completely free (open-source). You can download, install and use it at no cost.
Which platforms does jq support?
jq is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created jq?
It is built and maintained by Gustavo Madeira Santana (@gumadeiras); the current version is v1.2.0.