Skip to content
Tutorials Center
My learning

Topics

Lesson 2 of 61 ยท Getting Started

Setting Up: Dev Store, Partner Account and Shopify CLI

Set up a Shopify development store, install Shopify CLI, and learn the theme dev, pull, push and check commands plus GitHub integration for theme work.

You do not need a paying store to learn theme development. Shopify gives developers free development stores that behave like real stores but are meant for building and testing. You connect to one from your computer with Shopify CLI, a command-line tool that downloads a theme, uploads your changes and shows a live preview in your browser.

This lesson walks through the whole setup: a Partner account, a development store, the CLI, and the handful of shopify theme commands you will use every day. The commands run on your own machine and talk to Shopify, so they are shown as read-only code. At the end there is a live stand-in that imitates how the CLI notices changed files and uploads only those.

The pieces you need

  1. A Shopify Partner account. This is the free developer account at shopify.com/partners. It lets you create development stores and apps without paying for a plan.
  2. A development store. Created from the Partner dashboard. It has the admin and the online store like any other store, but real payments are not available, and the store can be used for testing only. You can add sample products to it, or generate test products.
  3. Node.js and Git. Shopify CLI is installed with a Node package manager, and many theme workflows use Git. Install a current long-term-support version of Node.js (the CLI documents its minimum supported version, and it moves over time).
  4. Shopify CLI. The shopify command.
  5. A code editor. Visual Studio Code is the most common choice, with the Shopify Liquid extension for syntax highlighting, completion and theme check warnings.
flowchart TD
  P["Partner account"] --> S["Development store"]
  N["Node.js + Git"] --> C["Shopify CLI"]
  C -->|"shopify theme dev"| S
  E["Code editor"] --> F["Theme files on your computer"]
  F --> C

The CLI connects the theme files on your computer to a theme on your development store.

Account screens and menu names in the Partner dashboard change from time to time. If a button has moved, look for "Stores" and then "Add store" (choose a development store). The command-line steps below are more stable than the clicks.

Create a development store

In the Partner dashboard, open the stores area and create a development store. Pick a name, which becomes the address your-name.myshopify.com. You can choose to start with test data so the store has products and collections to render. A store with no products makes theme work hard to judge, so add a few: at least one product with several variants, one collection, and a page.

Remember the .myshopify.com address. The CLI uses it to know which store to connect to.

Install Shopify CLI

Install it globally with your package manager. These commands run in your terminal, not on this website:

Terminal
npm install -g @shopify/cli@latest
shopify version

On macOS, Homebrew is also supported. Run shopify version afterwards to confirm the install. If you see "command not found", the global package folder is not on your PATH.

Shopify CLI updates often. Update with the same install command, and prefer keeping it current, because theme commands gain flags and fix bugs regularly.

Start a theme project

You have two common starting points. The first is to copy the reference theme Dawn from its public repository. The second is to pull a theme that already exists in a store.

Terminal
# Option 1: start from Dawn (reference theme)
shopify theme init my-theme
cd my-theme

# Option 2: download a theme from the store
shopify theme pull --store your-name.myshopify.com

shopify theme init clones a starter theme into a new folder (it uses Dawn by default). shopify theme pull shows a list of the store's themes if you do not pass an id, and downloads the one you choose. Both leave you with the standard folders described in The Theme File Structure.

The first time you use a store, the CLI opens a browser window and asks you to log in. After that it remembers the session.

The development loop: shopify theme dev

The command you will use most is:

Terminal
shopify theme dev --store your-name.myshopify.com

What happens:

  1. The CLI uploads your local files to a development theme, a temporary theme that does not affect the live storefront.
  2. It starts a local server, normally at http://127.0.0.1:9292, and prints that address along with a link to the theme editor and a shareable preview.
  3. It watches your files. When you save a Liquid, CSS, JavaScript or JSON file, it uploads the change, and the browser refreshes. CSS and section changes often update with hot reload, so the page does not fully reload.

The development theme is private to you. Your teammates do not see it unless you give them the preview link. When you stop the command, the temporary theme is cleaned up by Shopify after a period of inactivity.

Keep shopify theme dev running in one terminal and use another for Git and other commands. If you edit a theme in the online editor while the dev server runs, there is a flag to sync those editor changes back to your local files (--theme-editor-sync). Without it, local files and the editor can drift apart.

