API Reference

turbo gen

Warning: This is an experimental command, so its name and behavior can change.

Extend your Turborepo with new apps, and packages. Create new empty workspaces, copy existing workspaces, add workspaces from remote sources or run custom generators defined using Plop configurations.

Note: The default command for generate is run.


Add a new package or app to your monorepo.



The name for the new workspace


Generate an empty workspace (default: true)

--copy [source]

Generate a workspace using an existing workspace as a template. Can be the name of a local workspace within your monorepo, or a fully qualified GitHub URL with any branch and/or subdirectory.


Where the new workspace should be created


The type of workspace to create (app or package)


The root of your repository (default: directory with root turbo.json)

--example-path / -p

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: --example-path foo/bar


When selecting dependencies to add to your new workspace, do not filter available dependencies by the selected workspace type (app or package)

run [generator-name]

Run custom generators within your monorepo. Optionally specify a generator name to directly run a specific generator.



Generator configuration file (default: turbo/generators/config.js)


The root of your repository (default: directory with root turbo.json)


Prompt answers passed directly to generator