sindresorhus/execa is a Frontend project on GitHub, written primarily in JavaScript. It has 7.6k stars. Process execution for humans
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
Sindre's open source work is supported by the community
Special thanks to:
Fast remote container builds and GitHub Actions runners.
Execa runs commands in your script, application or library. Unlike shells, it is optimized for programmatic usage. Built on top of the child_process core module.
Features
Simple syntax: promises and template strings, like zx.
Script interface.
No escaping nor quoting needed. No risk of shell injection.
Execute locally installed binaries without npx.
Improved Windows support: shebangs, PATHEXT, graceful termination, and more.
Detailed errors, verbose mode and custom logging, for debugging.
Pipe multiple subprocesses better than in shells: retrieve intermediate results, use multiple sources/destinations, unpipe.
Split the output into text lines, or iterate progressively over them.
Strip unnecessary newlines.
Pass any input to the subprocess: files, strings, Uint8Arrays, iterables, objects and almost any other type.
Return almost any type from the subprocess, or redirect it to files.
Get interleaved output from stdout and stderr similar to what is printed on the terminal.
Retrieve the output programmatically and print it on the console at the same time.
Transform or filter the input and output with simple functions.
Pass Node.js streams or web streams to subprocesses, or convert subprocesses to a stream.
Exchange messages with the subprocess.
Ensure subprocesses exit even when they intercept termination signals, or when the current process ends abruptly.
Install
npm install execa
Documentation
Execution:
▶️ Basic execution
💬 Escaping/quoting
💻 Shell
📜 Scripts
🐢 Node.js files
🌐 Environment
❌ Errors
🏁 Termination
Input/output:
🎹 Input
📢 Output
📃 Text lines
🤖 Binary data
🧙 Transforms
Advanced usage:
🔀 Piping multiple subprocesses
⏳️ Streams
📞 Inter-process communication
🐛 Debugging
📎 Windows
🔍 Difference with Bash and zx
🐭 Small packages
🤓 TypeScript
📔 API reference
Examples
Execution
Simple syntax
import {execa} from 'execa';
const {stdout} = await execa`npm run build`;
// Print command's output
console.log(stdout);
// Similar to: npm run build < input.txt
await execa({stdin: {file: 'input.txt'}})`npm run build`;
File output
// Similar to: npm run build > output.txt
await execa({stdout: {file: 'output.txt'}})`npm run build`;
Split into text lines
const {stdout} = await execa({lines: true})`npm run build`;
// Print first 10 lines
console.log(stdout.slice(0, 10).join('\n'));
Streaming
Iterate over text lines
for await (const line of execa`npm run build`) {
if (line.includes('WARN')) {
console.warn(line);
}
}
Transform/filter output
let count = 0;
// Filter out secret lines, then prepend the line number
const transform = function * (line) {
if (!line.includes('secret')) {
yield `[${count++}] ${line}`;
}
};
await execa({stdout: transform})`npm run build`;
No homepage URL was recorded for sindresorhus/execa in TopGit's last sync. The README tab above frequently contains screenshots and demo links, or check the repository description on GitHub.
How does sindresorhus/execa compare to other Frontend projects?
sindresorhus/execa is tracked by TopGit in the Frontend category, with 7.6k GitHub stars and written in JavaScript. Browse the Frontend topic page on TopGit to compare it against similar projects by stars and activity.
How many stars does sindresorhus/execa have?
sindresorhus/execa has 7.6k GitHub stars — refresh the page for the live number, or check github.com/sindresorhus/execa. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
Is sindresorhus/execa open source?
Yes — sindresorhus/execa ships under the MIT license, which makes its source code freely readable (and, depending on license terms, forkable and reusable). Source: github.com/sindresorhus/execa.
What else is in the Frontend space?
sindresorhus/execa is tracked by TopGit under the Frontend category, alongside 10 GitHub-tagged topics. Trending and Topics pages list peer repositories of comparable stars and language.
What is sindresorhus/execa?
sindresorhus/execa (sindresorhus/execa) is a JavaScript project on GitHub. From the project's own README: Process execution for humans
Where do I read more about sindresorhus/execa?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/sindresorhus/execa is the definitive source.
Read full README in the tab above.
Still deciding about execa?
One click hands the question to an AI along with this page — see what it says about execa.