notmuch-tag(1) on Linux
The text 3e1bb99dbaa2, as Debian 11 (Bullseye) shipped it.
add/remove tags for all messages matching the search terms
Flags it lists
-
--batch -
--input -
--remove-all