Typed where it matters.
Compose commands and inspect typed results. Treat shell source and external output as runtime boundaries, not compile-time guarantees.
Write portable scripts ↗Your scripts. Your CLI.
Every environment.
Turn the work around your code into clear, reusable TypeScript. From a local command to a release pipeline, keep execution under your control.
npm install -g @xec-sh/cliimport { $ } from '@xec-sh/core';
const revision = await $`git rev-parse --short HEAD`
.timeout('10s')
.text();
console.log(revision.trim());Run in a Git repository with xec run inspect.ts. Commands use the selected local shell.
Read the guide ↗01 / FROM ONE COMMAND TO A SYSTEM
Adopt the library, the CLI, or both. Each layer has one job and works with the tools you already use.
Replace fragile glue with typed scripts, streams, cancellation and explicit results.
Named targets, declarative tasks and dynamic commands with their own options and help.
Dependency graphs, bounded concurrency, matrix parameters and controlled retries.
Prepare immutable archives. Publish and resume the same release through the Xec CLI.
02 / COMPOSE, DON'T REWRITE
Xec orchestrates the work. Your compiler builds it, Turbo can manage the package graph, and your platform supervises the deployed applications.
Explore the architecture03 / CONTROL IS THE FEATURE
Compose commands and inspect typed results. Treat shell source and external output as runtime boundaries, not compile-time guarantees.
Write portable scripts ↗Choose deadlines, cancellation and retry policies explicitly. Define rollback for your system; an execution library cannot invent it.
Handle failure ↗Run locally, from any CI provider, or against your own infrastructure. Keep build caches, credentials and deployment policy under your control.
Build a workflow ↗THE NEXT USEFUL COMMAND
One script is enough to get started.