Shopify CLI is a command-line interface tool that helps you generate and work with Shopify themes, functions, apps and headless storefronts.
The CLI is used to automate many common development tasks, a couple of them that you’ll use heavily are: live reload of local themes once you make changes to the files, pushing automatic changes to the development theme on Shopify servers.
I use the CLI daily in my Shopify workflow when working on customers' stores.
To ensure you're using the latest features and bug fixes it's important to keep Shopify CLI up to date.
In this tutorial I’ll explain how to do exactly that.
Lately whenever you start working with Shopify CLI in a store, if there is a new version, Shopify will notify you inside the CLI.
Check Your Current Version
In case Shopify didn’t notify you about the new version and you assume there is one, or you just want to check your current version of Shopify CLI, do that by running this command:
shopify versionIf there is a new version the command will output this:
❯ Current Shopify CLI version: 3.72.1
❯ 💡 Version 3.72.2 available!
npm install -g @shopify/cli@latestIf there isn’t a new version the command will output the CLI existing version on your machine:
❯ shopify version
3.72.1Update Shopify CLI
Since I’m on a MacBook Pro I use Homebrew to update the CLI but you can do it via npm as well.
Personally when I update a package I prefer to update them all since I do not have the necessary time to do it every time for each package on my local machine.
So due to this fact when there is an update for one of my packages I run an update for all of them.
If you are new to HomeBrew you can find the documentation here.
This command is magic and will save you a ton of time:
brew update && brew upgradeThe “brew upgrade” and “brew update” commands are key to managing Homebrew packages.
Here's what each does:
brew updatePurpose: Updates Homebrew itself (not your installed packages).
What it does:
Fetches the latest package definitions (formulae) and metadata from the Homebrew repository.
Updates the local tap (package index) to know about new versions or changes to packages.
Doesn't upgrade any installed software, just ensures Homebrew has the latest information about available packages.
If this is not available in HomeBrew you’ll have issues upgrading the Shopify CLI via this package manager.
brew upgradePurpose: Upgrades installed packages to their latest versions.
What it does:
Checks for new versions of packages already installed on your system.
Installs the latest versions for those packages (if available).
Does not upgrade pinned packages (packages you've marked to stay at a specific version).
Running both commands at the same time ensures Homebrew is aware of the latest package definitions and then upgrades any installed packages to their newest versions.
Where can you check for new releases
Best place to check for releases and the changelog is Shopify CLI Github: https://github.com/Shopify/cli/releases
