CLI

Learn about the GoHT CLI tool and how to use it to generate Go from GoHT templates.

To install the GoHT CLI tool, you will use the following command:

$ go install github.com/stackus/goht/cmd/goht@latest

To test the installation, you can run the following command:

$ goht -v

If you see the version number of the installed GoHT CLI tool, then you’re good to go!

Help

To get help with the GoHT CLI tool, you can run the following command:

$ goht -h

Shell Completion

The GoHT CLI tool supports shell completion for bash, zsh, fish, and powershell. To install the shell completion, you can run the following command:

$ goht completion <shell>

Where <shell> is the shell you are using. For example, to install the completion for bash, you would run the following command:

$ goht completion bash