Shopify CLI

3.93.2 · active · verified Wed Apr 22

The Shopify CLI is an official command-line interface tool designed to streamline development for the Shopify platform. It provides a unified set of commands for building, testing, and deploying Shopify applications, themes, and custom functions. Currently stable at version 3.93.2, the CLI maintains a rapid release cadence, often seeing minor version updates weekly or bi-weekly, reflecting active development and continuous feature integration. Its key differentiators include tight integration with the Shopify ecosystem, support for multiple development paradigms (Hydrogen, App Extensions, Themes, Functions), and features like hot-reloading for themes and local development environments for apps, significantly enhancing developer productivity within the Shopify platform. It acts as the primary interface for managing project lifecycle from initialization to deployment for both partners and merchants.

Common errors

Warnings

Install

Quickstart

This quickstart demonstrates how to initialize a new Shopify application using `shopify app init` and then run it locally with `shopify app dev`. It also outlines how to start theme development and deploy an app.

// Initialize a new Shopify application (e.g., Remix app with Hydrogen frontend)
// This command will guide you through setting up a new project.
// Replace 'my-shopify-app' with your desired project name.
// For non-interactive init, use 'shopify app init --name my-shopify-app --template remix --language typescript --verbose'
console.log("Initializing a new Shopify app...");
await new Promise(resolve => setTimeout(resolve, 1000)); // Simulate CLI delay
console.log("> shopify app init");
// Follow prompts to select app type (e.g., Shopify App), framework (e.g., Remix, Next.js), and language.
// After initialization, navigate into the project directory:
// cd my-shopify-app

console.log("\nStarting local development server for the app...");
await new Promise(resolve => setTimeout(resolve, 1000)); // Simulate CLI delay
console.log("> shopify app dev");
// This command starts a local development server, proxies requests to your app,
// and sets up tunneling for webhooks and redirects, allowing you to test your
// app directly against a Shopify development store. It also provides a Dev Console.

console.log("\nAlternatively, for theme development:");
await new Promise(resolve => setTimeout(resolve, 1000)); // Simulate CLI delay
console.log("> shopify theme init --store your-store-name.myshopify.com");
// This command will prompt you to select a theme from your store or create a new one.
// You can then develop it locally:
// cd your-theme-name
// shopify theme dev --store your-store-name.myshopify.com

console.log("\nTo deploy an app:");
await new Promise(resolve => setTimeout(resolve, 1000)); // Simulate CLI delay
console.log("> shopify app deploy");
// This command deploys your Shopify app to your partner account.

view raw JSON →