# 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. ## Install Save in your project root: ## Quick Use ```bash # Create a new monorepo npx create-turbo@latest my-monorepo # Or add to existing project npm install turbo --save-dev ``` ```json // turbo.json { "tasks": { "build": { "dependsOn": ["^build"], "outputs": ["dist/**"] }, "test": { "dependsOn": ["build"] }, "lint": {}, "dev": { "cache": false, "persistent": true } } } ``` ```bash 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: ```bash 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 ```json { "tasks": { "build": { "dependsOn": ["^build"], "outputs": ["dist/**", ".next/**"] }, "test": { "dependsOn": ["build"], "inputs": ["src/**", "test/**"] }, "deploy": { "dependsOn": ["build", "test"], "cache": false } } } ``` ### Environment Variable Handling ```json { "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](https://github.com/vercel). Licensed under MIT. > > [turborepo](https://github.com/vercel/turborepo) — ⭐ 28,000+ Thanks to Vercel for making monorepo builds fast. --- ## 快速使用 ```bash npx create-turbo@latest my-monorepo turbo build # 增量构建,自动缓存 ``` --- ## 简介 Turborepo 是 Vercel 推出的 JS/TS Monorepo 增量构建系统,GitHub 28,000+ stars。本地和远程缓存构建输出,并行执行任务。典型构建从 10 分钟降至 30 秒。适合多包仓库需要更快 CI 和本地构建的团队。 --- ## 来源与感谢 > Created by [Vercel](https://github.com/vercel). Licensed under MIT. > > [turborepo](https://github.com/vercel/turborepo) — ⭐ 28,000+ --- Source: https://tokrepo.com/en/workflows/58b13fe8-ccbd-4084-97e4-ca8e053b4030 Author: AI Open Source