Skip to content

Latest commit

 

History

History
154 lines (103 loc) · 4.8 KB

20_setup.md

File metadata and controls

154 lines (103 loc) · 4.8 KB

Setup

Installation

vab can be installed in different ways, you can choose the one that better fits your needs and the operating system you are using:

Linux and MacOs

Homebrew

If you have Homebrew installed on your system vab is only a command away:

brew install mia-platform/tap/vab

Go

If you have Golang installed with a version >= 1.13 in your system and you have the $GOPATHenv set, you can install vab like this:

go install github.com/mia-platform/[email protected]

Or like this if the install command is not available

go get -u github.com/mia-platform/[email protected]

Binary Download

You can install vab with the use of curl or wget and downloading the latest packages available on GitHub choosing the correct platform and operating system:

curl -fsSL --proto '=https' --tlsv1.2 https://github.com/mia-platform/vab/releases/download/v0.12.0/vab-linux-amd64 -o /tmp/vab
wget -q --https-only --secure-protocol=TLSv1_2 https://github.com/mia-platform/vab/releases/download/v0.12.0/vab-linux-amd64 -O /tmp/vab

After you have downloaded the file you can validate it against the checksum you can find at this url running the command:

sha256sum /tmp/vab

After you have validated that the downloaded file is correct, move the binary in your /usr/local/bin folder

sudo install -g root -o root /tmp/vab /usr/local/bin

Docker

If you want to run the cli in its environment or you want to test the cli you can use the Docker image:

docker run ghcr.io/mia-platform/vab:0.10.1

Windows

vab is not directly compatible with Windows, even if you have Go installed compilation on this OS is not possible due to current technical restrictions.

However, it is still possible to use vab with Windows Subsystem for Linux (WSL), as explained here below.

Installation of WSL

If you don't have WSL on your system, follow the official guide to get it.

Once WSL is installed, to open a Linux bash terminal, press Start+R, enter bash in the text box and press OK.

Install vab

You can now install vab with any of the methods explained above for Linux, we suggest the binary installation since it's the most straightforward.

Shell Autocompletion

If you have choosen to use an installation method different from the brew one, you will have to setup the commands autocompletion for your shell following one of these guides:

When you update the command remember to relaunch the command for your shell to update the completion definition and get the latest command and/or flags that has been added.

bash

The bash autocompletion needs the bash-completion package installed on your system.

Warning: for working correctly you need the bash-completion V2 that is compatible only with Bash 4.1+, please be sure to have the correct versions installed on your system before running the command.

vab completion bash >/usr/local/etc/bash_completion.d/vab

After done this you must restart your shell environment or launch exec bash for reloading the configurations and enable the autocompletion.

zsh

For setting up the zsh completion, you must enable it. You can use the following command:

echo "autoload -U compinit; compinit" >> ~/.zshrc

Or use something like oh-my-zsh that will enable it by default. Once you have done it you can launch the following command to create the file needed by zsh:

vab completion zsh > /usr/local/share/zsh/site-functions/_vab

After done this you must restart your shell environment or launch exec zsh for reloading the configurations and enable the autocompletion.

fish

To enable the autocompletion in fish you have to run this command:

vab completion fish > ~/.config/fish/completions/vab.fish

After done this you must restart your shell environment or launch exec fish for reloading the configurations and enable the autocompletion.