skills/turborepo/references/cli/commands.md
Full docs: https://turborepo.dev/docs/reference/run
--filter / -FSelect specific packages to run tasks in.
turbo build --filter=web
turbo build -F=@repo/ui -F=@repo/utils
turbo test --filter=./apps/*
See filtering/ for complete syntax (globs, dependencies, git ranges).
Run specific package tasks directly:
turbo run web#build # Build web package
turbo run web#build docs#lint # Multiple specific tasks
--affectedRun only in packages changed since the base branch.
turbo build --affected
turbo test --affected --filter=./apps/* # combine with filter
How it works:
main...HEADGITHUB_BASE_REFTURBO_SCM_BASE=development turbo build --affectedTURBO_SCM_HEAD=your-branch turbo build --affectedRequires git history - shallow clones may fall back to running all tasks.
--dry / --dry=jsonPreview what would run without executing.
turbo build --dry # human-readable
turbo build --dry=json # machine-readable
--forceIgnore all cached artifacts, re-run everything.
turbo build --force
--concurrencyLimit parallel task execution.
turbo build --concurrency=4 # max 4 tasks
turbo build --concurrency=50% # 50% of CPU cores
--continueControl whether other tasks keep running when one fails. Value requires = — --continue never parses never as a task name and the flag becomes --continue=always.
turbo build test --continue # bare flag = --continue=always
turbo build test --continue=never # cancel remaining tasks on failure (default)
turbo build test --continue=dependencies-successful # continue tasks whose dependencies succeeded
turbo build test --continue=always # continue all tasks, even with failed dependencies
--onlyRun only the specified task, skip its dependencies.
turbo build --only # skip running dependsOn tasks
--parallel (Deprecated)Ignores task graph dependencies, runs all tasks simultaneously. Deprecated, will be removed in a future major version—use task configuration (persistent, with) in turbo.json instead. Using --parallel bypasses Turborepo's dependency graph, which can cause race conditions and incorrect builds.
--cacheFine-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:
--graphGenerate task graph visualization.
turbo build --graph # prints dot graph to stdout
turbo build --graph=graph.svg # SVG file
turbo build --graph=graph.html # HTML file
turbo build --graph=graph.mermaid # Mermaid diagram
turbo build --graph=graph.dot # DOT file
.png, .jpg, .pdf, and .json are deprecated (removed in 3.0; require external Graphviz). For programmatic access, use turbo query instead.
--summarizeGenerate JSON run summary for debugging.
turbo build --summarize
# creates .turbo/runs/<run-id>.json
--output-logsControl log output verbosity.
turbo build --output-logs=full # all logs (default)
turbo build --output-logs=hash-only # only task hashes
turbo build --output-logs=new-only # only cache misses
turbo build --output-logs=errors-only # only failures
turbo build --output-logs=none # silent
--profileGenerate Chrome tracing profile for performance analysis.
turbo build --profile=profile.json
# open chrome://tracing and load the file
--verbosity / -vControl turbo's own log level.
turbo build -v # verbose
turbo build -vv # more verbose
turbo build -vvv # maximum verbosity
--env-modeControl environment variable handling.
turbo build --env-mode=strict # only declared env vars (default)
turbo build --env-mode=loose # all env vars available at runtime; hashing still limited to declared vars
--uiSelect output interface.
turbo build --ui=stream # streaming logs (default)
turbo build --ui=tui # interactive terminal UI (opt-in; requires a TTY)
turbo build --ui=stream-with-experimental-timestamps # streaming logs with timestamps (experimental)
| Key | Action |
|---|---|
↑/k, ↓/j | Select previous/next task |
h | Show selected task's logs full-screen, verbatim (toggle) |
s | Stream all task logs (toggle) |
Shift+H | Toggle task list sidebar |
i or Enter | Interact with selected task |
Ctrl+Z | Stop interacting with task |
/ | Filter tasks to search term (Esc clears) |
p | Toggle pinned task selection |
u / d | Scroll logs up/down |
m | Toggle keybind help popup |
Full docs: https://turborepo.dev/docs/reference/turbo-ignore
Skip CI work when nothing relevant changed. Useful for skipping container setup.
# 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
0: No changes detected - skip CI work1: Changes detected - proceed with CI# 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
Default: compares to parent commit (HEAD^1).
# Compare to specific commit
npx turbo-ignore --fallback=abc123
# Compare to branch
npx turbo-ignore --fallback=main
Check workspace violations (experimental).
turbo boundaries
See references/boundaries/ for configuration.
Re-run tasks on file changes.
turbo watch build test
See references/watch/ for details.
Create sparse checkout for Docker.
turbo prune web --docker # split output into json/ and full/ for layer caching
turbo prune web --production # exclude in-workspace devDependencies
turbo prune web --out-dir=./custom-out # output directory (default: ./out)
turbo prune web --use-gitignore=false # copy files ignored by .gitignore (default: true)
Connect/disconnect Remote Cache.
turbo link # connect to Vercel Remote Cache
turbo unlink # disconnect
Authenticate with Remote Cache provider.
turbo login # authenticate
turbo logout # log out
Scaffold new packages.
turbo generate
Search the Turborepo documentation.
turbo docs "how does caching work"
turbo docs "prune" --docs-version=2.7.5 # override docs version (minimum: 2.7.5)
List packages in the monorepo (experimental).
turbo ls # all packages
turbo ls web # details for a specific package
turbo ls --affected # only packages changed vs main
turbo ls --output=json # machine-readable (default: pretty)
Query the monorepo using GraphQL.
turbo query # spins up GraphiQL server
turbo query "query { packages { items { name } } }" # run a query string
turbo query ./query.gql # run a query from a file
turbo devtools - visualize the package graph in the browserturbo info - print debugging informationturbo bin - print the path to the turbo binaryturbo daemon - run/manage the background daemonturbo telemetry - enable or disable anonymous telemetry