Weaverse LogoWeaverse
All Articles
Paul Phan
3 mins read

Using Shopify CLI for Bulk Operations (New Feature)

New Shopify CLI bulk operations feature lets you manage products, collections, and metafields at scale. Examples and best practices included.
Using Shopify CLI for Bulk Operations (New Feature)
Table of Contents

Using Shopify CLI for Bulk Operations (New Feature)

Shopify CLI 3.90.1 introduces powerful new commands that let you execute Admin API queries, mutations, and bulk operations directly from your terminal.

Bulk operations workflow in Shopify CLI
Bulk operations workflow in Shopify CLI

This is a game-changer for developers who need to script and automate data operations without building custom tooling.

Practical terminal-first workflow for release operations
Practical terminal-first workflow for release operations

New Commands

Standard API Queries

shopify app execute 'query { shop { name } }'

Run any GraphQL query or mutation against the Admin API.

Bulk Operations

# Start a bulk query
shopify app bulk execute 'query { products(first: 1000) { edges { node { id title } } } }'
# Watch progress synchronously
shopify app bulk execute 'query { ... }' --watch
# Check status of running operation
shopify app bulk status
# Cancel an operation
shopify app bulk cancel

Why This Matters

Before: Bulk operations required:

  • Custom scripts with polling logic
  • Error handling for long-running jobs
  • Complex state management

Now:

  • One CLI command
  • Optional --watch flag makes it synchronous
  • Perfect for automation and scripting

Practical Use Cases

1. Data Migration

Export all products to JSON in one command:

shopify app bulk execute 'query { products(first: 10000) { edges { node { id title handle } } } }' --watch > products.json

2. Bulk Updates

Update pricing across thousands of variants:

shopify app bulk execute 'mutation { productVariantsBulkUpdate(...) { ... } }'

3. AI Coding Agents

This is perfect for AI tools like Cursor, Claude, or GitHub Copilot. They can now query and manipulate dev stores without building custom integrations.

4. Scheduled Scripts

Use in cron jobs for daily operations:

# Daily inventory sync at 6 AM
0 6 * * * shopify app bulk execute 'query { inventoryItems(first: 1000) { ... } }' --watch > /var/log/inventory.json

5. CI/CD Pipelines

Integrate bulk operations into your deployment workflow:

  • Pre-deploy data validation
  • Post-deploy data seeding
  • Automated testing with real data

Pro Tips

  • Use --watch when you need results immediately (scripts, CI/CD)
  • Combine with jq for powerful JSON processing
  • Perfect for one-off fixes without building full apps
  • Great for prototyping bulk operations before implementing in code

Example: Bulk Tag Sync

shopify app bulk execute '
mutation bulkOperationRunMutation(
$mutation: MutationQuery!
$input: BulkOperationInput!
) {
bulkOperationRunMutation(mutation: $mutation, input: $input) {
bulkOperation { id status }
userErrors { field message }
}
}
' --watch

What This Unlocks

This feature removes the friction from bulk operations:

✅ No custom polling scripts ✅ No complex state management ✅ Easy automation with cron/CI ✅ AI agents can work with store data ✅ Quick one-off data fixes

Learn More

For complete documentation, see:

Bottom Line

This is one of those quality-of-life improvements that makes development significantly easier. If you work with Shopify data at scale, add these commands to your toolkit.

Building with Hydrogen? Weaverse helps you ship faster with AI-powered theme development. Get started.

Reactions

Like
Love
Celebrate
Insightful
Cool!
Thinking

Join the Discussion

Never miss an update

Subscribe to get the latest insights, tutorials, and best practices for building high-performance headless stores delivered to your inbox.

Join the community of developers building with Weaverse.