# Xec > TypeScript for the work around your code. ## Documentation Index - [Execution Engine API](https://xec.sh/docs/api/execution-engine.md): Core execution engine API reference - [API Reference](https://xec.sh/docs/api.md): Complete API reference for Xec core and CLI packages - [ProcessPromise API](https://xec.sh/docs/api/process-promise.md): Chainable promise interface for command execution - [Type Definitions](https://xec.sh/docs/api/types.md): TypeScript type definitions for Xec core library - [completion](https://xec.sh/docs/commands/built-in/completion.md): Print a shell completion script - [config](https://xec.sh/docs/commands/built-in/config.md): Inspect and edit project configuration, targets, variables, and tasks - [copy](https://xec.sh/docs/commands/built-in/copy.md): Copy files and directories between targets - [docker](https://xec.sh/docs/commands/built-in/docker.md): Manage Docker containers, images, networks and volumes from the Xec CLI - [doctor](https://xec.sh/docs/commands/built-in/doctor.md): Check the environment xec runs in - [forward](https://xec.sh/docs/commands/built-in/forward.md): Forward ports from remote targets to the local machine - [in](https://xec.sh/docs/commands/built-in/in.md): Execute commands in Docker containers or Kubernetes pods - [inspect](https://xec.sh/docs/commands/built-in/inspect.md): Inspect tasks, targets, variables, scripts, commands, and the local runtime - [logs](https://xec.sh/docs/commands/built-in/logs.md): View and stream logs from any target - [new](https://xec.sh/docs/commands/built-in/new.md): Initialize Xec in a project or create new artifacts - [on](https://xec.sh/docs/commands/built-in/on.md): Execute commands on SSH hosts - [run](https://xec.sh/docs/commands/built-in/run.md): Execute Xec scripts, tasks, or evaluate code with multiple runtime support - [secrets](https://xec.sh/docs/commands/built-in/secrets.md): Manage secrets securely from the CLI - [watch](https://xec.sh/docs/commands/built-in/watch.md): Watch scoped directories and run commands, tasks, or scripts - [CLI Reference](https://xec.sh/docs/commands/cli-reference.md): Complete reference for the Xec command-line interface - [Command Structure](https://xec.sh/docs/commands/custom/command-structure.md): How built-in CLI commands are structured and dispatched - [Command Testing](https://xec.sh/docs/commands/custom/command-testing.md): Verify dynamic commands through Vitest, public Xec APIs and the real CLI - [Creating Custom Commands](https://xec.sh/docs/commands/custom/creating-commands.md): Adding project-specific commands under .xec/commands - [Error codes](https://xec.sh/docs/commands/error-codes.md): The codes a failure can be identified by - [Command System Overview](https://xec.sh/docs/commands/overview.md): Comprehensive overview of Xec's command system architecture and capabilities - [Configuration Best Practices](https://xec.sh/docs/configuration/advanced/best-practices.md): Best practices and patterns for Xec configuration - [Configuration Troubleshooting](https://xec.sh/docs/configuration/advanced/troubleshooting.md): Troubleshooting guide for common Xec configuration issues - [Configuration Validation](https://xec.sh/docs/configuration/advanced/validation.md): Validating and testing Xec configurations - [Command Defaults](https://xec.sh/docs/configuration/commands/defaults.md): Configuring default options for Xec built-in commands - [Configuration File Structure](https://xec.sh/docs/configuration/config-file.md): Complete reference for the .xec/config.yaml file format - [Configuration Overview](https://xec.sh/docs/configuration/overview.md): Understanding Xec's declarative configuration system - [Profiles Overview](https://xec.sh/docs/configuration/profiles/overview.md): Managing environment-specific configurations with profiles - [Docker Targets](https://xec.sh/docs/configuration/targets/docker-targets.md): Configuring Docker container targets for containerized execution - [Kubernetes Targets](https://xec.sh/docs/configuration/targets/kubernetes-targets.md): Configuring Kubernetes pod targets for cluster execution - [Targets Overview](https://xec.sh/docs/configuration/targets/overview.md): Understanding execution targets in Xec - [SSH Targets](https://xec.sh/docs/configuration/targets/ssh-targets.md): Configuring SSH host targets for remote execution - [Multi-Step Tasks](https://xec.sh/docs/configuration/tasks/multi-step-tasks.md): Creating complex workflows with multi-step tasks - [Tasks Overview](https://xec.sh/docs/configuration/tasks/overview.md): Understanding automation tasks in Xec - [Simple Tasks](https://xec.sh/docs/configuration/tasks/simple-tasks.md): Creating basic automation tasks in Xec - [Environment Variables](https://xec.sh/docs/configuration/variables/environment.md): Using environment variables in Xec configuration - [Variables Overview](https://xec.sh/docs/configuration/variables/overview.md): Understanding the variable system in Xec configuration - [Adapter Concept](https://xec.sh/docs/core/execution-engine/adapters/concept.md): Shared execution, lifecycle and results across Xec environments - [Docker Adapter](https://xec.sh/docs/core/execution-engine/adapters/docker-adapter.md): Command execution in Docker containers - [Kubernetes Adapter](https://xec.sh/docs/core/execution-engine/adapters/k8s-adapter.md): Command execution in Kubernetes pods via kubectl - [LocalAdapter](https://xec.sh/docs/core/execution-engine/adapters/local-adapter.md): Command execution in local system through child_process - [SSH Adapter](https://xec.sh/docs/core/execution-engine/adapters/ssh-adapter.md): The Xec SSH API, its ownership rules and links to complete usage guides. - [Chaining](https://xec.sh/docs/core/execution-engine/api/chaining.md): Fluent method chaining on the execution engine - [Composition](https://xec.sh/docs/core/execution-engine/api/composition.md): Building workflows by composing execution primitives - [Execution API](https://xec.sh/docs/core/execution-engine/api/execution-api.md): The core interface for executing commands - [Extending Xec](https://xec.sh/docs/core/execution-engine/api/extensions.md): Composing and extending the engine without a plugin system - [Connection Pooling](https://xec.sh/docs/core/execution-engine/features/connection-pooling.md): SSH connection pooling and reuse in the execution engine - [Error Handling](https://xec.sh/docs/core/execution-engine/features/error-handling.md): Error types, exit code explanation, and failure classification - [File Operations](https://xec.sh/docs/core/execution-engine/features/file-operations.md): File transfer and manipulation across execution environments - [Port Forwarding](https://xec.sh/docs/core/execution-engine/features/port-forwarding.md): Reach remote services through owned SSH and Kubernetes forwards - [Streaming](https://xec.sh/docs/core/execution-engine/features/streaming.md): Streaming command output as it arrives - [Universal Execution Engine](https://xec.sh/docs/core/execution-engine/overview.md): Architecture and principles of Xec's universal command execution engine - [Connection Reuse](https://xec.sh/docs/core/execution-engine/performance/connection-reuse.md): Reducing overhead by reusing transport connections - [Performance Optimization](https://xec.sh/docs/core/execution-engine/performance/optimization.md): Caching, resource usage, and execution performance - [Parallel Execution](https://xec.sh/docs/core/execution-engine/performance/parallel-execution.md): Running commands concurrently across environments - [Template Literals API](https://xec.sh/docs/core/execution-engine/template-literals.md): Safe command building through template literals with automatic escaping - [Error Handling](https://xec.sh/docs/guides/advanced/error-handling.md): Classify command failures, preserve outcomes and verify recovery - [Security Best Practices](https://xec.sh/docs/guides/advanced/security.md): Use Xec credentials, command boundaries and verified remote targets - [Building CI/CD Pipelines](https://xec.sh/docs/guides/automation/ci-cd-pipelines.md): Create CI/CD pipelines with Xec's execution engine - [Deployment Automation](https://xec.sh/docs/guides/automation/deployment.md): Automate deployments across environments with Xec - [Your First Xec Automation](https://xec.sh/docs/guides/automation/first-automation.md): Learn how to create your first automation script with Xec - [Test Automation](https://xec.sh/docs/guides/automation/testing.md): Automate testing workflows with Xec's execution engine - [Design a project workflow](https://xec.sh/docs/guides/automation/workflow-design.md): Choose the right Xec entry point and keep compilation, execution, caching and deployment ownership explicit. - [Debugging Techniques](https://xec.sh/docs/guides/development/debugging.md): Advanced debugging techniques for Xec scripts and automation - [Local Development Environments](https://xec.sh/docs/guides/development/dev-environments.md): Setting up and managing local development environments with Xec - [Container Orchestration](https://xec.sh/docs/guides/infrastructure/container-orchestration.md): Manage Docker services and Kubernetes workloads through Xec - [Working across environments](https://xec.sh/docs/guides/infrastructure/multi-environment.md): Share typed steps across local, SSH, Docker and Kubernetes targets - [Server Management](https://xec.sh/docs/guides/infrastructure/server-management.md): Manage multiple servers efficiently with Xec's SSH capabilities - [Integrations](https://xec.sh/docs/integrations.md): Integration guides for CI/CD, cloud providers, and third-party tools - [Architecture](https://xec.sh/docs/introduction/architecture.md): Technical architecture and design of Xec - [Comparison with Other Tools](https://xec.sh/docs/introduction/comparison.md): How Xec compares to similar tools and when to use each - [Core Concepts](https://xec.sh/docs/introduction/core-concepts.md): Fundamental concepts and architecture of Xec - [The Xec Ecosystem](https://xec.sh/docs/introduction/ecosystem.md): Overview of the Xec ecosystem — packages, architecture, and integrations - [Introduction](https://xec.sh/docs/introduction.md): TypeScript scripts, project CLIs, terminal UI, orchestration and releases across local and remote environments - [Installation](https://xec.sh/docs/introduction/installation.md): How to install Xec on your system - [Philosophy & Design Principles](https://xec.sh/docs/introduction/philosophy.md): The core principles and design philosophy behind Xec - [Portable Scripts](https://xec.sh/docs/introduction/portable-scripts.md): Route commands through $target while keeping runtime and target requirements explicit - [Quick Start](https://xec.sh/docs/introduction/quick-start.md): Get started with Xec in 5 minutes - [What is Xec?](https://xec.sh/docs/introduction/what-is-xec.md): Universal command execution system for seamless operations across local, SSH, Docker, and Kubernetes environments - [When to Use Xec](https://xec.sh/docs/introduction/when-to-use.md): Understanding when Xec is the right tool for your needs - [Components](https://xec.sh/docs/kit/components.md): Log output, notes, boxes, spinners, progress bars and task runners - [Kit Library](https://xec.sh/docs/kit.md): Terminal prompts, spinners, tables and colors for command-line applications - [Prompts](https://xec.sh/docs/kit/prompts.md): Text, selection, confirmation and date prompts with validation and cancellation - [Tables](https://xec.sh/docs/kit/table.md): Static table rendering, interactive navigation with sorting and filtering, data export - [Colors & Theming](https://xec.sh/docs/kit/theming.md): The prism color builder and the theme that restyles every component at once - [Migrating from Gulp/Grunt](https://xec.sh/docs/migration/from-gulp-grunt.md): Guide for migrating from Gulp or Grunt task runners to Xec - [Migrating from Make](https://xec.sh/docs/migration/from-make.md): Comprehensive guide for migrating from Makefile to Xec - [Migrating from npm Scripts](https://xec.sh/docs/migration/from-npm-scripts.md): Complete guide for migrating from package.json scripts to Xec - [Migrating from Shell Scripts](https://xec.sh/docs/migration/from-shell-scripts.md): Complete guide for migrating bash/sh scripts to Xec - [Migrating from Webpack Build Scripts](https://xec.sh/docs/migration/from-webpack.md): Guide for migrating webpack build automation to Xec - [Migrating from zx/shelljs](https://xec.sh/docs/migration/from-zx.md): Guide for migrating from Google's zx or shelljs to Xec - [Configuration Management](https://xec.sh/docs/ops/config.md): Loading, validating and interpolating .xec configuration - [Deployment Engine](https://xec.sh/docs/ops/deploy.md): Explicit deployment hooks, target concurrency, verification and recovery - [Infrastructure Discovery](https://xec.sh/docs/ops/discovery.md): Bounded asynchronous discovery of Docker containers, Kubernetes pods and TCP targets - [Health Check Framework](https://xec.sh/docs/ops/health.md): Asynchronous HTTP, TCP, command and custom checks with explicit cancellation - [@xec-sh/ops — DevOps Operations Library](https://xec.sh/docs/ops.md): Deploy, pipelines, workflows, health checks, discovery — all as a library - [CI/CD Pipeline Engine](https://xec.sh/docs/ops/pipeline.md): Sequential and parallel step execution with the Pipeline class - [Verified package releases](https://xec.sh/docs/ops/release.md): Prepare immutable package archives, publish with registry confirmation, and resume partial npm or GitHub releases. - [Retry Policies](https://xec.sh/docs/ops/retry.md): Retry policies with backoff for flaky operations - [Secret Management](https://xec.sh/docs/ops/secrets.md): Encrypted secret storage and the SecretManager API - [DAG Workflow Engine](https://xec.sh/docs/ops/workflow.md): Asynchronous tasks with validated dependencies, data passing and cancellation - [Common Patterns & Best Practices](https://xec.sh/docs/patterns.md): Design patterns and best practices for Xec automation - [Docker Container Deployment](https://xec.sh/docs/recipes/deployment/docker-deploy.md): Deploy immutable container images with explicit readiness and recovery - [Kubernetes Deployment](https://xec.sh/docs/recipes/deployment/k8s-deploy.md): Deploy Kubernetes manifests with explicit cluster identity and rollout acceptance - [Node.js Application Deployment](https://xec.sh/docs/recipes/deployment/node-app-deploy.md): Deploy Node.js services with explicit release and acceptance contracts - [Static Site Deployment](https://xec.sh/docs/recipes/deployment/static-site-deploy.md): Publish a prepared static site and verify its actual serving origin - [API Mocking](https://xec.sh/docs/recipes/development/api-mocking.md): Mock API servers and services for development and testing - [Database Setup](https://xec.sh/docs/recipes/development/database-setup.md): Local database setup and management with Xec - [Hot Reload Development Workflows](https://xec.sh/docs/recipes/development/hot-reload.md): Implement hot reload and live development workflows using Xec - [Test Data Generation](https://xec.sh/docs/recipes/development/test-data.md): Generate realistic test data for development and testing - [Xec Recipes Cookbook](https://xec.sh/docs/recipes.md): Practical recipes and real-world examples for common Xec use cases - [AWS Integration Recipe](https://xec.sh/docs/recipes/integration/aws-integration.md): Use the AWS CLI through Xec with explicit identity, targets and acceptance - [GitHub Actions Integration](https://xec.sh/docs/recipes/integration/github-actions.md): Run the same locked Xec scripts locally and on GitHub Actions - [GitLab CI Integration Recipe](https://xec.sh/docs/recipes/integration/gitlab-ci.md): Use locked Xec scripts in GitLab CI jobs and protected deployment environments - [Jenkins Integration Recipe](https://xec.sh/docs/recipes/integration/jenkins.md): Run project-owned Xec scripts on explicit Jenkins agents - [Backup and Restore](https://xec.sh/docs/recipes/maintenance/backup-restore.md): Implement backup and restore strategies using Xec - [SSL Certificate Management](https://xec.sh/docs/recipes/maintenance/certificate-renewal.md): Automate SSL certificate renewal and deployment across environments - [Service Health Monitoring](https://xec.sh/docs/recipes/maintenance/health-checks.md): Monitor service health and availability across multiple environments - [Log Aggregation](https://xec.sh/docs/recipes/maintenance/log-aggregation.md): Inspect and correlate logs through Xec's configured targets - [Command Execution](https://xec.sh/docs/scripting/basics/command-execution.md): Template literal command execution in Xec scripts - [Script Execution Context](https://xec.sh/docs/scripting/basics/execution-context.md): The globals and context available inside Xec scripts - [First Script](https://xec.sh/docs/scripting/basics/first-script.md): Writing and running your first Xec script - [TypeScript Setup](https://xec.sh/docs/scripting/basics/typescript-setup.md): TypeScript configuration, public types and validation for Xec scripts - [Async Patterns](https://xec.sh/docs/scripting/patterns/async-patterns.md): Concurrency, cancellation, and dependency scheduling through Xec - [Chaining Patterns](https://xec.sh/docs/scripting/patterns/chaining.md): Compose execution settings, pipelines, and result transformations with public Xec APIs - [Error Handling Patterns](https://xec.sh/docs/scripting/patterns/error-handling.md): Error handling patterns for production scripts - [Streaming Patterns](https://xec.sh/docs/scripting/patterns/streaming.md): Live output, backpressure, cancellation, and bounded processing through Xec - [Docker Compose Integration](https://xec.sh/docs/targets/docker/compose-integration.md): Working with Docker Compose in Xec - [Docker Container Lifecycle](https://xec.sh/docs/targets/docker/container-lifecycle.md): Managing Docker container lifecycle with Xec - [Docker Networking](https://xec.sh/docs/targets/docker/networking.md): Container networking configuration and management with Xec - [Docker Target Overview](https://xec.sh/docs/targets/docker/overview.md): Container command execution, lifecycle management, and Docker operations - [Docker Volume Management](https://xec.sh/docs/targets/docker/volume-management.md): Managing Docker volumes and file operations with Xec - [File Operations](https://xec.sh/docs/targets/kubernetes/file-operations.md): File transfer between the local filesystem and Kubernetes pods using kubectl cp - [Log Streaming](https://xec.sh/docs/targets/kubernetes/log-streaming.md): Retrieve or follow Kubernetes logs with bounded buffering and explicit completion - [Multi-Container Pods](https://xec.sh/docs/targets/kubernetes/multi-container.md): Targeting specific containers in multi-container Kubernetes pods - [Kubernetes Target Overview](https://xec.sh/docs/targets/kubernetes/overview.md): Command execution inside Kubernetes pods through kubectl exec, with pod/namespace/container targeting and multi-cluster context - [Pod Execution](https://xec.sh/docs/targets/kubernetes/pod-execution.md): Executing commands inside Kubernetes pods with Xec - [Port Forwarding](https://xec.sh/docs/targets/kubernetes/port-forwarding.md): Kubernetes port forwarding for local access to pod services - [Windows and cross-platform scripts](https://xec.sh/docs/targets/local/cross-platform.md): What behaves identically on every operating system, what cannot, and how to write commands that survive both - [Local Target Overview](https://xec.sh/docs/targets/local/overview.md): Local command execution and shell environment management - [Shell Configuration](https://xec.sh/docs/targets/local/shell-config.md): Shell selection, quoting, and cross-platform command escaping for local execution - [Local Target Troubleshooting](https://xec.sh/docs/targets/local/troubleshooting.md): Common issues and solutions for local command execution - [Targets Overview](https://xec.sh/docs/targets/overview.md): One execution API across local shells, SSH hosts, Docker containers and Kubernetes pods - [SSH Authentication](https://xec.sh/docs/targets/ssh/authentication.md): SSH password and private-key authentication, key validation, and host verification - [SSH Batch Operations](https://xec.sh/docs/targets/ssh/batch-operations.md): Running commands across multiple SSH hosts - [SSH Connection Configuration](https://xec.sh/docs/targets/ssh/connection-config.md): Connection pooling, timeouts, and adapter-wide SSH configuration - [Interactive SSH shells](https://xec.sh/docs/targets/ssh/interactive-shell.md): Use the existing Xec NodeSSH connection for pinned interactive PTYs with cancellation and bounded shell requests. - [SSH Target Overview](https://xec.sh/docs/targets/ssh/overview.md): Remote command execution over SSH with connection pooling, sudo, and tunneling - [SSH reliability and ownership](https://xec.sh/docs/targets/ssh/reliability.md): Xec owns connection policy, bounded operations and unambiguous failure reporting. - [Secure Sudo Password Handling](https://xec.sh/docs/targets/ssh/sudo-security.md): How the SSH adapter delivers sudo passwords, and the real security properties of each method - [SSH Tunneling](https://xec.sh/docs/targets/ssh/tunneling.md): Local and reverse SSH port forwarding - [TypeScript for the work around your code](https://xec.sh/.md): Write scripts, build project CLIs, orchestrate tasks and ship releases with one TypeScript execution toolkit. Local, SSH, Docker and Kubernetes. - [Search Xec documentation](https://xec.sh/search.md): Search Xec documentation