turborepo

Turborepo monorepo build system guidance. Triggers on: turbo.json, task pipelines, dependsOn, caching, remote cache, the "turbo" CLI, --filter, --affected, CI optimization, environment variables, internal packages, monorepo structure/best practices, and boundaries. Use when user: configures tasks/workflows/pipelines, creates packages, sets up monorepo, shares code between apps, runs changed/affected packages, debugs cache, or has apps/packages directories.

Install
npx skills add 'https://github.com/vercel/turborepo/tree/main/skills/turborepo'
Download bundle ↓
main · 064d74aScanned 2026-09-15

Contributors

GitHub-linked commit authors for this SKILL.md at the saved revision. Co-authors and history before file renames are not included.

File history ↗
View on GitHub
← Back to SKILL.md

turbo run

The primary command for executing tasks across your monorepo.

Basic Usage

# Full form (use in CI, package.json, scripts)
turbo run <tasks>

# Shorthand (only for one-off terminal invocations)
turbo <tasks>

When to Use turbo run vs turbo

Always use turbo run when the command is written into code:

  • package.json scripts
  • CI/CD workflows (GitHub Actions, etc.)
  • Shell scripts
  • Documentation
  • Any static/committed configuration

Only use turbo (shorthand) for:

  • One-off commands typed directly in terminal
  • Ad-hoc invocations by humans or agents
// package.json - ALWAYS use "turbo run"
{
  "scripts": {
    "build": "turbo run build",
    "dev": "turbo run dev",
    "lint": "turbo run lint",
    "test": "turbo run test"
  }
}
# CI workflow - ALWAYS use "turbo run"
- run: turbo run build --affected
- run: turbo run test --affected
# Terminal one-off - shorthand OK
turbo build --filter=web

Running Tasks

Tasks must be defined in turbo.json before running.

# Single task
turbo build

# Multiple tasks
turbo run build lint test

# See available tasks (run without arguments)
turbo run

Passing Arguments to Scripts

Use -- to pass arguments through to the underlying package scripts:

turbo run build -- --sourcemap
turbo test -- --watch
turbo lint -- --fix

Everything after -- goes directly to the task's script.

Package Selection

By default, turbo runs tasks in all packages. Use --filter to narrow scope:

turbo build --filter=web
turbo test --filter=./apps/*

See filtering/ for complete filter syntax.

Quick Reference

GoalCommand
Build everythingturbo build
Build one packageturbo build --filter=web
Multiple tasksturbo build lint test
Pass args to scriptturbo build -- --arg
Preview runturbo build --dry
Force rebuildturbo build --force
Referenced from SKILL.md