Combine the power of the Meya platform with your favourite code editing, source control, and CD/CI tools.

📘

Meya CLI is available on the Universal plan.

Installation

The recommended approach is to create a virtual environment for each bot and install Meya CLI inside the virtual environment, but you can also install Meya CLI globally. Both approaches are described below.

Using virtualenv (recommended)

Use pip to install Meya CLI.

mkdir my-bot
cd my-bot
virtualenv env
. env/bin/activate
pip install meya
meya-cli init AUTH_TOKEN BOT_ID https://api.meya.ai/
meya-cli watch

Global install

Using this method you only need to install Meya CLI once.

pip install meya

For each bot, create a new local folder and create a link to your bot using meya-cli init.

mkdir my-bot
cd my-bot
meya-cli init AUTH_TOKEN BOT_ID https://api.meya.ai/
meya-cli watch

Bot protection

You can protect your bot by going to the bot's Settings page and enabling Bot is protected.

Protection disables programmatic modifications to your bot through Meya CLI. In general, you'll want to have this enabled for your production bot.

774

Bot protection checkbox.

A good process is to have your production bot only sync code from the Github repo's master branch. Developers using Meya CLI should use other bots synced to feature branches. Once the feature is complete, they issue a pull request. The production bot can be set to auto-sync when new code is merged into master, or by manually pulling.


What’s Next

For more about Meya CLI, see the pages below.