hydrogen setup
This command works with Hydrogen 2026-04 and earlier. Hydrogen 2026-10 doesn't support the command. In a Hydrogen 2026-10 project, use your framework's commands or the @shopify/hydrogen commands instead. To check which commands Hydrogen 2026-10 supports, refer to Shopify CLI Hydrogen commands.
This command works with Hydrogen 2026-04 and earlier. Hydrogen 2026-10 doesn't support the command. In a Hydrogen 2026-10 project, use your framework's commands or the @shopify/hydrogen commands instead. To check which commands Hydrogen 2026-10 supports, refer to Shopify CLI Hydrogen commands.
Scaffold routes and core functionality.
Anchor to flagsFlags
The following flags are available for the hydrogen setup command:
- Anchor to --install-deps--install-deps--install-depsenv: SHOPIFY_HYDROGEN_FLAG_INSTALL_DEPSenv: SHOPIFY_HYDROGEN_FLAG_INSTALL_DEPS
Auto installs dependencies using the active package manager.
- Anchor to --json-schema--json-schema--json-schemaenv: SHOPIFY_FLAG_JSON_SCHEMAenv: SHOPIFY_FLAG_JSON_SCHEMA
Print the command's JSON schemas.
- Anchor to --markets <value>--markets <value>--markets <value>stringstringenv: SHOPIFY_HYDROGEN_FLAG_I18Nenv: SHOPIFY_HYDROGEN_FLAG_I18N
Sets the URL structure to support multiple markets. Must be one of:
subfolders,domains,subdomains,none. Example:--markets subfolders.- Anchor to --path <value>--path <value>--path <value>stringstringenv: SHOPIFY_HYDROGEN_FLAG_PATHenv: SHOPIFY_HYDROGEN_FLAG_PATH
The path to the directory of the Hydrogen storefront. Defaults to the current directory where the command is run.
- Anchor to --shortcut--shortcut--shortcutenv: SHOPIFY_HYDROGEN_FLAG_SHORTCUTenv: SHOPIFY_HYDROGEN_FLAG_SHORTCUT
Creates a global h2 shortcut for Shopify CLI using shell aliases. Deactivate with
--no-shortcut.- Anchor to -f, --force-f, --force-f, --forceenv: SHOPIFY_HYDROGEN_FLAG_FORCEenv: SHOPIFY_HYDROGEN_FLAG_FORCE
Overwrites the destination directory and files if they already exist.
hydrogen setup
Examples
Hydrogen setup
hydrogen setup
shopify hydrogen setup [flags]