Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Using a development instance and switching between development and production

Luke Andrews edited this page Apr 29, 2020 · 8 revisions

Developing Shopify App CLI often requires having multiple instances of the tool installed for testing purposes. There are two commands that give developers greater control over their Shopify App CLI environment:

Load a development instance

# Clone the repo for development purposes
$ git clone [email protected]:Shopify/shopify-app-cli.git
# Configure the CLI to use your development instance
$ shopify load-dev `/path/to/instance`

The load-dev command loads the version of Shopify App CLI specified between the backticks.

Reload the production instance

$ shopify load-system

The load-system command resets the CLI to use the production instance.

VM testing

A Vagrantfile is provided with some images for testing cross-platform. For more information see the Vagrant docs. Here's how to test the install script on Ubuntu.

$ vagrant up ubuntu
$ vagrant ssh ubuntu
vagrant$ cd /vagrant
vagrant$ eval "$(cat install.sh)"

Ruby console

You can run rake console inside this repo to interact with the CLI's ruby API inside of an irb console.

rake console
irb(main):001:0> ShopifyCli::ROOT
=> "/Users/me/src/github.com/Shopify/shopify-cli"
Clone this wiki locally