Installation
Get started with Turborepo in a few moments using:
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.
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: Runbuildscripts following your repository's dependency graphturbo build --filter=docs --dry: Quickly print an outline of thebuildtask for yourdocspackage (without running it)turbo generate: Run Generators to add new code to your repositorycd apps/docs && turbo build: Run thebuildscript in thedocspackage 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:
When you invoke the global binary from this repository, it uses the installed local version instead.