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:
- shopswired-windows-amd64.exe (x86_64)
- shopswired-windows-arm64.exe (ARM64)
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 dev3. Commands
shopswired login
Authenticates using a secure device authorization flow — no passwords in the terminal.
- The CLI generates a code (e.g.
A1B2-C3D4) and opens your browser - Log in normally (password, passkey, 2FA — whatever you have)
- Approve the code in the browser
- CLI receives a token and saves it to
~/.shopswired/config.json
shopswired loginshopswired 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/andthemes/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.erroroutput to your terminal - Press
Ctrl+Cto 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.cssTerminal 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.liquidFiles 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.jsshopswired 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-pluginFiles 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-themeshopswired 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 mcpAvailable tools for AI agents:
| Tool | Description |
|---|---|
sw_shop_info | Get shop info and list all installed plugins and themes |
sw_list_files | List all file paths in a plugin or theme |
sw_read_file | Read a single file's contents |
sw_write_file | Write/update a file in the dev overlay (session auto-managed) |
sw_delete_file | Delete a file from the dev overlay (session auto-managed) |
sw_get_logs | Get recent plugin log output (filterable, supports pagination) |
sw_preview_url | Get the storefront preview URL |
sw_init | Initialize a new plugin or theme in the dev session |
sw_push | Zip 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:
- Agent calls
sw_shop_infoto discover available plugins and themes - Agent calls
sw_list_files/sw_read_fileto understand the codebase - Agent calls
sw_write_fileto make changes (dev session created automatically on first write) - Developer previews at the URL from
sw_preview_url - Agent calls
sw_get_logsto check for errors - Agent calls
sw_pushto 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.