Yes , Golang code can be run using your typescript code. You can write your Golang code then use Cobra to enable it to act on custom CLI commands. then you just need to execute those commands within your typescript code.