Install the Meya CLI

Installing the Meya command line interface

Meya CLI is a suite of tools for managing your Meya app from the command line.

520

Mac dependencies

Install Brew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

Install Python3 and libgit2 using brew

brew install python@3 libgit2

Windows dependencies

Install Chocolatey

Make sure Python user Scripts folder is in PATH (python -m site --user-base)

Install Python3 using choco

choco install python3

Install

There are two methods to setup your local development environment:

  • Method 1: Global Python environment
  • Method 2: Using a virtual environment (recommended)

1. Get your Meya auth token

While logged in to the Meya Console, click your profile image in the top right corner and select Profile. Click the Copy button next to the auth token.

620

Copy your Meya auth token.

2. Install Meya CLI and clone your app

Method 1: Global Python environment

This will clone a bot into a subdirectory relative to your current path using global Python interpreter.

MEYA_AUTH_TOKEN=xxx
GRID_URL=https://grid.meya.ai
APP_ID=app-xxx

pip3 install --upgrade \
    --extra-index-url https://meya:[email protected]/registry/pypi \
    "pygit2>=1.2.1" \
    "meya-sdk>=2.0.0" \
    "meya-cli>=2.0.0"
# [optional] auth only required once per system
meya auth add \
  --grid-url $GRID_URL \
  --auth-token $MEYA_AUTH_TOKEN
meya clone \
  --grid-url $GRID_URL \
  --app-id $APP_ID

Method 2: Using a virtual environment

This will clone a bot into your existing directory using venv.

MEYA_AUTH_TOKEN=xxx
GRID_URL=https://grid.meya.ai
APP_ID=app-xxx
DIR_NAME=app-name

mkdir $DIR_NAME && cd $DIR_NAME || exit
python3 -m venv venv
. venv/bin/activate
pip3 install --upgrade \
    --extra-index-url https://meya:[email protected]/registry/pypi \
    "pygit2>=1.2.1" \
    "meya-sdk>=2.0.0" \
    "meya-cli>=2.0.0"
# [optional] auth only required once per system
meya auth add \
  --grid-url $GRID_URL \
  --auth-token $MEYA_AUTH_TOKEN
meya clone \
  --grid-url $GRID_URL \
  --app-id $APP_ID \
  --directory temp \
  && cp -a temp/. . && rm -rf temp

Copy secrets and push

ACCOUNT_ID=acct-xxx
APP_NAME="app-name [username]"

meya vault download --file vault.secret.yaml
meya connect new \
  --app-name=$APP_NAME \
  --account-id=$ACCOUNT_ID \
  --grid-url $GRID_URL
meya vault upload --file vault.secret.yaml
meya push --force --build-image

Walk-through videos

Global installation
Virtual environment installation