# cross-spawn

> Cross-platform child_process spawn and spawnSync for Node.js

Source: https://talira.ai/catalog/cross-spawn-kd68kam2
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / subprocesses](https://talira.ai/categories/libraries/subprocesses), [languages / javascript](https://talira.ai/categories/languages/javascript)
- Licence: MIT[^2]
- Pricing: Free and open source[^2]
- Pricing notes: Free and open source (MIT).
- Free tier: yes[^2]
- Backed by: [Made With MOXY Lda](https://talira.ai/orgs/moxy.md)

cross-spawn is a drop-in replacement for Node.js's child_process spawn and spawnSync that works the same on Windows as on Unix. On Windows it handles what Node's own spawn gets wrong: PATHEXT, shebangs, commands with spaces or POSIX relative paths, and the command shims in node_modules/.bin, escaping arguments the way the Microsoft C runtime parses them. Install it from npm as cross-spawn.

## Links

- GitHub: https://github.com/moxystudio/node-cross-spawn

## Problems it solves

- my Node.js script that spawns npm works on Mac but fails on Windows
- run a command from node_modules/.bin in a child process on Windows
- spawn a child process in Node without hand-escaping shell arguments

## Features

- drop-in replacement for spawn and spawnSync
- handles PATHEXT and shebangs on Windows
- commands with spaces and relative paths
- node_modules/.bin command shims
- Windows argument escaping by Microsoft C runtime rules

## Limitations

- With options.shell, all of its fixes are turned off, as in Node.js.[^1]

## Trust

Overall: 0.54 out of 1.
Signals: maintenance 0.83, adoption 0.61, momentum 0.29, community 0.55, backing 0.30, extensibility 0.00.

- last commit yesterday
- 35 commits in the last 90 days
- latest release v7.1.2 yesterday
- 1.2k GitHub stars
- 23 contributors
- backed by Made With MOXY Lda

## Alternatives

- [Execa](https://talira.ai/catalog/execa-nxazjf16.md): Process execution for humans: run subprocesses from Node.js without shell escaping

## Sources

[^1]: https://github.com/moxystudio/node-cross-spawn/blob/master/README.md (checked 29 Nov 2026)
[^2]: https://github.com/moxystudio/node-cross-spawn/blob/master/LICENSE (checked 29 Nov 2026)
