Skip to content

Installation

Get started with Turborepo in a few moments using:

Terminal
pnpm dlx create-turbo@latest
Terminal
yarn dlx create-turbo@latest
Terminal
npx create-turbo@latest
Terminal
bunx create-turbo@latest
Terminal
nubx create-turbo@latest
Terminal
aubx create-turbo@latest

The starter repository will have:

  • Two deployable applications
  • Three shared libraries for use in the rest of the monorepo

For more details on the starter, visit the README for the basic starter on GitHub. You can also use an example that more closely fits your tooling interests.

Installing turbo

You can install turbo globally and pin a version in your repository. When a local binary is installed, the global binary defers to it.

Global installation

A global install of turbo brings flexibility and speed to your local workflows.

Terminal
curl -fsSL https://turborepo.dev/install | sh
PowerShell
irm https://turborepo.dev/install.ps1 | iex

See the support policy for supported platforms.

The binaries are also available directly in the GitHub release assets, starting with 2.11.5. To install an older version, use your package manager.

After installing turbo, you can run commands from your terminal. For example:

  • turbo build: Run build scripts following your repository's dependency graph
  • turbo build --filter=docs --dry: Quickly print an outline of the build task for your docs package (without running it)
  • turbo generate: Run Generators to add new code to your repository
  • cd apps/docs && turbo build: Run the build script in the docs package and its dependencies. For more, visit the Automatic Package Scoping section.

turbo is an alias for turbo run. For example, turbo build and turbo run build will both run your build task.

Using global turbo in CI

To use the global binary in CI, see Constructing CI.

Repository installation

To pin the turbo version used in a repository, add it as a devDependency at the root:

Terminal
pnpm add turbo --save-dev --ignore-workspace-root-check
Terminal
yarn add turbo --dev --ignore-workspace-root-check
Terminal
npm install turbo --save-dev
Terminal
bun install turbo --dev
Terminal
nub add turbo --save-dev
Terminal
aube add turbo --save-dev

When you invoke the global binary from this repository, it uses the installed local version instead.