---
title: hydrogen generate route
description: Generates a set of default routes from the starter template.
source_url:
  html: 'https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-generate-route'
  md: 'https://shopify.dev/docs/api/shopify-cli/hydrogen/hydrogen-generate-route.md'
api_name: shopify-cli
---

# hydrogen generate route

Generates a set of default routes from the starter template.

#### Flags

The following flags are available for the `hydrogen generate route` command:

* **--adapter \<value>**

  **string**

  **env: SHOPIFY\_HYDROGEN\_FLAG\_ADAPTER**

  React Router adapter used in the route. The default is `react-router`.

* **--locale-param \<value>**

  **string**

  **env: SHOPIFY\_HYDROGEN\_FLAG\_ADAPTER**

  The param name in Remix routes for the i18n locale, if any. Example: `locale` becomes ($locale).

* **--path \<value>**

  **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.

* **--typescript**

  **env: SHOPIFY\_HYDROGEN\_FLAG\_TYPESCRIPT**

  Generate TypeScript files

* **-f, --force**

  **env: SHOPIFY\_HYDROGEN\_FLAG\_FORCE**

  Overwrites the destination directory and files if they already exist.

Examples

### Examples

* ####

  ##### hydrogen generate route

  ```sh
  shopify hydrogen generate route [flags]
  ```

***
