Overview
Shopify CLI comes bundled with a suite of commands for developing Shopify themes, including:- Creating, publishing, and deleting themes
- Launching a development server for local theme development
- Validating theme code with Theme Check
- Managing theme files and assets
Installation
Follow the Shopify CLI installation guide for your operating system. Verify installation:Authentication
Login
Authenticate with your Shopify Partner account:Logout
Log out from your Shopify account:Core Commands
Development Server
The most frequently used command during development.- Uploads your local theme to a development theme on your store
- Starts a local server at
http://127.0.0.1:9292 - Watches for file changes and syncs them automatically
- Provides hot reload functionality
- Injects hot reload script for instant updates
Theme Check
Validate and lint your theme code.Push Theme
Upload your local theme to your Shopify store.Pull Theme
Download theme files from your Shopify store to your local machine.Publish Theme
Make a theme the live theme on your store.List Themes
Display all themes on your store.Delete Theme
Remove a theme from your store.Share Theme
Generate a shareable preview link for an unpublished theme.File Filtering
Many commands support--only and --ignore flags for selective file operations.
Using —only
Process only specific files or directories:Using —ignore
Exclude specific files or directories:Common Workflows
Starting Fresh Development
1
Clone and navigate to theme
2
Start development server
3
Make changes and validate
Edit files, then run:
Deploying to Production
1
Run final validation
2
Push as unpublished theme
3
Test the theme
Use the preview link to test thoroughly.
4
Publish when ready
Syncing with Remote Changes
Troubleshooting
Authentication Errors
Port Already in Use
Theme Not Syncing
- Check CLI output for errors
- Verify file isn’t in
.shopifyignore - Restart the development server:
Conflicting Changes
If remote changes conflict with local changes:Advanced Usage
Environment Variables
Set environment variables for automation:CI/CD Integration
Use Shopify CLI in continuous integration:Next Steps
Theme Check
Deep dive into theme validation and linting
Development Workflow
Learn best practices for theme development
Official CLI Docs
Complete Shopify CLI documentation
Setup Guide
Set up your development environment