Back to Turborepo

create-turbo

apps/docs/content/docs/reference/create-turbo.mdx

2.10.83.3 KB
Original Source

The easiest way to get started with Turborepo is by using create-turbo. Use this CLI tool to quickly start building a new monorepo, with everything set up for you.

<PackageManagerTabs> <Tab value="pnpm"> ```bash title="Terminal" pnpm dlx create-turbo@latest ``` </Tab> <Tab value="yarn"> ```bash title="Terminal" yarn dlx create-turbo@latest ``` </Tab> <Tab value="npm"> ```bash title="Terminal" npx create-turbo@latest ``` </Tab> <Tab value="bun"> ```bash title="Terminal" bunx create-turbo@latest ``` </Tab> </PackageManagerTabs>

Start with an example

The community curates a set of examples to showcase ways to use common tools and libraries with Turborepo. To bootstrap your monorepo with one of the examples, use the --example flag:

<PackageManagerTabs> <Tab value="pnpm"> ```bash title="Terminal" pnpm dlx create-turbo@latest --example [example-name] ``` </Tab> <Tab value="yarn"> ```bash title="Terminal" yarn dlx create-turbo@latest --example [example-name] ``` </Tab> <Tab value="npm"> ```bash title="Terminal" npx create-turbo@latest --example [example-name] ``` </Tab> <Tab value="bun"> ```bash title="Terminal" bunx create-turbo@latest --example [example-name] ``` </Tab> </PackageManagerTabs>

Use any of the example's names below:

Core-maintained examples

The following examples are maintained by the Turborepo core team. Dependencies are kept as up-to-date as possible and GitHub Issues are accepted and addressed for these examples.

<ExamplesTable coreMaintained />

Community-maintained examples

The community curates a set of examples to showcase ways to use common tools and libraries with Turborepo. To bootstrap your monorepo with one of the examples, use the --example flag:

<ExamplesTable />

Use a community example

You can also use a custom starter or example by using a GitHub URL. This is useful for using your own custom starters or examples from the community.

<PackageManagerTabs> <Tab value="pnpm"> ```bash title="Terminal" pnpm dlx create-turbo@latest --example [github-url] ``` </Tab> <Tab value="yarn"> ```bash title="Terminal" yarn dlx create-turbo@latest --example [github-url] ``` </Tab> <Tab value="npm"> ```bash title="Terminal" npx create-turbo@latest --example [github-url] ``` </Tab> <Tab value="bun"> ```bash title="Terminal" bunx create-turbo@latest --example [github-url] ``` </Tab> </PackageManagerTabs>

Options

txt
-m, --package-manager to use (choices: "npm", "yarn", "pnpm", "bun")

--skip-install: Do not run a package manager install after creating the project (Default: false)

--skip-transforms: Do not run any code transformation after creating the project (Default: false)

--turbo-version <version>: Use a specific version of turbo (default: latest)

-e, --example [name]|[github-url]: An example to bootstrap the app with. You can use an example name from the official Turborepo repo or a GitHub URL. The URL can use any branch and/or subdirectory

-p, --example-path <path-to-example>: 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

-v, --version:  Output the current version

-h, --help: Display help for command