Hydrogen commands
Commands for Hydrogen custom storefronts: build, dev, deploy to Oxygen, codegen, environments, setup, and upgrades.
Commands for Hydrogen custom storefronts: build, dev, deploy to Oxygen, codegen, environments, setup, and upgrades.
Commands
shopify hydrogen build— Builds a Hydrogen storefront for production. The client and app worker files are compiled to a/distfolder in your Hydrogen project directory.shopify hydrogen check— Checks whether your Hydrogen app includes a set of standard Shopify routes.shopify hydrogen codegen— Automatically generates GraphQL types for your project’s Storefront API queries.shopify hydrogen customer-account-push— Push project configuration to adminshopify hydrogen debug cpu— Builds the app and runs the resulting code to profile the server startup time, watching for changes. This command can be used to debug slow app startup times that cause failed deployments in Oxygen.shopify hydrogen deploy— Builds and deploys your Hydrogen storefront to Oxygen. Requires an Oxygen deployment token to be set with the--tokenflag or an environment variable (SHOPIFY_HYDROGEN_DEPLOYMENT_TOKEN). If the storefront is linked then the Oxygen deployment token for the linked storefront will be used automatically.shopify hydrogen dev— Runs a Hydrogen storefront in a local runtime that emulates an Oxygen worker for development.shopify hydrogen env list— Lists all environments available on the linked Hydrogen storefront.shopify hydrogen env pull— Pulls environment variables from the linked Hydrogen storefront and writes them to an.envfile.shopify hydrogen env push— Push environment variables from the local .env file to your linked Hydrogen storefront.shopify hydrogen generate route— Generates a set of default routes from the starter template.shopify hydrogen generate routes— Generates all supported standard shopify routes.shopify hydrogen init— Creates a new Hydrogen storefront.shopify hydrogen link— Links your local development environment to a remote Hydrogen storefront. You can link an unlimited number of development environments to a single Hydrogen storefront.shopify hydrogen list— Lists all remote Hydrogen storefronts available to link to your local development environment.shopify hydrogen login— Logs in to the specified shop and saves the shop domain to the project.shopify hydrogen logout— Log out from the current shop.shopify hydrogen preview— Runs a server in your local development environment that serves your Hydrogen app's production build. Requires running the build command first.shopify hydrogen setup css— Adds support for certain CSS strategies to your project.shopify hydrogen setup markets— Adds support for multiple markets to your project by using the URL structure.shopify hydrogen setup vite— EXPERIMENTAL: Upgrades the project to use Vite.shopify hydrogen setup— Scaffold routes and core functionality.shopify hydrogen shortcut— Creates a global h2 shortcut for Shopify CLI using shell aliases.shopify hydrogen unlink— Unlinks your local development environment from a remote Hydrogen storefront.shopify hydrogen upgrade— Upgrade Hydrogen project dependencies, preview features, fixes and breaking changes. The command also generates an instruction file for each upgrade.