mcpField
S
Shopify CLI

Shopify CLI

Official
shopify.devDeveloper Tools765shopifyUpdated today
RepositoryVisit website

About Shopify CLI

Shopify CLI provides an integrated development environment for building Shopify apps and themes. It supports local development servers, live previews, custom extension development, and deployment workflows.

Key features

  1. 01Initialize and run local development servers for Shopify apps and themes
  2. 02Preview apps and themes in a Shopify development store
  3. 03Develop and deploy custom App Extensions such as checkout UI and admin extensions

Use cases

  1. 01Quickly scaffold new Shopify app or theme projects
  2. 02Preview and test custom commerce features before deployment
  3. 03Streamline app updates through automated deployment workflows

Install

Pick your OS or package manager and run the command in a terminal.

$
npm install -g @shopify/cli@latest

Once installed, runshopify --versionto confirm it works.

Example commands

Common commands in the order you’d use them.

01
shopify app init
02
shopify app dev
03
shopify app deploy

Details

From the project README
README image

Shopify CLI

Twitter Followers License badge

With the Shopify command line interface (Shopify CLI), you can:

  • initialize, build, dev, and deploy Shopify apps, extensions, functions and themes
  • build custom storefronts and manage their hosting

Learn more in the commands docs.

 

Before you begin

Install the latest version of Node.js and npm (or another package manager of your choice).

 

Developing apps with Shopify CLI

When you’re building a Shopify app, you can initialize your project using your preferred package manager. A single command will install all the dependencies you need — including Shopify CLI itself.

Initialize your project using one of the following commands:

  • npm init @shopify/app@latest (installed by default with Node)
  • pnpm create @shopify/create-app@latest
  • yarn create @shopify/app
  • bun create @shopify/app@latest (experimental)

Learn more in the docs: Create an app

 

Developing themes with Shopify CLI

To work with themes, the CLI needs to be installed globally with:

  • npm install -g @shopify/cli

You can also install it through Homebrew on macOS: brew tap shopify/shopify && brew install shopify-cli

Learn more in the docs: Shopify CLI for themes

 

Developing Hydrogen custom storefronts with Shopify CLI

The Hydrogen code lives here: https://github.com/Shopify/hydrogen/tree/main/packages/cli

Learn more in the docs: Shopify CLI for Hydrogen storefronts

 

Help 🖐

If you encounter issues using the CLI or have feedback you'd like to share with us, below are some options:

Contribute 👩🏽‍💻

If you'd like to contribute to the project, check out the contributors docs and the steps to get started.

 

References

Comments

Markdown supported