Getting started with Shopify App CLI

Shopify App CLI helps you build Shopify apps. It quickly generates Node.js and Ruby on Rails apps and automates many common development tasks.

How it works

In Shopify App CLI, scaffolded directories of code are called projects.

There are two types of app projects that can be created and managed with the CLI:

Each project type creates a Shopify app with similar features. However, the development experiences are different because of their different programming languages and frameworks.

1. Create a new project

Run shopify create to scaffold a new Node.js app or Rails app in a subdirectory. This command also creates your app in the Partner Dashboard.

2. Start a local development server

After your app is created, you can work with it immediately by running shopify serve to start a local development server. Shopify App CLI uses ngrok to create a tunnel. ngrok chooses a unique URL for your app.

Terminal
$ shopify serve
✓ ngrok tunnel running at https://example.ngrok.io
✓ writing .env file...

3. Install your app on your development store

With the server running, open a new terminal window and run the following command to open your app in your browser and install it on a development store.

Terminal
$ shopify open

4. Populate test data

Shopify App CLI helps with the process of adding example data (such as products, customers, or draft orders) to test your app's behavior.

To populate test data, run the following command:

Terminal
$ shopify populate

5. Deploy your app

Using Shopify App CLI, you can deploy your app to an external platform. Currently, the only available platform is Heroku. To deploy your app, run the following command:

Terminal
$ shopify deploy

Next steps

Read the complete reference documentation of the commands available inside different project types. Core commands are always available. Project-specific commands are context-dependent.