Skip to main content
Version: 13.x (Current)

Setup

Installation

mlp 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 mlp is only a command away:

brew install mia-platform/tap/mlp

This method will also automatically setup the shell completions for bash, zsh and fish.

Go

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

go install github.com/mia-platform/mlp@vv2.0.0-beta

Or like this if the install command is not available

go get -u github.com/mia-platform/mlp@vv2.0.0-beta

Binary Download

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

curl -fsSL https://github.com/mia-platform/mlp/releases/download/vv2.0.0-beta/mlp-linux-amd64 -o /tmp/mlp
wget -q https://github.com/mia-platform/mlp/releases/download/vv2.0.0-beta/mlp-linux-amd64 -O /tmp/mlp

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

sha256sum /tmp/mlp

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/mlp /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/mlp:vv2.0.0-beta

Windows

mlp 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 mlp 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 mlp

You can now install mlp 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 chosen 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.

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

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:

mlp completion zsh > /usr/local/share/zsh/site-functions/_mlp

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:

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

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