github →

Overview

sindresorhus/execa

Last analyzed 6/11/2026, 4:30:37 AM · default branch main

7,516255 forksJavaScript18 open issues

Summary

Execa is a Node.js process-execution library that replaces the native `child_process` module with a safer, more ergonomic API for spawning shell commands and binaries. It provides strongly-typed synchronous and asynchronous runners, cross-platform argument escaping, built-in piping between processes, IPC messaging, and user-defined generator transforms over stdio streams. The runtime handles process lifecycle edge cases—including timeouts, graceful cancellation, forceful termination, verbose diagnostics, and flexible redirection of file descriptors—while normalizing behavior across platforms.

Features
13
Owners
24
Issues
0
Requests
1
Architecture
  • Public API & Type Facadeentryshared

    Exposes the library’s main entry points (index.js / index.d.ts), method variants (async, sync, script, command, node), output converters (iterable, duplex, readable), and the comprehensive TypeScript type system.

  • Subprocess Runtime & Stream Processingcoreprocessing

    Drives the full subprocess lifecycle—spawning, waiting, collecting stdout/stderr, resolving exit states, applying timeouts/kills/cancellation, piping between processes, and running user-defined generator transforms.

  • Argument & Stdio Configurationcoreshared

    Normalizes and validates call-time options (commands, encoding, file URLs, FD options, CWD, escaping) and stdio direction/type mappings into internal structures consumed by the runtime engine.

  • Inter-Process Communicationcoreprocessing

    Manages Node.js IPC channels between parent and child processes, including message buffering, validation, graceful forwarding, and request/response patterns.

  • Internal Utilities & Diagnosticsshared

    Low-level primitives and cross-cutting helpers used across the codebase, such as deferred promises, abort-signal composition, standard-stream detection, and verbose runtime diagnostics.

  • Test & Verification Infrastructureinfra

    Comprehensive functional test suites, TypeScript type tests (test-d), shared test helpers, and fixture scripts used to validate behavior across the full matrix of supported options and platforms.

Top owners
  • ehmicky432 commits
  • Sindre Sorhus29 commits
  • ehmicky15 commits
  • M.K.3 commits
  • Aaron Casanova2 commits
View all 24