CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-turbo

High-performance build system for JavaScript and TypeScript codebases with intelligent caching and task scheduling.

Pending
Overview
Eval results
Files

task-execution.mddocs/

Task Execution

Core task execution functionality for running scripts across monorepo packages with intelligent scheduling, dependency management, and parallel execution.

Capabilities

Run Command

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=5

Task 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 dependencies

Usage 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-successful

Watch Command

EXPERIMENTAL: 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-cache

Watch 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 mode

Output and Logging

Control 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 hashes
  • hash-only - Show only task hashes for cached results
  • new-only - Show output only for newly executed tasks
  • errors-only - Show output only for failed tasks

Log Order Options:

  • auto - Let turbo decide based on environment (default)
  • stream - Show output as soon as available
  • grouped - Show output after task completion

Usage 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=none

Task Arguments

Pass 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-maps

Usage 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 -- --production

Dry Run

Preview 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=json

Usage Examples:

# Preview what would be executed
turbo run build test --dry-run

# Get structured output for automation
turbo run build --filter="@myorg/*" --dry-run=json

Task Configuration Types

interface 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

docs

caching-performance.md

code-generation.md

index.md

package-management.md

remote-cache.md

system-management.md

task-execution.md

tile.json