Code Companion
The Meya CLI Code Companion
The code companion provides a number of useful tools to complement your favourite code editing tools.
Meya CLI is available on the Universal plan.
Test chat
The test chat allows you to test your bot as it will appear to users. If you use the meya-cli watch
command, your updates will be immediately reflected in the test chat.
Log window
Detailed logs appear in this window. These are similar to what you would see in the Logs panel of your bot dashboard, but are specifically for events in the Test Chat window. Logs for non-Test Chat events can be found in the Logs panel of the bot dashboard.
Search/filter
You can search and filter the logs using the same parameters available in the Logs panel of your bot dashboard, including user
, type
, status
, and startDate
and endDate
.
You can also search the context of the message for specific words or phrases. This makes it easy to locate a specific interaction a user had with the bot, for example.
Symbology
The symbols on the left side offer a quick way to indicate what the log message relates to. In addition, the colour of the message indicates if the log type is info
(blue), warning
(yellow), or error
(red).
Type
For a full list of log message types, see Log Event Types.
Context
Note the blue ellipses on the right side of the window indicate more context/details are available by clickin this symbol.
Snippets
Snippets are portions of BFML or Python code you can use to speed up your bot development.
Have an idea for a snippet?
The snippets Github repo is public, and we encourage you to submit pull requests for snippets you think the community might find helpful. For more details on how to do so, please see the section below How to Create a Snippet.
Search
You can filter the code snippets by name.
Folder structure
You can also manually search the snippets by exploring the folders.
CMS contains a basic CMS file. A CMS file represents one CMS space
. Copy and paste the single entry in the snippet as many times as you want to add more content to the space
.
Components (BFML) contains all built-in components in their BFML (Bot Flow Markup Language) syntax.
Components (Python) contains all components that can be created from within a custom Python component.
Examples are further sub-divided into examples that include entire flows, custom Python components, and complete bots. The folder and file names indicate the intended use case; you can name these files whatever you want.
More to come...
The snippets are updated whenever new content is pulled into the public Github repo. Watch for more examples to be added over time.
Templates includes the most basic building blocks: an empty CMS file, an empty Python component, and an empty flow.
Triggers describe all the various triggers available to launch flows.
Triggers are optional
Triggers allow the user to launch a flow using some action or input, but you'll likely have some flows you don't want the user to launch directly. Any flow can be launched from another flow using the
meya.start_flow
component, or by using nested flows.
Code
The code snippet is located at the top of each snippet file. The Copy to Clipboard button in the top right makes it simple to copy/paste code into your code editor.
Documentation
Each code snippet or example contains documentation about the code works, including any properties that can be set, and any data that will be returned. This prevents the need to have a separate window open just for documentation.
Examples
Some more complex examples require you to create an entire flows and custom components. All of the code for these more complex snippets will be contained in a folder describing the use case.
A detailed explanation of how the flows and components work will be contained in the documentation for one of the files.
Meya CLI install instructions
The See meya-cli install instructions
button opens a modal window containing your auth token and instructions for how to install Meya CLI in your local development environment.
Updated almost 4 years ago