Custom terminal support
I use iTerm2, which is in many ways better than the default Terminal.app that comes with macOS. However, your library seems hardcoded to use the default Terminal.app (according to the source code).
Is it possible for you to look into iTerm2 support? Perhaps this could be generalized to add support for any custom terminal emulator (within reason), but iTerm2 is the most popular alternative AFAIK.
Adding a config file that allows you to do this should be easy enough. The tricky thing will be deciding on a good syntax for specifying how to invoke the terminal emulator to start off with a specific command. Each emulator will have a different way to invoke it, so we need to provide some sort of template syntax, but I don't want to pull in a whole templating library for a little debug hook.
I would definitely be willing to take a PR for this, and may find the time to look into it myself.