Setup
Installation
miactl
can be installed in different ways, you can choose to one that better fits your needs:
Homebrew
If you have Homebrew installed on your system miactl
is only a command away:
brew install mia-platform/tap/miactl
Go
If you have Golang installed with a version >= 1.13 in your system and you have the $GOPATH
env set, you can
install miactl
like this:
go install github.com/mia-platform/miactl@0.4.0
Or like this if the install
command is not available
go get -u github.com/mia-platform/miactl@0.4.0
Binary Download
You can install miactl
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/miactl/releases/download/v0.4.0/miactl-linux-amd64 -o /tmp/miactl
wget -q https://github.com/mia-platform/miactl/releases/download/v0.4.0/miactl-linux-amd64 -O /tmp/miactl
After you have downloaded the file you can validate it against the checksum you can find at this url running the command:
sha256sum /tmp/miactl
After you have validated that the downloaded file is correct, move the binary in your /usr/local/bin
folder
chmod +x /tmp/miactl
mv /tmp/miactl /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 ghr.io/mia-platform/miactl@0.4.0 miactl
Shell Autocompletion
Once you have installed the cli in your system you can setup the commands completion for one of this shells:
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.
miactl completion bash >/usr/local/etc/bash_completion.d/miactl
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
:
miactl completion zsh > /usr/local/share/zsh/site-functions/_miactl
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:
miactl completion fish > ~/.config/fish/completions/miactl.fish
After done this you must restart your shell environment or launch exec fish
for reloading the configurations and
enable the autocompletion.