Shopify is a cloud-based commercial platform allowing you to easily build online stores. For a long time Buddy has enforced web developers in their job with bulding, testing, and deploying themes to Shopify stores. This week we deliver a new functionality that expands the scope of automation even further: the Shopify Theme Kit CLI.

What is Shopify Theme Kit CLI

In short, the tool lets you run operations such as creating new themes or uploading/downloading changes in the context of Shopify themes directly from your terminal. The action can be found in the DevOps section of the action roster:

Shopify Theme Kit CLI in the action rosterShopify Theme Kit CLI in the action roster

The full list of Theme Kit's functionalities is available here.

Integration is very simple – just provide the URL to your shop and log in to your Shopify account (in case your browser session has expired):

Shopify integrationShopify integration

Example use case: Backing up themes before deployment

Here's an example deployment pipeline in Buddy:

  1. Run Gulp script
  2. Deploy theme to Shopify store
  3. Send notification of successful update (or compilation errors)

Example Shopify pipelineExample Shopify pipeline

Let's add the Shopify Theme Kit CLI action that will run theme download in the previously created folder:

mkdir archive/$BUDDY_EXECUTION_ID
cd archive/$BUDDY_EXECUTION_ID
theme download

Shopify Theme Kit CLI action detailsShopify Theme Kit CLI action details

The whole pipeline will now look like this:

Shopify backup & deploy pipelineShopify backup & deploy pipeline

As a result, every subsequent execution will back up the theme in the selected folder of Buddy's filesystem.

A cool feature of Buddy is that you can easily expand pipelines with extra features without disrupting your workflow. For example, you can ZIP the your themes and upload to the selected backup server like FTP or AWS S3.

Expanded backup pipelineExpanded backup pipeline

Buddy is 100% customer driven. If there’s a feature or integration you miss, let us know in the comments below or directly at support@buddy.works.