Registry / crm-productivity / shopify

shopify

JSON →
library3.93.2jsnpmunverified

The Shopify CLI is an official command-line interface tool designed to streamline development for the Shopify platform. It provides a unified set of commands for building, testing, and deploying Shopify applications, themes, and custom functions. Currently stable at version 3.93.2, the CLI maintains a rapid release cadence, often seeing minor version updates weekly or bi-weekly, reflecting active development and continuous feature integration. Its key differentiators include tight integration with the Shopify ecosystem, support for multiple development paradigms (Hydrogen, App Extensions, Themes, Functions), and features like hot-reloading for themes and local development environments for apps, significantly enhancing developer productivity within the Shopify platform. It acts as the primary interface for managing project lifecycle from initialization to deployment for both partners and merchants.

npm install shopify
INSTALL
IMPORT
SIG · SHOPIFY
S
shopify
crm-productivityjavascriptv3.93.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

This quickstart demonstrates how to initialize a new Shopify application using `shopify app init` and then run it locally with `shopify app dev`. It also outlines how to start theme development and deploy an app.

// Initialize a new Shopify application (e.g., Remix app with Hydrogen frontend) // This command will guide you through setting up a new project. // Replace 'my-shopify-app' with your desired project name. // For non-interactive init, use 'shopify app init --name my-shopify-app --template remix --language typescript --verbose' console.log("Initializing a new Shopify app..."); await new Promise(resolve => setTimeout(resolve, 1000)); // Simulate CLI delay console.log("> shopify app init"); // Follow prompts to select app type (e.g., Shopify App), framework (e.g., Remix, Next.js), and language. // After initialization, navigate into the project directory: // cd my-shopify-app console.log("\nStarting local development server for the app..."); await new Promise(resolve => setTimeout(resolve, 1000)); // Simulate CLI delay console.log("> shopify app dev"); // This command starts a local development server, proxies requests to your app, // and sets up tunneling for webhooks and redirects, allowing you to test your // app directly against a Shopify development store. It also provides a Dev Console. console.log("\nAlternatively, for theme development:"); await new Promise(resolve => setTimeout(resolve, 1000)); // Simulate CLI delay console.log("> shopify theme init --store your-store-name.myshopify.com"); // This command will prompt you to select a theme from your store or create a new one. // You can then develop it locally: // cd your-theme-name // shopify theme dev --store your-store-name.myshopify.com console.log("\nTo deploy an app:"); await new Promise(resolve => setTimeout(resolve, 1000)); // Simulate CLI delay console.log("> shopify app deploy"); // This command deploys your Shopify app to your partner account.
shopify --version
Debug
Known issues
breakingThe `shopify hydrogen init` command no longer supports the `--routes` flag. Routes are now automatically scaffolded by default during project initialization, removing the need for manual configuration via this flag.
fix
Remove the `--routes` flag from your `shopify hydrogen init` command invocations. Routes will be automatically generated as part of the new project setup.
affects: >=3.91.1
gotchaThe Shopify CLI has a strict Node.js version requirement. Older Node.js versions (e.g., <20.10.0) are not supported and will prevent the CLI from running or cause unexpected behavior.
fix
Ensure your Node.js environment meets the minimum requirement of `>=20.10.0`. Use a Node.js version manager like `nvm` to easily switch and manage Node.js versions: `nvm install 20 && nvm use 20`.
affects: >=3.0.0
gotchaWhen re-authenticating using `shopify store auth`, existing granted scopes are now preserved by default. This change prevents unintended scope reductions during re-authentication, maintaining your app's existing permissions.
fix
Be aware that re-authenticating with `shopify store auth` will preserve your existing granted scopes. If you intend to modify scopes, ensure you understand the implications or consult the Shopify CLI documentation for advanced authentication options.
affects: >=3.93.1
gotchaThe `shopify app dev` command now features an integrated Dev Console that renders directly within the Shopify admin interface. This changes the debugging and monitoring workflow by providing a more integrated experience.
fix
Familiarize yourself with the new Dev Console in the Shopify admin when using `shopify app dev` for debugging and monitoring your app's local development activities. Access it directly from your development store's admin panel.
affects: >=3.91.0
deprecatedOlder authentication patterns could lead to `401 Unauthorized errors` on cart AJAX endpoints during `shopify theme dev`. This issue has been addressed in recent CLI versions.
fix
Upgrade to Shopify CLI version 3.91.0 or newer to resolve `401 Unauthorized` errors on cart AJAX endpoints during theme development, as fixes for this issue were included in that release.
affects: <3.91.0
Errors
Common errors & fixes
Error: The current Node.js version is X.Y.Z. Shopify CLI requires Node.js >= 20.10.0.
The installed Node.js version does not meet the minimum requirement for Shopify CLI.
fix
Upgrade Node.js to version 20.10.0 or higher. Use `nvm install 20 && nvm use 20` or your preferred Node.js version manager.
shopify: command not found
The Shopify CLI executable is not in your system's PATH, or it was not installed globally.
fix
Ensure you have installed the CLI globally using `npm install -g @shopify/cli` or `yarn global add @shopify/cli` and that your npm/yarn global bin directory is included in your system's PATH.
You are not logged in. Run "shopify login" to authenticate.
The Shopify CLI is not authenticated with a Shopify partner account or a specific development store.
fix
Run `shopify login` to authenticate with your Shopify Partner account, or `shopify auth login --store your-store-name.myshopify.com` to authenticate with a specific development store.
Error: EACCES: permission denied, mkdir '/Users/youruser/.shopify'
Insufficient permissions to create necessary directories or files for the CLI's configuration or cache in your user home directory.
fix
Adjust permissions for the `.shopify` directory in your home folder. For example, `sudo chown -R $(whoami) ~/.shopify` can fix ownership issues. Avoid `chmod 777` unless you understand the security implications.
Upgrade
Version history
3.93.2latest on npm
Audit
Dependencies
Node.jsrequiredThe Shopify CLI requires Node.js version >=20.10.0 to run. This is a strict runtime dependency for executing CLI commands.
Agent activity
41 hits · last 30 days
node
38
OpenAI (training)
1
Resources
shopify — npm install shopify · libregistry