This skill should be used when the user asks to "use shopify cli", "run shopify theme", "shopify app dev", "create a shopify theme", "push theme to shopify", "pull theme from shopify", "start theme dev server", "deploy shopify app", "initialize shopify project", or mentions Shopify CLI commands, theme development, or app development workflows.
Shopify CLI is a command-line tool for building Shopify apps, themes, and Hydrogen storefronts. It provides commands for local development, testing, and deployment.
Install via npm (requires Node.js 18+):
npm install -g @shopify/cli @shopify/theme
Or via Homebrew on macOS:
brew tap shopify/shopify
brew install shopify-cli
All commands follow the pattern: shopify [topic] [command] [flags]
Main topics:
theme - Theme development commandsapp - App development commandshydrogen - Hydrogen storefront commandsStart a local development server with hot reload:
shopify theme dev --store your-store.myshopify.com
This uploads the theme as a development theme and returns a preview URL at http://127.0.0.1:9292. Development themes don't count toward theme limits and auto-delete after 7 days of inactivity.
Key flags:
--store - Target store domain--theme - Use existing theme ID instead of creating dev theme--host - Network interface (default: 127.0.0.1)--port - Port number (default: 9292)--live-reload - Enable/disable live reload (default: hot-reload)| Command | Purpose |
|---|---|
theme init | Clone a Git repo as theme starting point |
theme dev | Start local dev server with hot reload |
theme push | Upload local theme to store |
theme pull | Download theme from store |
theme list | Show all themes with IDs |
theme check | Run Theme Check linter |
theme publish | Make theme live |
theme delete | Remove theme from store |
theme share | Create shareable preview link |
theme package | Create ZIP for Theme Store submission |
Push local changes to store:
shopify theme push --store your-store.myshopify.com
Pull theme from store:
shopify theme pull --store your-store.myshopify.com --theme THEME_ID
Use --only or --ignore flags to filter files:
shopify theme push --only "sections/*" --only "snippets/*"
shopify theme pull --ignore "config/settings_data.json"
Run Theme Check to validate Liquid code:
shopify theme check
Auto-fix issues where possible:
shopify theme check --auto-correct
Initialize a new Shopify app:
shopify app init
This scaffolds an app with Remix, Prisma, and Polaris.
Start the local development server:
shopify app dev
This:
| Command | Purpose |
|---|---|
app init | Create new app from template |
app dev | Start local dev server |
app deploy | Deploy app to Shopify |
app info | Show app configuration |
app generate extension | Add new extension |
app function | Manage Shopify Functions |
app env | Manage environment variables |
Add extensions to an existing app:
shopify app generate extension
Extension types include:
Configure multiple environments in shopify.theme.toml:
[environments.development]
store = "dev-store.myshopify.com"
theme = "123456789"
[environments.production]
store = "prod-store.myshopify.com"
theme = "987654321"
Run commands against specific environments:
shopify theme push --environment production
shopify theme dev --environment development
Log in to Shopify:
shopify auth login --store your-store.myshopify.com
Log out:
shopify auth logout
Check current auth status:
shopify auth info
shopify theme initshopify theme dev --store STOREshopify theme checkshopify theme pushshopify app initshopify app devshopify app generate extensionshopify app deployAuthentication issues: Run shopify auth logout then shopify auth login
Theme not syncing: Check .shopifyignore file for excluded patterns
Port conflicts: Use --port flag to specify different port
Permission errors: Ensure store access via Partners dashboard or staff account
For detailed command documentation, run:
shopify help
shopify theme --help
shopify app --help