Download and install API2HTML in any Mac, Linux or container.


The first thing you need to do is to download or clone the source code of API2HTML.

Download or clone

Compilation requirements

API2HTML is a self-contained binary with no external dependencies. Nevertheless, in order to generate the binary you will need:


Once you have the source code, you need to compile it from the terminal. Just cd the directory you have cloned or downloaded and execute:

make prepare

The previous command will download and prepare everything that is necessary. When it finishes execute the following command to build a binary for your platform:


Now you should have the binary api2html in the same folder.

You can move this file to /usr/local/bin or $GOPATH/bin or add it in any other place that is included in your $PATH.

mv api2html /usr/local/bin

You can delete everything else you have downloaded as it was only needed to generate the binary, but if this is your first time using the program we recommend you to keep the examples folder so you can play with them.

Verify the installation

If your installation is correct you should be able to execute the binary and see the help:

$ api2html

  api2html [command]

Available Commands:
  generate    Generate the final api2html templates.
  help        Help about any command
  serve       Run the api2html server.

  -h, --help   help for api2html

Use "api2html [command] --help" for more information about a command.

If you get an error that api2html could not be found, check that your PATH variable contains the folder where the binary is.

Continue to Running the server

← Back to Overview