Universal Execution Engine
Single API for all environments via @xec-sh/core. Execute commands across local, SSH, Docker, and Kubernetes with the same consistent interface and automatic adapter selection.
Multi-Environment Native
Seamless execution across local shells, SSH connections, Docker containers, and Kubernetes pods. Built-in adapters with environment-specific optimizations.
TypeScript Template Literals
Intuitive $`command` syntax with full type safety. Natural command writing with automatic escaping, interpolation, and IntelliSense support.
Enterprise Features
Connection pooling, retry logic, error handling, caching, event system, and audit logging built-in. Production-ready with comprehensive monitoring and debugging.
Parallel Execution
Execute commands across multiple targets simultaneously. Built-in batch processing, concurrency control, and stream multiplexing for efficient operations.
Flexible Approach
Use imperative TypeScript scripts or declarative YAML configuration. Mix and match approaches to suit your workflow and team preferences.
6 Packages, One Ecosystem
@xec-sh/core
Shell execution engine — $`cmd`, SSH, Docker, Kubernetes adapters, connection pooling, streaming.
@xec-sh/ops
DevOps library — deploy strategies, CI/CD pipelines, DAG workflows, health checks, infrastructure discovery.
@xec-sh/cli
Command-line tool — thin wrapper over @xec-sh/ops. Commands: run, on, in, deploy, watch, tasks, config.
@xec-sh/kit
TUI components — prompts, spinners, tables, progress bars, Prism color system. Zero external dependencies.
@xec-sh/loader
Script loading — TypeScript transform, CDN modules, REPL, file watcher, plugin system.
@xec-sh/testing
Test utilities — Docker container management, SSH test helpers, binary detection.
Why Xec?
| Feature | Xec | Ansible | zx |
|---|---|---|---|
| Multi-environment (SSH/Docker/K8s) | ✅ Native | ✅ Via plugins | ❌ Local only |
| TypeScript-native | ✅ Full strict mode | ❌ YAML | ✅ Partial |
| Deploy strategies | ✅ Rolling, canary, blue-green | ✅ Playbooks | ❌ None |
| CI/CD pipelines | ✅ Pipeline engine with matrix | ❌ External | ❌ None |
| Health checks | ✅ HTTP, TCP, command, custom | ⚠️ Modules | ❌ None |
| Library usage (no CLI) | ✅ @xec-sh/ops | ❌ CLI only | ✅ Import |
| Connection pooling | ✅ Built-in | ✅ Built-in | ❌ N/A |
Start Building
Install @xec-sh/core for shell execution, @xec-sh/ops for DevOps automation, or @xec-sh/cli for the full command-line experience.