These are just some commands I use to manage and set up dev and test environments. A lot of the code is borrowed from https://github.com/quafzi/magento-anonymizer . Thanks quafzi!
Aweseome that you took a look at the code before using it. And yes, the MySQL queries are raw. But I really don't want to trigger anything in magento in this case. I just want to clear the data. So I figured it's ok to use raw queries. If you dissagree, pull requests are welcome.