MESA Docs
MESA Homepage
  • Welcome to MESA
    • Installing MESA
    • Dashboard
    • Core Concepts
    • Getting Help
  • Templates
    • Template Library
    • Installing & Editing
  • Workflow Builder
    • Triggers
    • Actions
    • Fields
      • Variables
      • Formatting Variables
      • Liquid Templating
    • Testing
  • Workflow Activity
    • Tasks
      • Troubleshooting
      • Replay
    • Logs
    • Time Travel
  • Best Practices
    • Set Titles & Descriptions
    • Track Time Saved
    • Enable Failure Notifications
    • Avoid Infinite Loops
  • Going Further
    • Plans & Billing
    • Notifications
    • Credentials
    • Understanding the Queue
    • Export & Import Workflows
    • Platform Thresholds & Limits
  • Built-in Tools
    • Activity Log
    • AI
    • API
    • Approval
    • MCP
    • Custom Code
      • Libraries
        • MESA SDK
        • Filter
        • Loop
        • Transform
        • oAuth
        • Shopify
        • ShopifyGraphql
      • FAQ
    • Data
    • Delay
    • Email
    • Filter
    • Form
      • Configure
      • Going Further
      • Technical Notes
    • FTP
    • Image
    • Loop
    • Package Tracking
    • Paths
    • Schedule
    • Scraper
    • SMS
    • Transform
    • Virtual Output
    • Weather
    • Web Request
    • Webhook
  • Apps
    • Airtable
    • Amazon S3
    • Asana
    • Blog Studio
    • ChannelApe
    • Claude
    • ChatGPT
    • Dall-E 2
    • Delighted
    • Digital Humani
    • Discord
    • DocuSign
    • Dropbox
    • Etsy
    • Facebook
    • Fera.ai
    • Gatsby
    • Gmail
      • Send Email
    • Google Analytics 4
    • Google Analytics UA
    • Google Calendar
    • Google Drive
    • Google Forms
    • Google Sheets
      • Add Row
      • Query Rows
      • Update Row
      • Row Created
      • Row Updated (Advanced)
      • Creating New Spreadsheets
      • Technical Notes
    • Gorgias
    • Govalo
    • Help Scout
    • Hubspot
    • Infinite Options
    • Intercom
    • IPDetective
    • Judge.me
    • Katana
    • Klaviyo
      • API Deprecation
    • Loop Returns
    • Loyalty Lion
    • Mailchimp
    • Mailgun
    • Mandrill
    • Mantle
    • Notion
    • Odoo
    • Omnisend
    • Page Studio
    • Pinterest
    • Printful
    • PrintNode
    • QuickBooks
    • Rebuy
    • Recharge
    • Remove.bg
    • Returnly
    • Rivo
    • Salesforce
    • Segment
    • Sendlane
    • Shippo
    • ShipStation
    • Shopify
      • Technical Notes
        • Configuring Your Payload
        • Modifying and Filtering Get Lists
        • Parameters
        • Error Codes
        • Accuracy of orders_count Variable
        • Accuracy of Count Products Action
        • Using the Gift Cards API
        • How to Find a Specific Record in the Testing Interface
        • Order, Customer, and Product Updated Trigger Frequency
    • Shopify Flow
    • Shopify Plus
    • Shopify Retail POS
    • Skio Subscriptions
    • Slack
    • Smartrr
    • Smile.io
    • Square
      • Updating Inventory
      • Frequently Asked Questions
    • Stamped.io
    • Stripe
    • Thanks.io
    • TikTok
    • Tracktor
    • Twilio
    • Uploadery
    • Wonderment
    • Xero
    • Yotpo
    • Yotpo Loyalty
  • For developers
    • Admin API
    • Command Line Interface
    • Embedding templates
  • Frequently asked questions
    • Why isn't the log search returning logs with the search I entered?
    • Is it possible to handle errors or retry steps?
    • How do I handle a failed task?
    • Does MESA auto-save workflows?
    • Can I Use Apps That Don't Have a MESA Connector?
    • Why is my workflow action adding the same data each time it occurs?
    • How do I cancel automations that are already in progress?
    • How do I cancel my MESA subscription or 7-day trial?
    • Can you import code from npm in custom code?
    • Do you have a Slack Community?
Powered by GitBook
On this page
  • Commands
  • Installing
  • Upgrading
  • Configuring sites
  • Specifying environments
  • Editing Automations
  • Local development

Was this helpful?

  1. For developers

Command Line Interface

Manage automations, scripts, run tests, view logs, download, watch, publish and more from the command line.

Commands

Type mesa to get a list of available commands:

mesa export
mesa push [params]
mesa pull [params]
mesa watch
mesa install [version]
mesa test
mesa replay 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

Upgrading

To upgrade to the latest version

yarn global upgrade mesa-cli@latest

Configuring sites

Create a new directory with a config.yml file:

uuid: mystoreuuid
key: J0lSB0PIuw145xhk610Ud6dLA7A****B7LnfUjaL

The config.yml file can be in your current working directory, or in ~/.mesa/config.yml so you can run mesa from any working directory.

uuid is your myshopify.com subdomain: UUID.myshopify.com key is your site's MESA Key from the bottom of the Reports tab of the MESA Dashboard . Optional parameter: api_url.

Specifying environments

  • Delete your global ~/.mesa/config.yml file

  • Save configuration files in ~/.mesa/config. For example: ~/.mesa/config/mystoreuuid.yml

  • 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

Editing Automations

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

 mesa export <automationkey>

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:

Specific path(s) to files: tracktor/in-webhook.js tracktor/out-webhook.js

Or for multiple files: tracktor/*

Local development

To clone mesa-cli locally and install it globally:

git clone git@github.com:shoppad/mesa-cli.git
cd mesa-cli
yarn link
PreviousAdmin APINextEmbedding templates

Last updated 1 year ago

Was this helpful?

Full details on usage