I found that iTerm2 has a Python API that you can use to write some really useful scripts that make running your software projects locally a lot easier.
While you might not be able to prevent accidentally ruining data in production, you can put up roadblocks to reduce the risk. Consider writing custom scripts to avoid making those