Bulk update metadata in front matter YAML

Is there a way, to bulk update the front matter metadata from multiple notes? I have either a list of notes or some search criteria (like tags or keywords) where I want to change the metadata.

Things I have tried

  • Replacing single tags like “#foo with #bar” using grep and sed
  • Renaming fields with grep and sed

What I’m trying to do

  • Add tags
  • Remove specific tags
  • Add a field
  • Update field to a specific value
  • Update field with current time

The Tag Wrangler plugin can rename the tags. It can’t remove them, but if you don’t mind a little hackiness you could rename tags you want to delete to something like “deletedtag”.

Note (because of your example) that you need to leave off the “#” when putting tags in the front matter, because that symbol marks comments in YAML.

I don’t know of a way to bulk change the other fields, but there might be a plugin.