google/zx ? reverse-engineered prompt

Reverse engineered prompt

Build me a small command line tool for writing shell scripts in JavaScript, something like a nicer way to automate tasks with the power of bash but without all the usual pain.

I want to be able to run commands with backticks in a JS file, capture output, pipe commands together, and run multiple commands in parallel when needed. It should handle normal shell escaping for me so things like file names with spaces do not break. It should work on Linux, macOS, and Windows, and feel easy to use from either CommonJS or ESM. Also make it work well in both plain JavaScript and TypeScript.

Please include a few simple examples, like reading from package.json, getting the current git branch, running a deploy command with a variable, and creating a folder from a string with spaces. If you need to, look up the current docs online so the behavior matches what people expect from modern script tooling.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab