In October 2022, support for themes was added to Shopify CLI 3.x. Shopify CLI 3.x provides a streamlined authentication and store management experience.

On this page, you can learn about the differences between Shopify CLI 2.x and 3.x, and how to update your theme development environment.

## Getting started

Refer to the following tutorials for details about creating or working on a Shopify theme using Shopify CLI:

<div class="resource-card-grid">
  <div>
  <a class="resource-card" href="/docs/storefronts/themes/getting-started/create" data-theme-mode="">
    <div class="resource-card__indicator-container"><img
     src="/assets/resource-cards/globe"
     data-alt-src="/assets/resource-cards/globe-dark"
     aria-hidden="true"
     class="resource-card__icon themed-image"></div>
    <h3 class="resource-card__title">
      Start building a theme
    </h3>
    <p class="resource-card__description">Learn how to set up your theme development environment and create a new theme.</p>
  </a>
</div></p>

<p><div>
  <a class="resource-card" href="/docs/storefronts/themes/getting-started/customize" data-theme-mode="">
    <div class="resource-card__indicator-container"><img
     src="/assets/resource-cards/theme"
     data-alt-src="/assets/resource-cards/theme-dark"
     aria-hidden="true"
     class="resource-card__icon themed-image"></div>
    <h3 class="resource-card__title">
      Customize an existing theme
    </h3>
    <p class="resource-card__description">Learn how to set up your development environment to work on a theme in a Shopify store.</p>
  </a>
</div>
</div>



## Workflow changes

Some changes were made to theme workflows to reduce the number of commands that need to be entered, simplify the command structure, and create a more consistent experience when developing across themes, apps, and custom storefronts.

<table>
  <thead>
    <tr>
      <th></th>
      <th>2.0</th>
      <th>3.0</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td rowspan="2">Authentication</td>
      <td>Authenticate with Shopify CLI using <code>shopify login</code></td>
      <td>You don't need to log in explicitly. If you aren't logged in, then you're prompted to log in when you run a command that requires authentication.</td>
    </tr>
    <tr>
      <td>View the organization you're currently logged into using <code>shopify whoami</code></td>
      <td><i>No longer supported</i></td>
    </tr>
    <tr>
      <td rowspan="3">Store selection</td>
      <td>Select a store using <code>shopify login --store</code></td>
      <td>Pass a <code>--store</code> flag the first time you run a command that requires connection to a store. This store is used in subsequent commands.</td>
    </tr>
    <tr>
      <td>Switch between stores using <code>shopify switch</code></td>
      <td>Pass a <code>--store</code> flag with a new value when you want to run a command against a new store</td>
    </tr>
    <tr>
      <td>Run <code>shopify store</code> to view which store you're currently using.</td>
      <td>Run <code>shopify theme info</code> to view which store you're currently using</td>
    </tr>
    <tr>
      <td rowspan="3">General</td>
      <td>Preview your theme in a store using <code>shopify theme serve</code></td>
      <td>Command is renamed to <code>shopify theme dev</code></td>
    </tr>
    <tr>
      <td>Populate stores using <code>shopify populate [ products | draftorders | customers ]</code></td>
      <td><i>No longer supported</i></td>
    </tr>
    <tr>
      <td>Specify the directory that you want to use using the <code>[root]</code> positional argument</td>
      <td>Specify the directory that you want to use using the <code>–-path</code> flag</td>
    </tr>
  </tbody>
</table>

## Migrate to Shopify CLI 3.x

Follow the steps below to migrate your theme development environment to Shopify CLI 3.x.

### macOS and Homebrew

If you use Homebrew to manage your Shopify CLI installation on macOS, then you don't need to uninstall the previous version of Shopify CLI to migrate. Instead, you can upgrade to Shopify CLI 3.x directly.

In addition to the requirements for Shopify CLI 2.x, Shopify CLI 3.x requires [Node.js](https://nodejs.org/en/download/) 18 or higher.
. Homebrew installs Node.js for you when you upgrade to the latest version of Shopify CLI.

<p>
<div class="react-code-block" data-preset="terminal">
<div class="react-code-block-preload ThemeMode-dim">
<div class="react-code-block-preload-bar "></div>
<div class="react-code-block-preload-placeholder-container">
<div class="react-code-block-preload-code-container">
<div class="react-code-block-preload-codeline-number"></div>
<div class="react-code-block-preload-codeline"></div>
</div>

</div>
</div>


<script type="text/plain" data-language="bash">
RAW_MD_CONTENTbrew upgrade shopify-cli
END_RAW_MD_CONTENT</script>

</div>
</p>


### Other

#### Step 1: Install new requirements

In addition to the requirements for Shopify CLI 2.x, Shopify CLI 3.x requires [Node.js](https://nodejs.org/en/download/) 18 or higher.
. If you use macOS, then Homebrew will install Node.js for you when you upgrade to the latest version of Shopify CLI.

For a complete list of requirements, refer to [Install Shopify CLI](/docs/api/shopify-cli).

#### Step 2: Uninstall Shopify CLI 2.x

Consider uninstalling the previous version of Shopify CLI. Uninstalling the previous version avoids any collisions between the two versions.

If you want to keep both versions of Shopify CLI installed, then refer to [Using both Shopify CLI 2.x and 3.x](#using-multiple-versions) to learn how to work with both versions in the same environment.

Shopify CLI can be removed from your system using the same package manager that you used to install it:

<p>
<div class="react-code-block" data-preset="terminal">
<div class="react-code-block-preload ThemeMode-dim">
<div class="react-code-block-preload-bar "></div>
<div class="react-code-block-preload-placeholder-container">
<div class="react-code-block-preload-code-container">
<div class="react-code-block-preload-codeline-number"></div>
<div class="react-code-block-preload-codeline"></div>
</div>
<div class="react-code-block-preload-code-container">
<div class="react-code-block-preload-codeline-number"></div>
<div class="react-code-block-preload-codeline"></div>
</div>
<div class="react-code-block-preload-code-container">
<div class="react-code-block-preload-codeline-number"></div>
<div class="react-code-block-preload-codeline"></div>
</div>
<div class="react-code-block-preload-code-container">
<div class="react-code-block-preload-codeline-number"></div>
<div class="react-code-block-preload-codeline"></div>
</div>
<div class="react-code-block-preload-code-container">
<div class="react-code-block-preload-codeline-number"></div>
<div class="react-code-block-preload-codeline"></div>
</div>
<div class="react-code-block-preload-code-container">
<div class="react-code-block-preload-codeline-number"></div>
<div class="react-code-block-preload-codeline"></div>
</div>
<div class="react-code-block-preload-code-container">
<div class="react-code-block-preload-codeline-number"></div>
<div class="react-code-block-preload-codeline"></div>
</div>

</div>
</div>


<script type="text/plain" data-language="bash" data-title="apt">
RAW_MD_CONTENTsudo apt remove shopify-cli
END_RAW_MD_CONTENT</script>
<script type="text/plain" data-language="bash" data-title="Yum">
RAW_MD_CONTENTsudo yum remove shopify-cli
END_RAW_MD_CONTENT</script>
<script type="text/plain" data-language="bash" data-title="RubyGems">
RAW_MD_CONTENTgem uninstall shopify-cli
END_RAW_MD_CONTENT</script>

</div>
</p>


If you’re using a legacy version of Shopify CLI (lower than `0.9.0`), then you need to [uninstall it manually](/docs/storefronts/themes/tools/cli/cli-2/upgrade-uninstall#uninstall-the-legacy-shopify-app-cli).

#### Step 3: Install Shopify CLI 3.x

Follow the instructions here to install [Shopify CLI](/docs/api/shopify-cli)

> Note:
> apt, Yum, and RubyGems installations are no longer supported.


#### Step 4: Verify the installation

To verify that Shopify CLI is installed properly, run the following command:

```sh
shopify version
```

<br>
The command returns a version number.

<a id="using-multiple-versions"></a>
## Using both Shopify CLI 2.x and 3.x

If you have both versions of Shopify CLI installed, then the two versions might conflict because they both use the same program name (`shopify`).

Whichever version is listed first in your `PATH` will run. You can update your path to change the default CLI, or temporarily uninstall one version to avoid confusion.