Skip to main content

Mason CLI

The Mason Platform CLI helps you manage your production devices. Using the CLI, you can do the following, and more!

  • 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

Installation

View installation instructions below based on your operating system and desired CLI version. The CLI supports all platform operations and has X-Ray support for devices running Mason OS 6.0.5 or later. The Legacy X-Ray CLI supports X-Ray functionality for devices running Mason OS 6.0.4 or earlier.

  1. Before you begin installing the Mason CLI, verify that you do not have a previous version of the Mason CLI installed.

    To open powershell, press Ctrl + L, then type powershell and press enter

    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 CLI

    Invoke-WebRequest -Uri https://gitlab.com/api/v4/projects/38097768/packages/generic/cli-releases/latest/mason-cli-windows -OutFile mason.exe
  3. 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

Configure with an API key

All commands in the Mason CLI require a permissioned API key. This guide will show you how to supply an API key to the Mason CLI.

Prerequisites

  • Install the Mason CLI
  • Create an API key

Configuration

There are two ways you can configure an API key with the Mason CLI. The following options are checked on every Mason CLI command execution in the order they are listed.

  1. Supply your API key on every command execution

    mason --api-key [APIKEY] ...
  2. Supply your API key through an environment variable

    $Env:MASON_API_KEY = “<apikey>”