turbo run Flags Reference¶
Full docs: https://turborepo.dev/docs/reference/run
Package Selection¶
--filter / -F¶
Select specific packages to run tasks in.
See filtering/ for complete syntax (globs, dependencies, git ranges).
Task Identifier Syntax (v2.2.4+)¶
Run specific package tasks directly:
--affected¶
Run only in packages changed since the base branch.
How it works:
- Default: compares
main...HEAD - In GitHub Actions: auto-detects
GITHUB_BASE_REF - Override base:
TURBO_SCM_BASE=development turbo build --affected - Override head:
TURBO_SCM_HEAD=your-branch turbo build --affected
Requires git history - shallow clones may fall back to running all tasks.
Execution Control¶
--dry / --dry=json¶
Preview what would run without executing.
--force¶
Ignore all cached artifacts, re-run everything.
--concurrency¶
Limit parallel task execution.
--continue¶
Keep running other tasks when one fails.
--only¶
Run only the specified task, skip its dependencies.
--parallel (Discouraged)¶
Ignores task graph dependencies, runs all tasks simultaneously. Avoid using this flag—if tasks need to run in parallel, configure dependsOn correctly instead. Using --parallel bypasses Turborepo's dependency graph, which can cause race conditions and incorrect builds.
Cache Control¶
--cache¶
Fine-grained cache behavior control.
# Default: read/write both local and remote
turbo build --cache=local:rw,remote:rw
# Read-only local, no remote
turbo build --cache=local:r,remote:
# Disable local, read-only remote
turbo build --cache=local:,remote:r
# Disable all caching
turbo build --cache=local:,remote:
Output & Debugging¶
--graph¶
Generate task graph visualization.
turbo build --graph # opens in browser
turbo build --graph=graph.svg # SVG file
turbo build --graph=graph.png # PNG file
turbo build --graph=graph.json # JSON data
turbo build --graph=graph.mermaid # Mermaid diagram
--summarize¶
Generate JSON run summary for debugging.
--output-logs¶
Control log output verbosity.
turbo build --output-logs=full # all logs (default)
turbo build --output-logs=new-only # only cache misses
turbo build --output-logs=errors-only # only failures
turbo build --output-logs=none # silent
--profile¶
Generate Chrome tracing profile for performance analysis.
--verbosity / -v¶
Control turbo's own log level.
Environment¶
--env-mode¶
Control environment variable handling.
turbo build --env-mode=strict # only declared env vars (default)
turbo build --env-mode=loose # include all env vars in hash
UI¶
--ui¶
Select output interface.
turbo build --ui=tui # interactive terminal UI (default in TTY)
turbo build --ui=stream # streaming logs (default in CI)
turbo-ignore¶
Full docs: https://turborepo.dev/docs/reference/turbo-ignore
Skip CI work when nothing relevant changed. Useful for skipping container setup.
Basic Usage¶
# Check if build is needed for current package (uses Automatic Package Scoping)
npx turbo-ignore
# Check specific package
npx turbo-ignore web
# Check specific task
npx turbo-ignore --task=test
Exit Codes¶
0: No changes detected - skip CI work1: Changes detected - proceed with CI
CI Integration Example¶
# GitHub Actions
- name: Check for changes
id: turbo-ignore
run: npx turbo-ignore web
continue-on-error: true
- name: Build
if: steps.turbo-ignore.outcome == 'failure' # changes detected
run: pnpm build
Comparison Depth¶
Default: compares to parent commit (HEAD^1).
# Compare to specific commit
npx turbo-ignore --fallback=abc123
# Compare to branch
npx turbo-ignore --fallback=main
Other Commands¶
turbo boundaries¶
Check workspace violations (experimental).
See references/boundaries/ for configuration.
turbo watch¶
Re-run tasks on file changes.
See references/watch/ for details.
turbo prune¶
Create sparse checkout for Docker.
turbo link / unlink¶
Connect/disconnect Remote Cache.
turbo login / logout¶
Authenticate with Remote Cache provider.
turbo generate¶
Scaffold new packages.