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

remote-cache.mddocs/

Remote Cache Integration

Authentication and linking with Vercel's remote cache infrastructure for team collaboration, enabling shared build artifacts across development environments and CI/CD pipelines.

Capabilities

Authentication

Authenticate with Vercel to enable remote cache access and team collaboration features.

turbo login [options]

# Basic authentication
turbo login

# SSO team authentication
turbo login --sso-team=my-team

# Force new token generation
turbo login --force

# Manual token entry
turbo login --manual

Login Options:

--sso-team <team>                  # SSO team slug for authentication
--force / -f                       # Force new token, overwrite existing
--manual                          # Manual token entry instead of browser flow

Usage Examples:

# Standard login flow (opens browser)
turbo login

# Login with specific SSO team
turbo login --sso-team=acme-corp

# Force re-authentication
turbo login --force

# Enter token manually (for CI/headless environments)
turbo login --manual

Logout

Deauthenticate from Vercel and optionally invalidate tokens on the server.

turbo logout [options]

# Basic logout
turbo logout

# Logout and invalidate token on server
turbo logout --invalidate

Logout Options:

--invalidate                       # Invalidate token on server (recommended for security)

Usage Examples:

# Standard logout (keeps token valid on server)
turbo logout

# Secure logout that invalidates token
turbo logout --invalidate

Link Repository

Link your local repository to a Vercel organization to enable remote caching and team features.

turbo link [options]

# Interactive linking
turbo link

# Link with specific scope
turbo link --scope=my-team

# Auto-confirm prompts
turbo link --yes

# Link without modifying .gitignore
turbo link --no-gitignore

Link Options:

--scope <scope>                    # Vercel team/organization scope
--yes / -y                         # Auto-confirm all prompts
--no-gitignore                     # Don't modify .gitignore file
--target <target>                  # DEPRECATED: Link target specification

Usage Examples:

# Interactive linking with prompts
turbo link

# Link to specific organization
turbo link --scope=acme-corp --yes

# Link without modifying .gitignore
turbo link --no-gitignore

# Quick link for automation
turbo link --scope=my-team --yes

Unlink Repository

Unlink your repository from Vercel organization and disable remote caching.

turbo unlink [options]

# Basic unlinking
turbo unlink

# Unlink with deprecated target option
turbo unlink --target=remote-cache

Unlink Options:

--target <target>                  # DEPRECATED: Unlink target specification

Usage Examples:

# Standard repository unlinking
turbo unlink

# Unlink for CI cleanup
turbo unlink --target=remote-cache

Remote Cache Configuration

Configure remote cache behavior through global options and configuration files.

# Global remote cache options
--api <url>                        # Override API endpoint
--team <slug>                      # Set team slug for requests
--token <token>                    # Set authentication token
--remote-cache-timeout <seconds>   # Set HTTP request timeout
--preflight                        # Enable OPTIONS preflight requests

# Usage with task execution
turbo run build --team=acme-corp --remote-cache-timeout=60

Configuration Examples:

# Use custom API endpoint
turbo run build --api=https://custom-api.example.com

# Set team context for remote cache
turbo run build --team=my-team

# Configure timeout for slow networks
turbo run build --remote-cache-timeout=120

# Enable preflight requests for CORS
turbo run build --preflight

Remote Cache Access Control

Control how remote cache is accessed during task execution.

# Remote cache access modes (used with --cache option)
remote:r          # Read-only remote cache access
remote:w          # Write-only remote cache access  
remote:rw         # Read-write remote cache access

# Shorthand options
--remote-only                      # Equivalent to --cache=remote:rw
--remote-cache-read-only           # Equivalent to --cache=local:rw,remote:r

# Examples
turbo run build --remote-only
turbo run build --remote-cache-read-only
turbo run build --cache=remote:r

Usage Examples:

# Use only remote cache (no local cache)
turbo run build --remote-only

# Read from remote, write to local only
turbo run build --remote-cache-read-only

# Read from remote, write to both local and remote
turbo run build --cache=local:rw,remote:r

# Write results to remote cache only
turbo run build --cache=remote:w

Authentication Types

interface LoginOptions {
  sso_team?: string;
  force: boolean;
  manual: boolean;
}

interface LogoutOptions {
  invalidate: boolean;
}

interface LinkOptions {
  scope?: string;
  yes: boolean;
  no_gitignore: boolean;
  target?: "remote-cache" | "spaces";  // DEPRECATED
}

interface UnlinkOptions {
  target?: "remote-cache" | "spaces";  // DEPRECATED
}

interface APIAuth {
  team_id?: string;
  token: string;
  team_slug?: string;
}

interface RemoteCacheOptions {
  api_url: string;
  timeout: number;
  upload_timeout: number;
  preflight: boolean;
  team_id?: string;
  team_slug?: string;
  token?: string;
}

interface CacheCredentials {
  token: string;
  team_id?: string;
  team_slug?: string;
  expires_at?: string;
}

Team Collaboration

Remote caching enables several team collaboration workflows:

Shared Cache Benefits:

  • Developers can share build artifacts across machines
  • CI/CD pipelines can reuse artifacts from previous builds
  • New team members get faster initial builds
  • Reduces compute costs in cloud environments

Access Control:

  • Team-based access to cached artifacts
  • Token-based authentication with expiration
  • Read-only access for CI environments
  • Full read-write access for development

Best Practices:

  • Use --remote-cache-read-only in CI for security
  • Set appropriate timeouts for network conditions
  • Link repositories at the organization level
  • Invalidate tokens when team members leave

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