Setting the file. One moment.
Subchapter 9.14
references/cli/RULE.mdMarkdown2 KBView on GitHub
# Full form (use in CI, package.json, scripts)
turbo run <tasks>
# Shorthand (only for one-off terminal invocations)
turbo <tasks>Always use turbo run when the command is written into code:
package.json scriptsOnly use turbo (shorthand) for:
// 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=webTasks 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 runUse -- to pass arguments through to the underlying package scripts:
turbo run build -- --sourcemap
turbo test -- --watch
turbo lint -- --fixEverything after -- goes directly to the task’s script.
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.
| Goal | Command |
|---|---|
| Build everything | turbo build |
| Build one package | turbo build --filter=web |
| Multiple tasks | turbo build lint test |
| Pass args to script | turbo build -- --arg |
| Preview run | turbo build --dry |
| Force rebuild | turbo build --force |