ConfigsApr 6, 2026·2 min read

Turborepo — High-Performance JS/TS Monorepo Build System

Incremental build system for JavaScript and TypeScript monorepos by Vercel. Remote caching, parallel execution, and zero-config setup. Never rebuild unchanged packages. 28,000+ stars.

AI
AI Open Source · Community
Quick Use

Use it first, then decide how deep to go

This block should tell both the user and the agent what to copy, install, and apply first.

# Create a new monorepo
npx create-turbo@latest my-monorepo

# Or add to existing project
npm install turbo --save-dev
// turbo.json
{
  "tasks": {
    "build": { "dependsOn": ["^build"], "outputs": ["dist/**"] },
    "test": { "dependsOn": ["build"] },
    "lint": {},
    "dev": { "cache": false, "persistent": true }
  }
}
turbo build  # Builds all packages in dependency order
turbo test   # Runs tests, skips cached results

Intro

Turborepo is an incremental build system for JavaScript and TypeScript monorepos by Vercel with 28,000+ GitHub stars. It caches build outputs locally and remotely so you never rebuild unchanged packages, runs tasks in parallel across all CPU cores, and understands your dependency graph automatically. A typical monorepo build drops from 10 minutes to 30 seconds after the first run. Best for teams with multi-package repos who want faster CI and local builds. Works with: npm, yarn, pnpm, any JS/TS project. Setup time: under 5 minutes.


Core Features

Incremental Builds

Turborepo fingerprints every package by its inputs (source code, dependencies, env vars). If nothing changed, it replays the cached output:

$ turbo build
• Packages in scope: web, api, ui, utils
• Running build in 4 packages
  ✓ @repo/utils — cache hit, replaying output
  ✓ @repo/ui — cache hit, replaying output
  ✓ @repo/api — cache hit, replaying output
  ✓ @repo/web — building... done (3.2s)
Total: 3.2s (3 cached, 1 built)

Remote Caching

Share build caches across your entire team and CI:

npx turbo login
npx turbo link
# Now CI builds reuse your local cached outputs and vice versa

Parallel Execution

Tasks run in parallel respecting the dependency graph:

utils ─────► ui ──────► web
                  ├────► api
                  └────► docs
# utils builds first, then ui/api/docs in parallel, then web

Task Pipelines

{
  "tasks": {
    "build": {
      "dependsOn": ["^build"],
      "outputs": ["dist/**", ".next/**"]
    },
    "test": {
      "dependsOn": ["build"],
      "inputs": ["src/**", "test/**"]
    },
    "deploy": {
      "dependsOn": ["build", "test"],
      "cache": false
    }
  }
}

Environment Variable Handling

{
  "globalEnv": ["CI", "NODE_ENV"],
  "tasks": {
    "build": {
      "env": ["DATABASE_URL", "API_KEY"]
    }
  }
}

Key Stats

  • 28,000+ GitHub stars
  • By Vercel (acquired from Jared Palmer)
  • 10x faster builds with caching
  • Remote cache sharing across team
  • Works with npm, yarn, pnpm

FAQ

Q: What is Turborepo? A: Turborepo is an incremental build system that caches build outputs and runs tasks in parallel across JavaScript/TypeScript monorepo packages.

Q: Is Turborepo free? A: Yes, open-source under MIT. Remote caching is free on Vercel, self-hostable.

Q: Do I need to restructure my project? A: No, Turborepo works with any existing monorepo structure using npm/yarn/pnpm workspaces.


🙏

Source & Thanks

Created by Vercel. Licensed under MIT.

turborepo — ⭐ 28,000+

Thanks to Vercel for making monorepo builds fast.

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.