--- title: hydrogen codegen description: Automatically generates GraphQL types for your project’s Storefront API queries. api_name: shopify-cli source_url: html: https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-codegen md: https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-codegen.md --- # hydrogen codegencommand Automatically generates GraphQL types for your project’s Storefront API queries. ## Flags The following flags are available for the `hydrogen codegen` command: * \--codegen-config-path \ string Specify a path to a codegen configuration file. Defaults to `/codegen.ts` if it exists. * \--path \ string env: SHOPIFY\_HYDROGEN\_FLAG\_PATH The path to the directory of the Hydrogen storefront. Defaults to the current directory where the command is run. * \--watch Watch the project for changes to update types on file save. ### Examples * #### hydrogen codegen ##### hydrogen codegen ```bash shopify hydrogen codegen [flags] ```