npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

shopify-theme-deployer

v1.0.0

Published

A Node.js CLI tool that deploys Shopify theme code to multiple stores simultaneously using the Shopify CLI

Readme

Shopify Theme Multi-Store Deployer

A Node.js CLI tool that deploys Shopify theme code to multiple stores simultaneously using the Shopify CLI.

npm version License: MIT

Installation

npm install -g shopify-theme-deployer

Quick Start

# 1. Create configuration file
shopify-deploy --init

# 2. Edit stores.json with your store URLs and theme IDs

# 3. Authenticate with your stores
shopify auth login --store your-store.myshopify.com

# 4. Deploy to all stores
shopify-deploy

Features

Core Features

  • Multi-store deployment: Deploy to multiple Shopify stores with a single command
  • Selective deployment: Deploy to specific stores or all stores
  • JSON configuration: Simple JSON-based store configuration
  • Shopify CLI integration: Uses official Shopify CLI for secure authentication
  • Cross-platform: Works on Windows, macOS, and Linux

Advanced Features

  • Parallel deployments: Deploy to multiple stores simultaneously for faster execution
  • Auto-retry with exponential backoff: Automatically retry failed deployments with intelligent timing
  • Theme backup: Backup themes before deployment to prevent data loss
  • Dry-run mode: Preview deployments without making actual changes
  • Rate limiting protection: Built-in delays to respect Shopify API limits
  • Comprehensive error handling: Intelligent error detection with helpful suggestions

User Experience

  • Colored output: Easy-to-read console output with color coding
  • Loading indicators: Visual progress feedback during operations
  • Detailed logging: Comprehensive logs with timestamps for debugging
  • Verbose mode: Detailed output for troubleshooting
  • Continue on error: Option to continue deploying even if some stores fail

Configuration

Store Configuration

Create a stores.json file (or use shopify-deploy --init):

{
  "stores": [
    {
      "url": "your-production-store.myshopify.com",
      "theme_id": "123456789012"
    },
    {
      "url": "your-staging-store.myshopify.com",
      "theme_id": "234567890123"
    }
  ]
}

Usage

Basic Commands

# Deploy to all stores
shopify-deploy

# Deploy to specific store
shopify-deploy --store "your-store.myshopify.com"

# List configured stores
shopify-deploy --list

# Show help
shopify-deploy --help

Advanced Options

# Parallel deployment (faster)
shopify-deploy --parallel --max-concurrent 5

# Auto-retry failed deployments
shopify-deploy --retry 3 --retry-delay 2000

# Backup themes before deployment
shopify-deploy --backup --backup-dir ./theme-backups

# Dry run (preview without deploying)
shopify-deploy --dry-run

# Continue on errors
shopify-deploy --continue-on-error

# Verbose output for debugging
shopify-deploy --verbose

# Combine multiple options
shopify-deploy --parallel --backup --retry 3 --verbose

Configuration Options

# Use custom configuration file
shopify-deploy --file my-stores.json

# Initialize new configuration
shopify-deploy --init

Command Line Options

| Option | Description | | ---------------------- | ------------------------------------------ | | --init | Create example stores.json file | | --file <path> | Specify custom stores file | | --list | List all configured stores | | --store <url> | Deploy to specific store | | --verbose | Enable detailed output | | --dry-run | Preview without deploying | | --parallel | Deploy to stores simultaneously | | --max-concurrent <n> | Max parallel deployments (default: 3) | | --retry <count> | Retry attempts for failures (default: 3) | | --retry-delay <ms> | Base delay between retries (default: 1000) | | --backup | Backup themes before deployment | | --backup-dir <path> | Backup directory (default: ./backups) | | --continue-on-error | Continue if some stores fail |

Prerequisites

  1. Node.js (version 14 or higher)
  2. Shopify CLI installed globally:
    npm install -g @shopify/cli
  3. Authentication with each target store:
    shopify auth login --store your-store.myshopify.com

Error Handling

The tool automatically detects and provides helpful messages for common issues:

  • Authentication errors: Prompts to run shopify auth login
  • Theme not found: Suggests checking theme ID with shopify theme list
  • Store not found: Validates store URL format
  • Permission errors: Indicates access issues
  • Rate limiting: Suggests waiting and retrying
  • Network errors: Identifies connection problems

Example Error Output

[ERROR] Failed to deploy to example-store.myshopify.com
[ERROR] Error type: AUTHENTICATION_ERROR
[ERROR] Message: Authentication required. Please run: shopify auth login --store example-store.myshopify.com
[WARNING] Suggestion: Run authentication command and try again

Examples

Basic Deployment

shopify-deploy

Production Deployment with Safety Features

shopify-deploy --backup --retry 3 --verbose

Fast Parallel Deployment

shopify-deploy --parallel --max-concurrent 5

Safe Testing

shopify-deploy --dry-run --verbose

Different Environments

# Development
shopify-deploy --file stores-dev.json

# Production
shopify-deploy --file stores-prod.json --backup

Logging

  • Automatic log files: deployment-YYYY-MM-DDTHH-MM-SS.log
  • Contains timestamps, success/failure status, and error details
  • Created in current working directory

Security

  • Uses Shopify CLI's secure authentication system
  • No sensitive tokens stored in configuration files
  • Configuration files safe to commit to version control
  • Only contains store URLs and theme IDs

Troubleshooting

Common Issues

Command not found:

npm install -g shopify-theme-deployer

Shopify CLI not installed:

npm install -g @shopify/cli

Authentication required:

shopify auth login --store your-store.myshopify.com

Invalid JSON:

shopify-deploy --init  # Create fresh example file

Debug Mode

shopify-deploy --verbose

CI/CD Integration

The tool works well in CI/CD pipelines. Set up Shopify CLI authentication in your CI environment and use the tool as part of your deployment process.

License

MIT License - see LICENSE file for details.