
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.
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.
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 higherPaste the following command to your terminal.
npm install -g @shopify/cli@latestAfter 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.comYou’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.
While editing the theme locally, I use the following command to preview changes as I work.
shopify theme devClick [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”
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.
Once I’m satisfied with the changes locally, I use the command below to push them to the store.
shopify theme pushNext, 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.
Custom Shopify builds that convert browsers into buyers.
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.