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

Using a development instance and switching between development and production

Kevin O'Sullivan edited this page Jun 28, 2021 · 8 revisions

Developing Shopify CLI often requires having multiple instances of the tool installed for testing purposes. Developers can clone the repository to set up a testing environment:

# Change to a directory where you want your instance
$ cd /path/to/instance

# Clone the repo for development purposes
$ git clone [email protected]:Shopify/shopify-cli.git

And run the local version of the Shopify App CLI:

# Run the local version by running the CLI binary directly
$ cd shopify-cli
$ ./bin/shopify help

To make running the development version of the CLI easier, you can add an alias for it to your shell profile, for example:

alias shopify-dev='/path/to/instance/shopify-cli/bin/shopify'

Using a local copy of Partners Dashboard

The local partners dashboard can be used but you will need to run identity and partners, and make sure that it has an account setup on it. Then you can run Shopify commands prefixed with SHOPIFY_APP_CLI_LOCAL_PARTNERS=1 to switch the API calls to be local.

$ SHOPIFY_APP_CLI_LOCAL_PARTNERS=1 shopify node create

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