You want to write a command that can open a new terminal window and then automatically run a command.
The simplest way to do this on a mac is to use the
osascript command to launch a new terminal window and then run a command.
For example, the simple script below will open a new terminal window and then echo ‘Hello, World!’ to the console.
osascript -e 'tell app "Terminal" do script "echo Hello, World!" activate end tell'