How to merge tags in bulk?

Hi guys, is there a way to merge two similar tags together? I have many articles to go through and clean up so I’d prefer to do that automatically. Google gave me like 0 results on this and couldn’t find anything in the API docs as well. Can I at least mass update posts via the API? Probably have to do it on Database Level?

If you’re comfortable on the command line, we have gctools. It provides a way to combine tags: