Shopify CLI core commands

This reference lists the core commands that you can use with Shopify CLI.

help

Lists the available commands and describes what they do.

You can also use the help command or options to get more detailed information about a specific command:

login

Authenticates you with Shopify CLI.

If you're developing a theme, then you should pass the --store flag to log in to the store that you want to work with. You can log in to only one store at a time. You can log in to a development store or a Shopify store.

You need to have collaborator access to the store, or be a staff member or owner of the store.

To switch between stores that you have access to, use shopify switch.

The --store flag accepts the following inputs:

Type Example
Your store prefix johns-apparel
Your myshopify.com URL johns-apparel.myshopify.com
https://johns-apparel.myshopify.com
Your store admin URL https://johns-apparel.myshopify.com/admin
Your custom domain or custom domain admin https://johnsapparel.com
https://johnsapparel.com/admin

Optional parameters

Parameter Description
--store The store that you want to log in to. This is used when developing a theme.

logout

Logs you out of the Shopify account or Partner account and store.

The logout command clears credentials. You need to reauthenticate the next time that you connect to a store.

populate

Adds example data to your store.

This is useful for testing your app or theme’s behavior. You can create the following types of example store records:

  • Products
  • Customers
  • Draft orders

By default, the populate command adds five records of the requested type.

Parameter Description
products Creates products in your store. Products are created with a title and a price.
customers Creates customers in your store. Customers are created with a name only.
draftorders Creates draft orders in your store. Draft orders are created with one custom item.
--count <NUMBER> Creates the specified number of records.

store

Displays the store that you're currently connected to.

Example output:

switch

Switches between stores without logging out and logging in again.

If you enter this command without a --store flag, then you're prompted to select a store associated with your account.

The --store flag accepts the following inputs:

Type Example
Your store prefix johns-apparel
Your myshopify.com URL johns-apparel.myshopify.com
https://johns-apparel.myshopify.com
Your store admin URL https://johns-apparel.myshopify.com/admin
Your custom domain or custom domain admin https://johnsapparel.com
https://johnsapparel.com/admin

version

Displays the version of Shopify CLI that you're running.

Example output:

config

Configures Shopify CLI options. There are two available options: analytics and feature.

analytics

Configures anonymous usage reporting by enabling or disabling analytics.

feature

Configures active feature sets in the CLI.

This command is used for development and debugging work on the CLI tool itself. Unless you're developing the tool, don't alter this command. Review the Shopify CLI development guide for more information.

whoami

Determines which Partner organization you're logged in to, or which store you're logged in to as a staff member.

Example output:

Next steps