ShopsWired CLI

Command-line tool for local plugin and theme development. Edit files locally, preview changes instantly on a live shop — no uploads, no build steps.


1. Installation

Download the prebuilt binary for your platform and add it to your system PATH.

macOS

# Apple Silicon (M1/M2/M3)
curl -Lo shopswired https://public.shopswired.com/cli/shopswired-darwin-arm64
chmod +x shopswired && sudo mv shopswired /usr/local/bin/

# Intel
curl -Lo shopswired https://public.shopswired.com/cli/shopswired-darwin-amd64
chmod +x shopswired && sudo mv shopswired /usr/local/bin/

Linux

# x86_64
curl -Lo shopswired https://public.shopswired.com/cli/shopswired-linux-amd64
chmod +x shopswired && sudo mv shopswired /usr/local/bin/

# ARM64
curl -Lo shopswired https://public.shopswired.com/cli/shopswired-linux-arm64
chmod +x shopswired && sudo mv shopswired /usr/local/bin/

Windows

Download the executable and add it to your PATH:

Rename the downloaded file to shopswired.exe and move it to a directory in your PATH.

Requirements:

  • A ShopsWired account with at least one shop
  • Developer Mode enabled on the target shop (Settings → Developer)

2. Quick Start

Get up and running in four steps:

# 1. Authenticate (opens browser for secure code-based approval)
shopswired login

# 2. Select a shop to develop against
shopswired link

# 3. Scaffold a new theme or plugin
shopswired init --type theme --id my-theme
shopswired init --type plugin --id my-plugin

# 4. Start developing with live preview
shopswired dev

3. Commands

shopswired login

Authenticates using a secure device authorization flow — no passwords in the terminal.

  1. The CLI generates a code (e.g. A1B2-C3D4) and opens your browser
  2. Log in normally (password, passkey, 2FA — whatever you have)
  3. Approve the code in the browser
  4. CLI receives a token and saves it to ~/.shopswired/config.json
shopswired login

shopswired link

Select which shop to develop against. Lists all shops you have access to.

shopswired link
# Select a shop:
#
#   → 1. My Dev Store (mydev.shopswired.com)
#     2. Client Store (client.shopswired.com) [dev]
#
# Enter number: 1
# ✓ Linked to My Dev Store (mydev.shopswired.com)

Note: Developer Mode must be enabled in Settings → Developer for the selected shop. The CLI will warn you if it's not enabled.

shopswired dev

The main development command. Connects to your shop and serves local files in real-time.

# From workspace root
shopswired dev

# Or specify a directory
shopswired dev --dir ./my-workspace
  • Scans for plugins/ and themes/ subdirectories in your workspace
  • If multiple themes are found, prompts you to choose one (only one can be active)
  • Watches for local file changes and updates the shop instantly
  • Streams plugin console.log / console.warn / console.error output to your terminal
  • Press Ctrl+C to stop

Expected directory structure:

my-workspace/
├── plugins/
│   ├── seo-optimizer/
│   │   ├── manifest.json
│   │   └── hooks/
│   │       └── checkout.js
│   └── custom-shipping/
│       ├── manifest.json
│       └── hooks.js
└── themes/
    └── my-theme/
        ├── manifest.json
        ├── layout.liquid
        ├── index.liquid
        └── css/
            └── style.css

Terminal output:

🔗 Shop: My Dev Store (ID: 123)
📁 Workspace: /home/user/my-workspace

  Starting dev session... ✓

  📡 Connecting to dev server... ✓

✓ Dev session active. Watching for changes...
  Press Ctrl+C to stop.

  12:15:03 ⟳ plugin/seo-optimizer/hooks/checkout.js
  12:15:04 LOG [seo-optimizer/checkout.js] Order processed: #1042
  12:15:05 WRN [seo-optimizer/cron.js] Rate limit approaching
  12:15:08 ✗ plugin/seo-optimizer/old-file.js
  12:15:10 ERR [seo-optimizer/checkout.js] Payment failed: invalid token
  12:15:12 ⟳ theme/my-theme/templates/product.liquid

Files are served directly from your machine on demand — no file uploads, no extra subdomains. Preview at your normal shop URL.

shopswired init

Scaffold a new plugin or theme directory with a manifest and starter files.

# Create a new theme
shopswired init --type theme --id my-theme

# Create a new plugin with a custom display name
shopswired init --type plugin --id analytics-pro --name "Analytics Pro"

What it creates:

# Theme scaffold
themes/my-theme/
├── manifest.json
├── templates/
│   ├── layout.liquid
│   └── index.liquid
└── css/
    └── main.css

# Plugin scaffold
plugins/analytics-pro/
├── manifest.json
└── main.js

shopswired pull

Download plugin or theme files from the shop to your local workspace.

# Pull a plugin
shopswired pull --type plugin --id seo-optimizer

# Pull a theme
shopswired pull --type theme --id default

# Custom output directory
shopswired pull --type plugin --id my-plugin --dir ./src/my-plugin

Files are saved to plugins/<id>/ or themes/<id>/ by default.

Note: Private plugins you don't own will return a 403 error.

shopswired push

Zip a local plugin or theme directory and install it on the shop permanently. This mirrors the "Install From Zip" functionality in the web dashboard.

# Push a plugin
shopswired push --type plugin --id my-plugin

# Push a theme
shopswired push --type theme --id my-theme

shopswired mcp

Start an MCP (Model Context Protocol) server for AI agent integration. Dev sessions are managed automatically — the AI never deals with tokens or session lifecycle.

shopswired mcp

Available tools for AI agents:

ToolDescription
sw_shop_infoGet shop info and list all installed plugins and themes
sw_list_filesList all file paths in a plugin or theme
sw_read_fileRead a single file's contents
sw_write_fileWrite/update a file in the dev overlay (session auto-managed)
sw_delete_fileDelete a file from the dev overlay (session auto-managed)
sw_get_logsGet recent plugin log output (filterable, supports pagination)
sw_preview_urlGet the storefront preview URL
sw_initInitialize a new plugin or theme in the dev session
sw_pushZip and permanently install a plugin or theme to the shop

Claude Desktop configuration (claude_desktop_config.json):

{
  "mcpServers": {
    "shopswired": {
      "command": "/path/to/shopswired",
      "args": ["mcp"]
    }
  }
}

Cursor / other MCP clients:

{
  "mcpServers": {
    "shopswired": {
      "command": "shopswired",
      "args": ["mcp"]
    }
  }
}

Typical AI workflow:

  1. Agent calls sw_shop_info to discover available plugins and themes
  2. Agent calls sw_list_files / sw_read_file to understand the codebase
  3. Agent calls sw_write_file to make changes (dev session created automatically on first write)
  4. Developer previews at the URL from sw_preview_url
  5. Agent calls sw_get_logs to check for errors
  6. Agent calls sw_push to permanently install changes when done

4. Configuration

The CLI stores its config at ~/.shopswired/config.json:

{
  "token": "eyJhbG...",
  "base_url": "https://app.shopswired.com",
  "shop_id": 12345,
  "shop_name": "My Dev Store"
}

This file is created automatically by shopswired login and updated by shopswired link.