shopctl is a CLI for managing Shopify stores. Products, inventory, metafields, orders, and CSV operations — all from your terminal with --json output for scripting.
The killer feature: CSV workflows that don't blow up in your face. Validate before import, auto-fix common issues, diff against your live store, and dry-run everything.
Think of it as gh but for Shopify.
# Global install
npm install -g shopctl
# Or run locally
git clone https://github.com/joeynyc/shopctl.git
cd shopctl
npm install
node bin/shopctl.js --help# Interactive auth (prompts for store URL + API token)
shopctl auth
# Multiple stores
shopctl auth --profile staging
shopctl auth --profile production
shopctl --profile staging storeCredentials are stored at ~/.shopctl/config.json.
The #1 pain point on Reddit and Shopify forums: CSV import is a nightmare. Cryptic errors, silent failures, variant structures that break for no reason.
shopctl makes it transparent:
shopctl csv validate products.csv # "3 errors on lines 12, 45, 89"
shopctl csv fix products.csv -o fixed.csv # "fixed 8 issues automatically"
shopctl csv validate fixed.csv # "clean ✅"
shopctl csv diff fixed.csv # "here's what will change vs your live store"
shopctl csv import fixed.csv --dry-run # "rehearsal: 47 products, 12 updates, 0 deletes"
shopctl csv import fixed.csv # "done, 47 products imported"Step by step, no surprises.
- BOM encoding issues
- Missing required fields (fills with safe defaults)
- Handle deduplication
- Price formatting (strips currency symbols, normalizes decimals)
- Dead image URL detection
- Published/status field normalization
shopctl products list --status active --vendor Acme
shopctl products get 1234567890
shopctl products create --title "New Tee" --price 29.99 --sku TEE-001
shopctl products update 1234567890 --price 39.99 --status draft
shopctl products delete 1234567890
shopctl products search "TEE"
shopctl products bulk-update --file updates.jsonshopctl csv validate products.csv
shopctl csv fix products.csv -o fixed.csv
shopctl csv export --format shopify -o products.csv
shopctl csv import products.csv --dry-run
shopctl csv import products.csv --overwrite
shopctl csv diff products.csvshopctl inventory list
shopctl inventory list --location "Main Warehouse"
shopctl inventory set SKU-123 25 --location "Main Warehouse"
shopctl inventory adjust SKU-123 -2 --reason "damaged"
shopctl inventory sync --file inventory.csvshopctl metafields list product 1234567890
shopctl metafields set product 1234567890 --namespace custom --key subtitle --value "Hello" --type single_line_text_field
shopctl metafields delete product 1234567890 9999999999
shopctl metafields export product -o metafields.jsonshopctl orders list --status open --limit 50
shopctl orders get 1234567890
shopctl orders fulfill 1234567890 --tracking 1Z999 --carrier UPSshopctl store # Store info + API usage| Flag | Description |
|---|---|
--profile <name> |
Select credential profile (default: default) |
--json |
Output JSON (pipe into jq, scripts, automations) |
--csv |
Output CSV where supported |
--dry-run |
Preview destructive operations without executing |
shopctl pairs with CSV Cleaner Agent for AI-powered cleaning before Shopify import:
CSV Cleaner Agent (AI profiling + smart fixes) → shopctl (Shopify validation + import)
The AI handles messy, unpredictable data issues. shopctl handles exact Shopify schema compliance. See the CSVCleanerAgent pipeline docs for setup.
--dry-runon all destructive operations- Clear error messages with recovery suggestions
- Automatic rate limit handling with exponential backoff
- No writes without explicit confirmation
# Run tests
npm test
# Check syntax
node --check bin/shopctl.js src/index.jsMIT
Built for merchants who are tired of Shopify's CSV import breaking silently.