Facebook iconHow To Use Shopify CLI for Themes (A Step-by-Step Guide)
F22 logo
Blogs/Shopify

How To Use Shopify CLI for Themes (A Step-by-Step Guide)

Written by Sahil Singh
Feb 9, 2026
4 Min Read
How To Use Shopify CLI for Themes (A Step-by-Step Guide) Hero

When working on Shopify stores, I’ve often run into a familiar frustration: trying to trace where a specific CSS class, ID, or JavaScript function is being used. In a live Shopify environment, this usually means jumping between multiple theme files, stylesheets, and scripts just to understand how a single element is wired together.

The same task feels much easier in a local development setup like Visual Studio Code. I can copy a class name or ID, use global search, and immediately see every place it appears across the codebase. That context makes it far simpler to understand how an element is styled or manipulated without guesswork.

Beyond this, working directly inside a Shopify store comes with a few practical limitations that slow development down.

1. I’ve also seen collaboration become tricky when multiple developers work on the same Shopify theme. This is necessary because simultaneous work on the same theme can lead to code conflicts, where one developer's changes might accidentally override another's modifications.

  1. It’s also difficult to track changes without a proper version control system. I’ve found this becomes especially painful when debugging regressions or reviewing who changed what and why.

This is where Shopify CLI becomes genuinely useful. I use it to pull themes locally, preview changes in real time, and push updates through the terminal instead of editing directly on the live store. By developing locally, you can integrate your theme files with GitHub, providing robust version control and eliminating issues with code conflicts and change tracking.

Below is a step-by-step walkthrough I follow when working on Shopify themes locally using Shopify CLI.

1. Pre-requisites

Before getting started, I make sure the following prerequisites are in place:

Node.js: 18.20+, 20.10 or higher
A Node.js package manager: npm, Yarn 1.x, or pnpm.
Git: 2.28.0 or higher

2. Install Shopify CLI Globally

Paste the following command to your terminal.

npm install -g @shopify/cli@latest
Installing Shopify CLI Globally

3. Pull the theme to which you want to work locally

After installing Shopify CLI, I use the following command to pull the theme files into my local environment.

 shopify theme pull --store store_name_here.myshopify.com
Shopify theme pull

You’ll be redirected to your browser for login verification. Once authenticated, the process continues in the terminal.

In your terminal, you'll see a list of all theme files currently in your store. At this point, I select the specific theme I want to work on locally.

Once selected, the CLI will begin downloading the theme files to your local system.

Once the download completes, you can access all the theme files in your local directory.

4. Use the Shopify theme dev for previewing the changes while working on the theme locally

While editing the theme locally, I use the following command to preview changes as I work.

shopify theme dev
Use the Shopify theme dev for previewing the changes while working on the theme locally

Click [1] to open the theme preview or [2] to access the theme editor.

Let's try to make some changes in the theme file

In the index file, Lets change the heading for the banner image from “Equip Yourself with Our Latest Camping Gear”

Your Store, Open for Business - Fast

Custom Shopify builds that convert browsers into buyers.

Collection to something else,

As I edit the file, the changes reflect immediately in the preview window and are logged in the terminal.

6. Use Command Theme Push to push the changes from local to store

Once I’m satisfied with the changes locally, I use the command below to push them to the store.

shopify theme push

Next, select the theme file to which you want your changes to be pushed to

On confirmation, the Shopify CLI will start uploading files to the store

After completion, the terminal confirms that the upload was successful.

The Changes would reflect on the live website or on the theme to which you have pushed your code.

That’s the complete local theme workflow using Shopify CLI.

Your Store, Open for Business - Fast

Custom Shopify builds that convert browsers into buyers.

Our Final Words

I wrote this guide to show how Shopify CLI fits into a practical, day-to-day theme development workflow. From my experience, working locally makes a noticeable difference—you get proper search, version control with Git, and much clearer visibility into code changes as themes evolve.

Overall, this approach keeps theme development cleaner, more predictable, and far easier to maintain over time.

Author-Sahil Singh
Sahil Singh

I’m a Front-End developer with 1.3 years of experience creating user-friendly, optimized web pages. I specialize in developing features that boost conversion rates for e-commerce websites.

Share this article

Phone

Next for you

7 Best Shopify Development Companies of 2026 Cover

Shopify

Feb 16, 20269 min read

7 Best Shopify Development Companies of 2026

Have you ever wondered which Shopify development company can actually turn your store idea into a high-performing, sales-driven business? With so many agencies claiming expertise, choosing the right partner can feel overwhelming. I put this list together to help businesses cut through the noise and compare Shopify development companies based on real capabilities, not marketing claims. That’s why we’ve done the research to bring you a curated list of the 9 best Shopify development companies that

Fix High Bounce Rates & Abandoned Sessions: The 2026 Shopify Guide Cover

Shopify

Dec 30, 20257 min read

Fix High Bounce Rates & Abandoned Sessions: The 2026 Shopify Guide

High bounce rates and abandoned sessions are silent killers of eCommerce growth. When visitors land on your Shopify store but quickly exit or fail to complete actions, you’re not just losing traffic; you’re leaking revenue. In 2026, when online shopping is driven by speed, relevance, and seamless experience, fixing these issues is no longer optional. It’s foundational to scale. This guide will help you understand why bounce rates and abandoned sessions matter, how to diagnose them, and what str

7 Shopify Customisation Strategies to Boost Sales in 2026 Cover

Shopify

Dec 30, 20256 min read

7 Shopify Customisation Strategies to Boost Sales in 2026

If you're aiming to grow your eCommerce store this year, mastering Shopify customisation strategies in 2026 could be the game-changer your business needs. With competition at an all-time high and customer expectations rising, simply setting up a Shopify store isn’t enough. The difference between a casual browser and a loyal customer often comes down to how personalised and frictionless your shopping experience is. This article breaks down 7 essential Shopify customisation strategies you can imp