wp –format=json is what makes the CLI scriptable

Parsing the table output with awk works until a value contains a space, and every command takes a format flag that removes the question.

$ wp plugin list --format=json | jq -r '.[] | select(.update=="available") | .name'

$ wp post list --post_type=product --format=ids | wc -w

$ wp option get turkerdev_settings --format=json | jq .

# and the one that makes a check scriptable
$ wp plugin list --format=json | jq -e 'all(.status=="active")'

--format=ids is the one for piping into another command and produces a space-separated list ready for xargs. jq -e sets the exit code from the result, which is what turns a query into a monitoring check. Combining these with wp @production aliases means a fleet-wide audit is one line, which is the point at which WP-CLI stops being a convenience and becomes infrastructure.