cli

Get started

The Shopify CLI is the tool developers use to build apps and storefronts for the Shopify platform. This wiki contains documentation that’s useful for contributors of the project.

Requirements

If you’d like to contribute to this project, the following system dependencies need to be present in the environment.

Set up

Once you have the necessary system dependencies, you can go through the steps below to have your environment setup to work with the project:

  1. Clone the repository: git clone https://github.com/Shopify/cli.git.
  2. Install dependencies: pnpm install

Run against a local project

You can run the CLIs through the following package.json scripts:

All commands support the --path argument, so you can run any command pointing to your app. For example, pnpm shopify app build --path /path/to/project

Create a new app from scratch

If you want to quickly test creating an app from scratch, you can run bin/create-test-app.js. It will:

You can also pass these optional flags:

If you want to interact with it, you can cd into the directory and run the CLI through the scripts in the package.json:

Command PNPM
shopify pnpm shopify
build pnpm build
dev pnpm dev
test pnpm test
generate pnpm generate

Create a new theme from scratch

If you want to quickly test creating a theme from scratch, you can run bin/create-test-theme.js -s YOUR_STORE. It will:

You can also pass these optional flags:

More automation

Besides the scripts for building and running the CLIs, there are others that might come handy when adding code to the project:

All the packages in the repository contain the above scripts so they can be executed too for an individual package.