Mesa CLI

Command-line interface to manage automations and scripts, run tests, view logs and moredownload, watch and publish.

Commands

Type mesa to get a list of available commands:

mesa export <automation_key>
mesa push [params] <files>
mesa pull [params] <files>
mesa watch
mesa install <template> [version]
mesa test <automation_key> <input_output_key>
mesa replay <task_id>
mesa logs [-v] [-n 50]

Optional Parameters:
  -e, --env [value] : Environment to use (filename in `./config/`).
  -a, --automation [value] : Automation key. Automatically determined by the mesa.json file if not specified.
  -f, --force : Force, overwrite config for inputs/outputs/storage.
  -n, --number [value] : Number.
  -v, --verbose : Verbose: Show log metadata.

Installing

With yarn

yarn global add mesa-cli

Or with NPM

npm install -g mesa-cli

Configuring sites

Create a new directory with a config.yml file:

uuid: mystoreuuid
key: J0lSB0PIuw145xhk610Ud6dLA7A****B7LnfUjaL

Specifying environments

  1. Save configuration files in ./config. For example: ./config/mystoreuuid.yml
  2. Pass the environment with the --env or -e flags, or by setting the ENV envvar:
    mesa watch --env mystoreuuid
    mesa watch -e mystoreuuid
    ENV=mystoreuuid mesa watch
    export ENV=mystoreuuid && mesa watch
    

    Full details on usage

Editing Automations

To get started, export an automation to download the scripts and configuration into the current directory:

mesa export <automation_key>

Then use the utility functions to keep your local code in sync with Mesa:

mesa watch <...files>
mesa push <...files>
mesa pull <...files>

<...files> can be:

Local development

To clone mesa-cli locally and install it globally:

git@github.com:shoppad/mesa-cli.git
cd mesa-cli
yarn link