Install a CLI program that I created

87 Views Asked by At

I created a Cobra CLI application, and after releasing it with Go releaser. What I am trying to do is be able to download it and then have it be able to run locally from the binary. So what I would like is to do is:

  1. click the binary
  2. install it locally
  3. enter my terminal
  4. enter $ my-cli <SOME_COMMAND> -<SOME_FLAG> and run the project accordingly

I've been trying to find the appropriate docs for how to do something like this. What happens now is I try to open it, then the application runs the rootCmd.Execute() and then the terminal tab closes abruptly.

is there some resource that I could read that talks about this?

0

There are 0 best solutions below