Other commands you will use

Command What it does
shopify theme list Lists themes in the store with their ids and roles (live, unpublished, development)
shopify theme pull Downloads a remote theme to the current folder
shopify theme push Uploads local files to a theme, either a new unpublished one or an existing one
shopify theme check Runs Theme Check, the Liquid linter, over your files
shopify theme publish Makes a chosen theme the live theme
shopify theme share Uploads the theme and creates a shareable preview link
shopify theme open Opens the theme preview or editor in the browser

Examples:

Terminal
# Upload local files as a brand-new unpublished theme
shopify theme push --unpublished --theme "Redesign test"

# Run the linter on the current folder
shopify theme check

# Pull only some files
shopify theme pull --only templates/product.json --only "sections/*"

Be careful with push to the live theme: it overwrites files that merchants may have edited in the theme editor, such as templates/*.json and config/settings_data.json. Use --ignore or a separate theme when in doubt. Team workflows around this are covered in Version Control and Team Workflows.

Stand-in: how the watcher decides what to upload

The CLI does not re-upload your whole theme on every save. It notices which files changed and sends only those. The stand-in below imitates that idea using a content hash per file. It does not talk to Shopify; the "upload" is just a log line, and Shopify CLI's real implementation is different in detail.

JS Stand-in: detect changed theme files

Press Run (or Ctrl + Enter) to see the console output here.

No output.

The real CLI also handles ordering (for example, it sends assets before templates that reference them), retries and rate limits, which the stand-in leaves out.

Check your work with Theme Check

shopify theme check reads your Liquid and JSON and reports problems: missing translations, unused snippets, deprecated tags, and performance warnings. Run it often. The editor extension shows the same warnings as you type. Theme Check, Linting and Testing covers the rules and CI setup.

GitHub integration

Shopify can connect a theme directly to a GitHub repository, so a branch becomes a theme:

  1. In the admin, open Online Store > Themes, then Add theme > Connect from GitHub.
  2. Authorize the Shopify GitHub app and choose a repository and branch.
  3. Shopify creates a theme from that branch. Commits to the branch update the theme, and edits made in the theme editor are committed back to the branch.

This is helpful for agencies that keep one branch per environment. It does not replace running shopify theme dev locally; many teams use both. A .shopifyignore file lets you keep certain files out of syncs, which Version Control and Team Workflows explains.

A realistic first session

Putting it together, a typical first session looks like this. It is a read-only transcript of commands, not something that runs on this page:

Terminal
shopify theme init practice-theme
cd practice-theme
shopify theme dev --store your-name.myshopify.com
# open http://127.0.0.1:9292, then edit sections/header.liquid and save
# in a second terminal:
shopify theme check
git init && git add -A && git commit -m "Start from Dawn"

To prove the loop works, make a visible change, for example edit a heading in a section and watch the browser update within a second or two. Once that works, your environment is ready.

Stand-in: a command-line argument reader

The CLI reads flags such as --store and --only. A second stand-in shows how such a command line is turned into options. This is simple on purpose and only mirrors the flag style, not Shopify's real parser.

JS Stand-in: reading CLI flags

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What does shopify theme dev upload your changes to?

    The CLI creates a private development theme on the store, so you can preview changes without touching what shoppers see.
  2. 2. Which command would you run to lint Liquid and JSON files in the theme folder?

    shopify theme check runs Theme Check, the linter that reports errors, deprecations and performance warnings.
  3. 3. Why should you be careful when pushing local files to the live theme?

    Files such as templates/*.json and config/settings_data.json hold merchant edits. Pushing local copies replaces them.
  4. 4. What does connecting a theme to GitHub give you?

    The GitHub integration treats a branch as a theme: commits update the theme, and merchant edits in the editor are committed back.

Summary

  • A Partner account and a development store are free and let you build and test themes.
  • Shopify CLI needs Node.js and is installed with a package manager; Git is used for version control.
  • shopify theme dev creates a private development theme, serves it locally and hot reloads on save.
  • pull, push, check, list, publish and share cover the rest of the workflow; pushing to a live theme can overwrite merchant edits.
  • GitHub integration links a branch to a theme, and Theme Check keeps your Liquid clean.

Next, learn what each folder holds in The Theme File Structure.