In WP-CLI list the arguments in WP_Query
are defined by the associated arguments like --post_type=post
. To be able to filter custom taxonomies you would need to use tax_query
. Unfortunately WP-ClI does not support argument array so it is not possible.
It is on the other hand possible with the WP-CLI Rest package. You can install it by running wp package install wp-cli/restful
.
You should be able to query it with the command wp rest post list