add flags to select port to listen on, command to run through a shell

Should behave the same by default.

Thanks for reviewing it!