{"id":16900,"library":"shopify","title":"Shopify CLI","description":"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.","status":"active","version":"3.93.2","language":"javascript","source_language":"en","source_url":"https://github.com/Shopify/cli","tags":["javascript","shopify","shopify-cli","shopify-partners"],"install":[{"cmd":"npm install shopify","lang":"bash","label":"npm"},{"cmd":"yarn add shopify","lang":"bash","label":"yarn"},{"cmd":"pnpm add shopify","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"The Shopify CLI requires Node.js version >=20.10.0 to run. This is a strict runtime dependency for executing CLI commands.","package":"Node.js","optional":false}],"imports":[],"quickstart":{"code":"// Initialize a new Shopify application (e.g., Remix app with Hydrogen frontend)\n// This command will guide you through setting up a new project.\n// Replace 'my-shopify-app' with your desired project name.\n// For non-interactive init, use 'shopify app init --name my-shopify-app --template remix --language typescript --verbose'\nconsole.log(\"Initializing a new Shopify app...\");\nawait new Promise(resolve => setTimeout(resolve, 1000)); // Simulate CLI delay\nconsole.log(\"> shopify app init\");\n// Follow prompts to select app type (e.g., Shopify App), framework (e.g., Remix, Next.js), and language.\n// After initialization, navigate into the project directory:\n// cd my-shopify-app\n\nconsole.log(\"\\nStarting local development server for the app...\");\nawait new Promise(resolve => setTimeout(resolve, 1000)); // Simulate CLI delay\nconsole.log(\"> shopify app dev\");\n// This command starts a local development server, proxies requests to your app,\n// and sets up tunneling for webhooks and redirects, allowing you to test your\n// app directly against a Shopify development store. It also provides a Dev Console.\n\nconsole.log(\"\\nAlternatively, for theme development:\");\nawait new Promise(resolve => setTimeout(resolve, 1000)); // Simulate CLI delay\nconsole.log(\"> shopify theme init --store your-store-name.myshopify.com\");\n// This command will prompt you to select a theme from your store or create a new one.\n// You can then develop it locally:\n// cd your-theme-name\n// shopify theme dev --store your-store-name.myshopify.com\n\nconsole.log(\"\\nTo deploy an app:\");\nawait new Promise(resolve => setTimeout(resolve, 1000)); // Simulate CLI delay\nconsole.log(\"> shopify app deploy\");\n// This command deploys your Shopify app to your partner account.","lang":"typescript","description":"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."},"warnings":[{"fix":"Remove the `--routes` flag from your `shopify hydrogen init` command invocations. Routes will be automatically generated as part of the new project setup.","message":"The `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.","severity":"breaking","affected_versions":">=3.91.1"},{"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`.","message":"The 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.","severity":"gotcha","affected_versions":">=3.0.0"},{"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.","message":"When 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.","severity":"gotcha","affected_versions":">=3.93.1"},{"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.","message":"The `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.","severity":"gotcha","affected_versions":">=3.91.0"},{"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.","message":"Older 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.","severity":"deprecated","affected_versions":"<3.91.0"}],"env_vars":null,"last_verified":"2026-04-22T00:00:00.000Z","next_check":"2026-07-21T00:00:00.000Z","problems":[{"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.","cause":"The installed Node.js version does not meet the minimum requirement for Shopify CLI.","error":"Error: The current Node.js version is X.Y.Z. Shopify CLI requires Node.js >= 20.10.0."},{"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.","cause":"The Shopify CLI executable is not in your system's PATH, or it was not installed globally.","error":"shopify: command not found"},{"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.","cause":"The Shopify CLI is not authenticated with a Shopify partner account or a specific development store.","error":"You are not logged in. Run \"shopify login\" to authenticate."},{"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.","cause":"Insufficient permissions to create necessary directories or files for the CLI's configuration or cache in your user home directory.","error":"Error: EACCES: permission denied, mkdir '/Users/youruser/.shopify'"}],"ecosystem":"npm","meta_description":null}