Mason Docs

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

  1. 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.

  2. Download the official Mason CLI binary for windows.

  3. In Explorer, open the folder where mason.exe was downloaded to

  4. Still in Explorer, press Ctrl + L, then type cmd and press enter

  5. 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

  1. 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.

  2. 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)
    
  3. 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 $_
    
  4. 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

Next steps