Keyboard shortcuts

Press or to navigate between chapters

Press ? to show this help

Press Esc to hide this help

Installation guide

This project does not produce pre-built binaries in order to give you complete control when building and installing the application. The installation process is pretty simple and the guide below provides step-by-step instructions to help you out.

Build requirements

  • go: A minimum version of Go 1.25.4 is required for building enbas. Visit https://go.dev/dl/ to download the latest version.
  • mage: Mage is a build tool similar to make. The project includes mage targets for building the binary, the man pages and the example configuration file. Visit https://magefile.org/ for instructions on how to install mage.
  • git (optional): Git is used to calculate the binary version and commit reference. This is optional as these values can be set manually via environment variables.

Obtain the source code

You can obtain the source code by cloning the repository or downloading the source code.

Clone the repository

You can clone the repository from Codeberg or Code Flow.

  • from Codeberg

    git clone https://codeberg.org/dananglin/enbas.git
    cd enbas
    
  • or from Code Flow

    git clone https://codeflow.dananglin.me.uk/apollo/enbas.git
    cd enbas
    

Download the source code

You can download the source code from Codeberg or Code Flow.

  • from Codeberg

    curl -sL https://codeberg.org/dananglin/enbas/archive/main.tar.gz -o enbas-main.tar.gz
    tar xzvf enbas-main.tar.gz
    cd enbas
    
  • or from Code Flow

    curl -sL https://codeflow.dananglin.me.uk/apollo/enbas/archive/main.tar.gz -o enbas-main.tar.gz
    tar xzvf enbas-main.tar.gz
    cd enbas
    

Build

Build the binary and the manual using the following commands.

mage build
mage docs:manual

If you’ve obtained the source code by downloading the TAR archive and you want enbas to display the correct build information, you’ll need to set the environment variables to specify the version and commit reference.

# example
export ENBAS_APP_VERSION="v0.3.0"
export ENBAS_APP_COMMIT_REF="8abfe5e9d32fe1a07c4d6907b64ca3eb34489bec"
mage build
mage docs:manual

Once the build is successfully you should see the __build directory containing the binary, the man pages and the example configuration file.

$ tree __build/
__build/
├── bin
│   └── enbas
└── share
    ├── doc
    │   └── enbas
    │       └── examples
    │           └── config.json
    └── man
        ├── man1
        │   └── enbas.1
        ├── man5
        │   └── enbas.5
        └── man7
            └── enbas-topics.7

10 directories, 5 files

Install

You can install enbas system-wide or locally in your home directory.

System-wide installation

The below set of commands assumes that you want to install the binary within the /usr/local directory. Don’t forget to use sudo if installing to /usr/local requires escalated privileges.

# install the binary
install --mode 0755 __build/bin/enbas /usr/local/bin

# install the man pages
install -D --mode 0644 __build/share/man/man1/enbas.1 /usr/local/share/man/man1/enbas.1
install -D --mode 0644 __build/share/man/man5/enbas.5 /usr/local/share/man/man5/enbas.5
install -D --mode 0644 __build/share/man/man7/enbas-topics.7 /usr/local/share/man/man7/enbas-topics.7

# install the example configuration file
install -D --mode 0644 __build/share/doc/enbas/examples/config.json /usr/local/share/doc/enbas/examples/config.json

Local installation

The below set of commands assumes that you want to install the binary within the ${HOME}/.local directory.

# install the binary
install --mode 0700 __build/bin/enbas ${HOME}/.local/bin

# install the man pages
install -D --mode 0600 __build/share/man/man1/enbas.1 ${HOME}/.local/share/man/man1/enbas.1
install -D --mode 0600 __build/share/man/man5/enbas.5 ${HOME}/.local/share/man/man5/enbas.5
install -D --mode 0600 __build/share/man/man7/enbas-topics.7 ${HOME}/share/man/man7/enbas-topics.7

# install the example configuration file
install -D --mode 0600 __build/share/doc/enbas/examples/config.json ${HOME}/.local/share/doc/enbas/examples/config.json

Verify

Run enbas from your terminal to verify that the installation was successful. You should see the usage documentation.

You can also view the application’s build information by running enbas version.