What problem does it solve?
Automating external command execution while preserving correct lifecycles, typed outputs, and deterministic cleanup in Effect-based code.
Core Features & Use Cases
- Composable command construction: Build commands as AST values (template literals, array form, and option-tagged templates) and compose pipelines with
pipeTo-style flow.
- Typed execution modes: Capture stdout/stderr as strings, lines, or streams, or use process handles for interactive control and long-running tasks.
- Scope-safe process lifecycle management: Ensure spawned processes are cleaned up via
Effect.scoped, and use ChildProcessHandle utilities like exitCode, kill, and fd piping.
- Use case: Stream a long-running linter or formatter output chunk-by-chunk while the process runs, then verify its
ExitCode and fail with a domain error when it exits non-zero.
Quick Start
Use the effect-command-executor skill to run a command and collect its output as lines: Ask it to execute git diff output and return only the changed TypeScript files by using ChildProcess.make('git', ['diff', '--name-only', 'main...HEAD']) with spawner.lines(...).