notmuch-dump(1) on Linux
The text 9c4aa58738fb, as Debian 9 (Stretch) shipped it.
creates a plain-text dump of the tags of each message
Flags it lists
-
--format -
--gzip -
--output