High-performance build system for JavaScript and TypeScript codebases with intelligent caching and task scheduling.
npx @tessl/cli install tessl/npm-turbo@2.5.0Turbo is a high-performance build system for JavaScript and TypeScript codebases that dramatically speeds up development workflows in monorepos. Built in Rust for optimal performance, it provides intelligent caching, task scheduling, and incremental builds through advanced dependency graph analysis, remote caching capabilities, and parallel task execution.
npm install -g turbo or npm install --save-dev turboSince Turbo is a CLI tool, there are no traditional imports. Instead, you use the globally installed binary:
# Global installation
npm install -g turbo
turbo --help
# Local installation (recommended)
npm install --save-dev turbo
npx turbo --helpFor package.json scripts:
{
"scripts": {
"build": "turbo run build",
"test": "turbo run test",
"dev": "turbo run dev --parallel"
}
}# Initialize in a new project
cd my-monorepo
turbo run build
# Run multiple tasks with dependencies
turbo run build test lint --parallel
# Run tasks only for changed packages
turbo run build --filter="...@myorg/changed-package"
# Generate task execution graph
turbo run build --graph=graph.htmlTurbo is built around several key components:
turbo.json with workspace-specific overridesCore task execution functionality for running scripts across monorepo packages with intelligent scheduling and dependency management.
turbo run <tasks...> [options]
turbo <tasks...> [options] # shorthandTools for analyzing, filtering, and managing packages within your monorepo structure.
turbo ls [packages...] [options]
turbo prune <scope> [options]Local and remote caching configuration with performance profiling and analysis tools.
turbo run <tasks> --cache=<config>
turbo run <tasks> --profile=<file>Authentication and linking with Vercel's remote cache infrastructure for team collaboration.
turbo login [options]
turbo link [options]
turbo logout [options]
turbo unlink [options]Tools for generating new packages, applications, and workspace components with customizable templates.
turbo generate [generator] [options]
turbo gen workspace [options]Daemon management, system information, and debugging utilities for maintaining optimal Turbo performance.
turbo daemon [command] [options]
turbo info
turbo scanAdditional utilities for shell completion, GraphQL querying, workspace analysis, and watch mode execution.
turbo bin
turbo completion <shell>
turbo query [query] [options]
turbo telemetry [command]
turbo watch <tasks...> [options]# Version and help
--version # Show version information
--help # Show help information
# Environment configuration
--cwd <path> # Set working directory
--color / --no-color # Control color output
--ui <mode> # Set UI mode (stream|tui|web)
# API and authentication
--api <url> # Override API endpoint
--token <token> # Set authentication token
--team <slug> # Set team slug
--login <url> # Override login endpoint
# Performance and debugging
--verbosity <level> / -v # Set verbosity level
--trace <file> # Save performance trace
--heap <file> # Save heap profile
--remote-cache-timeout <seconds> # Set HTTP timeout
# Advanced options
--skip-infer # Skip version inference
--no-update-notifier # Disable update notifications
--preflight # Enable OPTIONS preflight requests
--dangerously-disable-package-manager-check # Allow missing packageManager
--root-turbo-json <path> # Custom turbo.json pathinterface TurboConfig {
$schema?: string;
tasks: Record<string, TaskConfig>;
globalDependencies?: string[];
globalEnv?: string[];
globalPassThroughEnv?: string[] | null;
remoteCache?: RemoteCacheConfig;
ui?: "stream" | "tui" | "web";
concurrency?: string;
dangerouslyDisablePackageManagerCheck?: boolean;
cacheDir?: string;
daemon?: boolean;
envMode?: "strict" | "loose";
boundaries?: BoundariesConfig;
}
interface TaskConfig {
dependsOn?: string[];
inputs?: string[];
outputs?: string[];
cache?: boolean;
env?: string[];
passThroughEnv?: string[];
outputLogs?: "full" | "none" | "hash-only" | "new-only" | "errors-only";
persistent?: boolean;
interactive?: boolean;
}
interface RemoteCacheConfig {
signature?: boolean;
enabled?: boolean;
timeout?: number;
}
interface BoundariesConfig {
include?: string[];
exclude?: string[];
}0 # Success
1 # General error or task failureTURBO_BINARY_PATH # Override turbo binary path
TURBO_INVOCATION_DIR # Invocation directory (internal)
TURBO_PRINT_VERSION_DISABLED # Disable version printing (1|true)
TEST_RUN # Enable test run mode