Extend your Turborepo with new apps and packages.

turbo generate

For more information and practical use cases for writing custom generators, visit the "Generating code" guide.

Good to know:

turbo gen is an alias for turbo generate. Additionally, run is the default command so turbo gen is equivalent to turbo generate run.

run [generator-name]

Run custom generators defined in your repository.

turbo gen run [generator-name]

Flag options


Answers to pass directly to the generator's prompts.

--config <path>

Generator configuration file.

Default: turbo/generators/config.js

--root <path>

The root of your repository

Default: directory with root turbo.json


Create a new workspace.

turbo gen workspace [options]

Flag options

--name <name>

The name for the new workspace to be used in the package.json name key. The name key is the unique identifier for the package in your repository.


Creates an empty workspace. Defaults to true.

--copy <name>/<url>

Name of local workspace within your monorepo or a fully qualified GitHub URL with any branch and/or subdirectory.

--destination <path>

Where the new workspace should be created.

--type <app/package>

The type of workspace to create (app or package).

--root <path>

The root of your repository. Defaults to the directory of the root turbo.json.


Prevent filtering dependencies by workspace type when selecting dependencies to add.

--example-path <path>, -p <path>

In a rare case, your GitHub URL might contain a branch name with a slash (e.g. bug/fix-1) and the path to the example (e.g. foo/bar). In this case, you must specify the path to the example separately.


Total Compute Saved
Get started with
Remote Caching →

On this page