High-performance build system for JavaScript and TypeScript codebases with intelligent caching and task scheduling.
—
Core task execution functionality for running scripts across monorepo packages with intelligent scheduling, dependency management, and parallel execution.
Execute tasks across packages in your monorepo with intelligent dependency resolution and caching.
turbo run <tasks...> [options]
turbo <tasks...> [options] # shorthand form
# Execute specific tasks
turbo run build test lint
# Execute with package filtering
turbo run build --filter="@myorg/web-app"
# Execute in parallel
turbo run build --parallel
# Execute with custom concurrency
turbo run build --concurrency=5Task Execution Options:
# Execution control
--concurrency <number> # Limit task concurrency (default: 10)
--continue[=<mode>] # Continue on errors (never|dependencies-successful|always, default: never)
--parallel # Execute all tasks in parallel
--only # Only execute specified tasks, skip dependencies
# Package selection
--filter <selector> / -F # Package selector (pnpm syntax)
--affected # Only run affected packages
--single-package # Run in single-package mode
# Environment and dependencies
--env-mode <mode> # Environment mode (strict|loose)
--framework-inference <bool> # Enable/disable framework inference
--global-deps <glob> # Global file dependenciesUsage Examples:
# Basic task execution
turbo run build
# Multiple tasks with dependency resolution
turbo run build test lint
# Run tasks for specific packages
turbo run build --filter="./apps/web"
turbo run test --filter="@myorg/ui-lib"
# Run tasks for changed packages only
turbo run build --filter="...[HEAD~1]"
# Execute with custom environment mode
turbo run build --env-mode=loose
# Run tasks in strict serial execution
turbo run build --concurrency=1
# Continue execution even if some tasks fail
turbo run test --continue=dependencies-successfulEXPERIMENTAL: Watch for file changes and automatically re-run tasks.
turbo watch <tasks...> [options]
# Watch for changes and re-run build
turbo watch build
# Watch with custom cache behavior
turbo watch build --experimental-write-cacheWatch Options:
# Watch-specific options
--experimental-write-cache # Write to cache in watch mode
# All task execution options are also available
--filter <selector> # Package filtering
--concurrency <number> # Concurrency control
--env-mode <mode> # Environment modeControl how task output is displayed and logged during execution.
# Output control
--output-logs <mode> # Log output mode (full|none|hash-only|new-only|errors-only)
--log-order <mode> # Log ordering (auto|stream|grouped)
--log-prefix <mode> # Log prefix mode (auto|none|task)Output Mode Options:
full - Show all task output (default)none - Hide all task output, show only hasheshash-only - Show only task hashes for cached resultsnew-only - Show output only for newly executed taskserrors-only - Show output only for failed tasksLog Order Options:
auto - Let turbo decide based on environment (default)stream - Show output as soon as availablegrouped - Show output after task completionUsage Examples:
# Show only errors during execution
turbo run build --output-logs=errors-only
# Group output by task
turbo run build test --log-order=grouped
# Disable task prefixes
turbo run build --log-prefix=nonePass arguments through to the underlying tasks being executed.
turbo run <tasks> [options] -- [forwarded-args...]
# Pass arguments to npm scripts
turbo run test -- --coverage --watch
# Pass multiple arguments
turbo run build -- --production --source-mapsUsage Examples:
# Pass Jest arguments to test scripts
turbo run test -- --coverage --verbose
# Pass webpack arguments to build scripts
turbo run build -- --mode=production --analyze
# Pass arguments to multiple tasks
turbo run build test -- --productionPreview what tasks would be executed without actually running them.
--dry-run <mode> # Dry run mode (text|json)
--dry / --dry-run # Shorthand for text mode
# Preview task execution
turbo run build --dry-run
# Get JSON output for programmatic use
turbo run build --dry-run=jsonUsage Examples:
# Preview what would be executed
turbo run build test --dry-run
# Get structured output for automation
turbo run build --filter="@myorg/*" --dry-run=jsoninterface ExecutionArgs {
tasks: string[];
cache_dir?: string;
concurrency?: string;
continue_execution: "never" | "dependencies-successful" | "always";
single_package: boolean;
framework_inference: boolean;
global_deps: string[];
env_mode?: "loose" | "strict";
filter: string[];
affected: boolean;
output_logs?: "full" | "none" | "hash-only" | "new-only" | "errors-only";
log_order?: "auto" | "stream" | "grouped";
only: boolean;
log_prefix: "auto" | "none" | "task";
pass_through_args: string[];
}
interface RunArgs extends ExecutionArgs {
cache?: string;
force?: boolean;
remote_only?: boolean;
remote_cache_read_only?: boolean;
no_cache: boolean;
cache_workers: number;
dry_run?: "text" | "json";
graph?: string;
daemon?: boolean;
no_daemon?: boolean;
profile?: string;
anon_profile?: string;
summarize?: boolean;
parallel: boolean;
}Install with Tessl CLI
npx tessl i tessl/npm-turbo