Skip to main content
Shopify CLI is a command-line tool that helps you build Shopify themes faster. It automates and enhances your local development workflow with commands for working with themes on a Shopify store.

Overview

Shopify CLI comes bundled with a suite of commands for developing Shopify themes, including:
  • Creating, publishing, and deleting themes
  • Launching a development server for local theme development
  • Validating theme code with Theme Check
  • Managing theme files and assets

Installation

Follow the Shopify CLI installation guide for your operating system. Verify installation:
Expected output:

Authentication

Login

Authenticate with your Shopify Partner account:
This opens a browser window for authentication. Once complete, you’ll see:

Logout

Log out from your Shopify account:

Core Commands

Development Server

The most frequently used command during development.
What it does:
  • Uploads your local theme to a development theme on your store
  • Starts a local server at http://127.0.0.1:9292
  • Watches for file changes and syncs them automatically
  • Provides hot reload functionality
  • Injects hot reload script for instant updates
Output:
Options:

Theme Check

Validate and lint your theme code.
Output:
Or with issues:
Options:

Push Theme

Upload your local theme to your Shopify store.
Interactive prompts:
Options:
Use --allow-live with caution. Pushing to a live theme affects your production site immediately.

Pull Theme

Download theme files from your Shopify store to your local machine.
Options:

Publish Theme

Make a theme the live theme on your store.
Interactive prompt:
Options:

List Themes

Display all themes on your store.
Output:

Delete Theme

Remove a theme from your store.
Interactive prompt:
Options:

Share Theme

Generate a shareable preview link for an unpublished theme.
Output:

File Filtering

Many commands support --only and --ignore flags for selective file operations.

Using —only

Process only specific files or directories:

Using —ignore

Exclude specific files or directories:

Common Workflows

Starting Fresh Development

1

Clone and navigate to theme

2

Start development server

3

Make changes and validate

Edit files, then run:

Deploying to Production

1

Run final validation

2

Push as unpublished theme

3

Test the theme

Use the preview link to test thoroughly.
4

Publish when ready

Syncing with Remote Changes

Troubleshooting

Authentication Errors

Port Already in Use

Theme Not Syncing

  1. Check CLI output for errors
  2. Verify file isn’t in .shopifyignore
  3. Restart the development server:

Conflicting Changes

If remote changes conflict with local changes:

Advanced Usage

Environment Variables

Set environment variables for automation:

CI/CD Integration

Use Shopify CLI in continuous integration:

Next Steps

Theme Check

Deep dive into theme validation and linting

Development Workflow

Learn best practices for theme development

Official CLI Docs

Complete Shopify CLI documentation

Setup Guide

Set up your development environment