Installing the Mason CLI
The Mason Platform CLI helps you manage your production devices. Using the CLI, you can
- Update your projects with new Mason OS configurations
- Push apps to your projects directly without making a new Mason OS config
- Use our X-Ray features to debug issues in the field
- etc...
This guide will get you up and running with the Mason Platform CLI.
Depending on your platform, steps may vary
Windows installation steps
-
Before you begin installing the Mason CLI, verify that you do not have a previous version of the Mason CLI installed
where mason
The output given from running the command
where mason
should be empty. If you are given a filepath, you have a version of the Mason CLI installed and should remove it before continuing with the installation. -
Download the official Mason CLI binary for windows.
-
In Explorer, open the folder where
mason.exe
was downloaded to -
Still in Explorer, press
Ctrl + L
, then typecmd
and pressenter
-
In the Command Prompt window that opened, type
mason.exe -V
to ensure the version you downloaded matches what you see:
$ mason.exe -V
Mason CLI vX.X # Where X.X is the version you downloaded
Linux / macOS steps
-
Before you begin installing the Mason CLI, verify that you do not have a previous version of the Mason CLI installed
which mason
The output given from running the command
which mason
should be empty. If you are given a filepath, you have a version of the Mason CLI installed and should remove it before continuing with the installation. -
Open a terminal and download the CLI
- Linux
curl -LO $(curl -s https://api.github.com/repos/MasonAmerica/mason-cli/releases/latest | grep "browser_download_url.*linux\"" | cut -d '"' -f 4)
- macOS (Catalina)
curl -LO $(curl -s https://api.github.com/repos/MasonAmerica/mason-cli/releases/latest | grep "browser_download_url.*mason-macos.tar.gz\"" | cut -d '"' -f 4)
- macOS
curl -LO $(curl -s https://api.github.com/repos/MasonAmerica/mason-cli/releases/latest | grep "browser_download_url.*macos\"" | cut -d '"' -f 4)
-
Add the CLI to your bin directory
- Linux
mkdir -p ~/.local/bin && mv mason-linux $_/mason && chmod +x $_
- macOS (Catalina)
sudo mkdir -p /usr/local/bin /usr/local/opt && sudo tar xzf mason-macos.tar.gz -C /usr/local/opt/ && sudo ln -sf /usr/local/opt/mason/mason /usr/local/bin/mason
- macOS
sudo mkdir -p /usr/local/bin && sudo mv mason-macos $_/mason && chmod +x $_
-
Run
mason -V
to ensure the version you downloaded matches what you see:
$ mason -V
Mason CLI vX.X # Where X.X is the version you downloaded