hydrogen initcommand
Creates a new Hydrogen storefront.
Anchor to flagsFlags
The following flags are available for the hydrogen init
command:
- Anchor to --git--gitenv: SHOPIFY_HYDROGEN_FLAG_GIT
Init Git and create initial commits.
- Anchor to --install-deps--install-depsenv: SHOPIFY_HYDROGEN_FLAG_INSTALL_DEPS
Auto installs dependencies using the active package manager.
- Anchor to --language <value>--language <value>stringenv: SHOPIFY_HYDROGEN_FLAG_LANGUAGE
Sets the template language to use. One of
js
orts
.- Anchor to --markets <value>--markets <value>stringenv: 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 --mock-shop--mock-shopenv: SHOPIFY_HYDROGEN_FLAG_MOCK_DATA
Use mock.shop as the data source for the storefront.
- Anchor to --path <value>--path <value>stringenv: SHOPIFY_HYDROGEN_FLAG_PATH
The path to the directory of the new Hydrogen storefront.
- Anchor to --quickstart--quickstartenv: SHOPIFY_HYDROGEN_FLAG_QUICKSTART
Scaffolds a new Hydrogen project with a set of sensible defaults. Equivalent to
shopify hydrogen init --path hydrogen-quickstart --mock-shop --language js --shortcut --routes --markets none
- Anchor to --routes--routesenv: SHOPIFY_HYDROGEN_FLAG_ROUTES
Generate routes for all pages.
- Anchor to --shortcut--shortcutenv: SHOPIFY_HYDROGEN_FLAG_SHORTCUT
Creates a global h2 shortcut for Shopify CLI using shell aliases. Deactivate with
--no-shortcut
.- Anchor to --styling <value>--styling <value>stringenv: SHOPIFY_HYDROGEN_FLAG_STYLING
Sets the styling strategy to use. One of
tailwind
,vanilla-extract
,css-modules
,postcss
,none
.- Anchor to --template <value>--template <value>stringenv: SHOPIFY_HYDROGEN_FLAG_TEMPLATE
Scaffolds project based on an existing template or example from the Hydrogen repository.
- Anchor to -f, --force-f, --forceenv: SHOPIFY_HYDROGEN_FLAG_FORCE
Overwrites the destination directory and files if they already exist.
hydrogeninit
- --git
Init Git and create initial commits.
""
- --install-deps
Auto installs dependencies using the active package manager.
""
- --language <value>
Sets the template language to use. One of `js` or `ts`.
string
- --markets <value>
Sets the URL structure to support multiple markets. Must be one of: `subfolders`, `domains`, `subdomains`, `none`. Example: `--markets subfolders`.
string
- --mock-shop
Use mock.shop as the data source for the storefront.
""
- --path <value>
The path to the directory of the new Hydrogen storefront.
string
- --quickstart
Scaffolds a new Hydrogen project with a set of sensible defaults. Equivalent to `shopify hydrogen init --path hydrogen-quickstart --mock-shop --language js --shortcut --routes --markets none`
""
- --routes
Generate routes for all pages.
""
- --shortcut
Creates a global h2 shortcut for Shopify CLI using shell aliases. Deactivate with `--no-shortcut`.
""
- --styling <value>
Sets the styling strategy to use. One of `tailwind`, `vanilla-extract`, `css-modules`, `postcss`, `none`.
string
- --template <value>
Scaffolds project based on an existing template or example from the Hydrogen repository.
string
- -f, --force
Overwrites the destination directory and files if they already exist.
""
export interface hydrogeninit {
/**
* Overwrites the destination directory and files if they already exist.
* @environment SHOPIFY_HYDROGEN_FLAG_FORCE
*/
'-f, --force'?: ''
/**
* Init Git and create initial commits.
* @environment SHOPIFY_HYDROGEN_FLAG_GIT
*/
'--git'?: ''
/**
* Auto installs dependencies using the active package manager.
* @environment SHOPIFY_HYDROGEN_FLAG_INSTALL_DEPS
*/
'--install-deps'?: ''
/**
* Sets the template language to use. One of `js` or `ts`.
* @environment SHOPIFY_HYDROGEN_FLAG_LANGUAGE
*/
'--language <value>'?: string
/**
* Sets the URL structure to support multiple markets. Must be one of: `subfolders`, `domains`, `subdomains`, `none`. Example: `--markets subfolders`.
* @environment SHOPIFY_HYDROGEN_FLAG_I18N
*/
'--markets <value>'?: string
/**
* Use mock.shop as the data source for the storefront.
* @environment SHOPIFY_HYDROGEN_FLAG_MOCK_DATA
*/
'--mock-shop'?: ''
/**
* The path to the directory of the new Hydrogen storefront.
* @environment SHOPIFY_HYDROGEN_FLAG_PATH
*/
'--path <value>'?: string
/**
* Scaffolds a new Hydrogen project with a set of sensible defaults. Equivalent to `shopify hydrogen init --path hydrogen-quickstart --mock-shop --language js --shortcut --routes --markets none`
* @environment SHOPIFY_HYDROGEN_FLAG_QUICKSTART
*/
'--quickstart'?: ''
/**
* Generate routes for all pages.
* @environment SHOPIFY_HYDROGEN_FLAG_ROUTES
*/
'--routes'?: ''
/**
* Creates a global h2 shortcut for Shopify CLI using shell aliases. Deactivate with `--no-shortcut`.
* @environment SHOPIFY_HYDROGEN_FLAG_SHORTCUT
*/
'--shortcut'?: ''
/**
* Sets the styling strategy to use. One of `tailwind`, `vanilla-extract`, `css-modules`, `postcss`, `none`.
* @environment SHOPIFY_HYDROGEN_FLAG_STYLING
*/
'--styling <value>'?: string
/**
* Scaffolds project based on an existing template or example from the Hydrogen repository.
* @environment SHOPIFY_HYDROGEN_FLAG_TEMPLATE
*/
'--template <value>'?: string
}
Hydrogen init
examples
hydrogen init
hydrogen init
shopify hydrogen init [flags]