---
title: Installing Turborepo
description: Learn how to install Turborepo for use with your repository
---

import { Callout } from "../../../components/Callout";
import { Tabs, Tab } from '../../../components/Tabs'

# Install Turborepo

`turbo` works with [yarn](https://classic.yarnpkg.com/lang/en/), [npm](https://www.npmjs.com/), and [pnpm](https://pnpm.io/) on the following operating systems:

- macOS darwin 64-bit (Intel), ARM 64-bit (Apple Silicon)
- Linux 64-bit, ARM 64-bit
- Windows 64-bit, ARM 64-bit

## Install Globally

A global install of `turbo` can be used in any project, and enables automatic workspace
selection based on the directory where you run `turbo`.

<Tabs items={['npm', 'yarn', 'pnpm']} storageKey="selected-pkg-manager">
  <Tab>
    ```bash
    npm install turbo --global
    ```
  </Tab>
  <Tab>
    ```bash
    yarn global add turbo
    ```
  </Tab>
  <Tab>
    ```bash
    pnpm install turbo --global
    ```
  </Tab>
</Tabs>

Once you have a globally installed copy of `turbo`, you will be able to run directly from workspace
directories.

```bash
cd <repository root>/apps/docs
turbo build
```

is equivalent to the [filtering syntax](../docs/core-concepts/monorepos/filtering):

```bash
cd <repository root>
turbo build --filter=docs
```

If you've installed global `turbo` before, make sure you use the same package manager as your existing installation to avoid unexpected behaviors. For more info, [visit the FAQ](/repo/docs/faq#should-i-install-turborepo-globally).

## Install Per Repository

You may wish to pin the version of Turborepo used within a repository, especially [if you are
collaborating with other developers](../docs/core-concepts/remote-caching). In that case, add `turbo` as a dev dependency at the root
of the repository:

<Tabs items={['npm', 'yarn', 'pnpm']} storageKey="selected-pkg-manager">
  <Tab>
    ```bash
    npm install turbo --save-dev
    ```
  </Tab>
  <Tab>
    ```bash
    yarn add turbo --dev --ignore-workspace-root-check
    ```
  </Tab>
  <Tab>
    ```bash
    pnpm add turbo --save-dev --ignore-workspace-root-check
    ```
  </Tab>
</Tabs>

You can continue to use your global install of `turbo`, which will defer to your local version
if it exists. This allows you to get the best of both worlds: easy scoping to the directory you're working
in while maintaining a pinned version among your entire team.
