turbo (Turborepo)
High-performance monorepo build system with smart caching — only rebuilds what actually changed.
turbo (Turborepo)
Node.jsHigh-performance monorepo build system with smart caching — only rebuilds what actually changed.
Fit
Bundle (gzip)
3.1 kB
8.1 kB raw
Install size includes transitive dependencies. Bundle size is gzipped browser payload.
Freshness
The Problem
As a codebase grows into multiple packages (a shared UI library, multiple apps, shared utils), managing builds becomes painful:
- Running
npm run buildrebuilds everything from scratch every time - CI pipelines take 10+ minutes even when only one package changed
- No standard way to define which tasks depend on which other tasks
- Running tests across all packages in the right order is manual
- Sharing cached results between team members or CI runs is hard
What It Does
Turborepo is a build system that understands the dependency graph of your monorepo. It caches task outputs (build artifacts, test results) and skips tasks whose inputs haven't changed. Cache hits are instant. Remote caching shares these cached results across your whole team and CI — so a build that took 10 minutes on one developer's machine is a cache hit for everyone else.
Installation
npm install turbo --save-dev
# or create a new monorepo:
npx create-turbo@latestUsage Example
turbo.json — define your task pipeline
{
"$schema": "https://turbo.build/schema.json",
"tasks": {
"build": {
"dependsOn": ["^build"],
"outputs": [".next/**", "dist/**"]
},
"test": {
"dependsOn": ["^build"],
"outputs": ["coverage/**"]
},
"lint": {
"outputs": []
},
"dev": {
"cache": false,
"persistent": true
}
}
}Run tasks across all packages
# Build everything (skips unchanged packages automatically)
npx turbo build
# Run tests only in packages that changed since last commit
npx turbo test --filter=[HEAD^1]
# Run multiple tasks in parallel
npx turbo build test lintpackage.json scripts with turbo
{
"scripts": {
"build": "turbo run build",
"dev": "turbo run dev",
"test": "turbo run test",
"lint": "turbo run lint"
}
}Enable remote caching (share cache with team + CI)
npx turbo login
npx turbo link
# Now CI builds use your team's shared cache — no redundant rebuildsRelated packages
Role and attribute based access control (RBAC + ABAC) for Node.js with a fluent, readable API.
bcryptjsNode.jsPure JavaScript bcrypt password hashing — no native dependencies, same API as bcrypt, works anywhere Node.js runs.
bullmqNode.jsPremium message queue and job scheduler for Node.js backed by Redis — reliable background job processing with retries, priorities, and rate limiting.
casbinNode.jsA powerful authorization library that supports RBAC, ABAC, ACL and more via configurable policy models.
dotenvNode.jsLoad environment variables from a `.env` file into `process.env` — the standard way to manage configuration in Node.js apps.