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 watch

Full docs: https://turborepo.dev/docs/reference/watch

Re-run tasks automatically when code changes. Dependency-aware.

turbo watch [tasks]

Basic Usage

# Watch and re-run build task when code changes
turbo watch build

# Watch multiple tasks
turbo watch build test lint

# No tasks: lists available tasks and exits non-zero
turbo watch

Tasks re-run in order configured in turbo.json when source files change.

By default, any file change in a package re-runs all of that package's tasks. Enable futureFlags.watchUsingTaskInputs in turbo.json to re-run only tasks whose inputs globs match the changed files.

With Persistent Tasks

Persistent tasks ("persistent": true) won't exit, so they can't be depended on. They work the same in turbo watch as turbo run.

Dependency-Aware Persistent Tasks

If your tool has built-in watching (like next dev), use its watcher:

{
  "tasks": {
    "dev": {
      "persistent": true,
      "cache": false
    }
  }
}

Non-Dependency-Aware Tools

For tools that don't detect dependency changes, use interruptible:

{
  "tasks": {
    "dev": {
      "persistent": true,
      "interruptible": true,
      "cache": false
    }
  }
}

turbo watch will restart interruptible tasks when dependencies change.

Limitations

Caching

Caching is experimental with watch mode:

turbo watch your-tasks --experimental-write-cache

Task Outputs in Source Control

If tasks write files tracked by git, watch mode may loop infinitely. Watch mode uses file hashes to prevent this but it's not foolproof.

Recommendation: Remove task outputs from git.

vs turbo run

Featureturbo runturbo watch
Runs onceYesNo
Re-runs on changeNoYes
CachingFullExperimental
Use caseCI, one-offDevelopment

Common Patterns

Development Workflow

# Run dev servers and watch for build changes
turbo watch dev build

Type Checking During Development

# Watch and re-run type checks
turbo watch check-types
Referenced from SKILL.md