I have a lot of Custom Posts that I need to set featured images for, based on a custom taxonomy. I am trying to see if there is a way to do this via wp-cli, I see an example offered there which would let me import and set an image to all posts of the CPT. However I cannot figure out if it is possible to further filter that by a custom taxonomy.
ATTACHMENT_ID="$(wp media import ~/Downloads/image.png --porcelain)"
wp post list --post_type=post --format=ids | xargs -0 -d ' ' -I % wp post meta add % _thumbnail_id $ATTACHMENT_ID
The command wp post list has an optional field for "filter", is that useful, I cannot see what it does.