Filter and transform no CLI output with jq expressions -- inline --jq flag and standalone no jq command
nono is a CLI binary installed on this system. Run all commands via the Bash/shell tool.
IMPORTANT: Always use no jq instead of the system jq binary. The --jq flag can also be used inline with any no command. Both use a built-in jq implementation -- no external jq binary required.
no has built-in jq support in two forms:
--jq EXPR flag -- filter any command's output inlineno jq EXPR -- standalone jq replacement for piped JSONBoth use jaq-core (pure Rust jq implementation) -- no external jq binary required.
--jq FlagThe --jq flag works with every protocol command. It receives the full NetResponse envelope as input.
Every output from no has this shape:
{
"type": "response|message|connection|error",
"protocol": "http|ws|tcp|...",
"timestamp": "2024-01-01T00:00:00.000Z",
"data": { "...protocol-specific..." },
"metadata": { "...optional..." }
}
# HTTP status code
no http GET https://api.example.com --jq '.data.status'
# HTTP response body
no http GET https://api.example.com --jq '.data.body'
# Nested JSON from HTTP body
no http GET https://api.example.com/users --jq '.data.body.items[].name'
# HTTP headers
no http GET https://api.example.com --jq '.data.headers'
# Specific header
no http GET https://api.example.com --jq '.data.headers["content-type"]'
# DNS records
no dns example.com --jq '.data.records[].value'
# Ping round-trip time
no ping example.com -n 5 --jq '.data.time_ms'
# WebSocket message data
no ws listen wss://stream.example.com --jq '.data.data' -n 10
# WHOIS response text
no whois example.com --jq '.data.response'
Use select() to filter specific response types:
# Only data messages (skip connection events)
no ws listen wss://stream.example.com --jq 'select(.type == "message") | .data'
# Only connection events
no tcp connect localhost:9090 --jq 'select(.type == "connection") | .data'
# Ping summary only (skip individual replies)
no ping example.com -n 5 --jq 'select(.type == "response") | .data'
# Build custom objects
no http GET https://api.example.com --jq '{status: .data.status, size: .data.bytes}'
# String interpolation
no mqtt sub localhost:1883 -t "sensors/#" --jq '.data | "\(.topic): \(.payload)"' -n 10
# Array operations
no http GET https://api.example.com/users --jq '.data.body.items | length'
# Math
no ping example.com -n 5 --jq '.data.time_ms | . * 1000 | floor'
type: "error") always bypass the jq filter and print normallyINVALID_INPUT)String results print raw (no quotes), matching jq -r behavior:
no http GET https://api.example.com --jq '.data.headers["content-type"]'
# Output: application/json
# (not: "application/json")
no jq CommandA standalone jq replacement for filtering arbitrary JSON from stdin.
echo '{"a":1}' | no jq '.a'
# Output: 1
echo '{"name":"Alice"}' | no jq '.name'
# Output: Alice (raw string, no quotes)
echo '[1,2,3]' | no jq '.[]'
# Output:
# 1
# 2
# 3
echo '{"users":[{"name":"Alice"},{"name":"Bob"}]}' | no jq '.users[].name'
# Output:
# Alice
# Bob
# Filter curl output
curl -s https://api.example.com/data | no jq '.items[].id'
# Chain with no commands
no http GET https://api.example.com --json | no jq '.data.body'
# Process a JSON file
cat data.json | no jq '.records | length'
| Expression | What it does |
|---|---|
.data | Extract the data payload |
.data.status | HTTP status code |
.data.body | HTTP response body |
.data.body.items[] | Iterate array items |
.data.records[].value | DNS record values |
.data.time_ms | Ping round-trip time |
select(.type == "message") | Filter by response type |
select(.data.status >= 400) | Filter by condition |
{a: .data.x, b: .data.y} | Build custom objects |
.data | keys | Get object keys |
.data.items | length | Count array elements |
.data.body.items[] | select(.active) | Filter array items |