Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/google/zx
A tool for writing better scripts
https://github.com/google/zx
bash cli javascript nodejs shell
Last synced: about 21 hours ago
JSON representation
A tool for writing better scripts
- Host: GitHub
- URL: https://github.com/google/zx
- Owner: google
- License: apache-2.0
- Created: 2021-05-05T05:50:01.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-01-06T09:34:32.000Z (8 days ago)
- Last Synced: 2025-01-06T10:40:07.582Z (8 days ago)
- Topics: bash, cli, javascript, nodejs, shell
- Language: JavaScript
- Homepage: https://google.github.io/zx/
- Size: 2.09 MB
- Stars: 43,372
- Watchers: 157
- Forks: 1,113
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome - google/zx - A tool for writing better scripts (JavaScript)
- stars - google/zx
- my-awesome-list - zx
- awesome-nodejs - zx - A tool for writing better scripts. ![](https://img.shields.io/github/stars/google/zx.svg?style=social&label=Star) (Repository / Shell)
- awesome-github-repos - google/zx - A tool for writing better scripts (JavaScript)
- awesome-rainmana - google/zx - A tool for writing better scripts (JavaScript)
- awesome-repositories - google/zx - A tool for writing better scripts (JavaScript)
- awesome-github-star - zx
- stars - google/zx - A tool for writing better scripts (JavaScript)
- awesome-list - zx
- awesome-nodejs - zx - Write shell scripts JavaScript. (Packages / Command-line utilities)
- Awesome - `zx` (A tool for writing better scripts)
- StarryDivineSky - google/zx
- awesome-nodejs - zx - 用于编写更好 bash 脚本的工具(Node.js >= 14.13.1)。 ![](https://img.shields.io/github/stars/google/zx.svg?style=social&label=Star) (GIT 仓库 / 脚本执行)
- awesome-star-libs - google / zx
- awesome-nodejs-cn - zx - **star:43370** 编写shell脚本JavaScript。 ![star > 2000][Awesome] (包 / 命令行实用工具)
- awesome-javascript - zx
- awesome-starred - google/zx - A tool for writing better scripts (shell)
README
zx```js
#!/usr/bin/env zxawait $`cat package.json | grep name`
const branch = await $`git branch --show-current`
await $`dep deploy --branch=${branch}`await Promise.all([
$`sleep 1; echo 1`,
$`sleep 2; echo 2`,
$`sleep 3; echo 3`,
])const name = 'foo bar'
await $`mkdir /tmp/${name}`
```Bash is great, but when it comes to writing more complex scripts,
many people prefer a more convenient programming language.
JavaScript is a perfect choice, but the Node.js standard library
requires additional hassle before using. The `zx` package provides
useful wrappers around `child_process`, escapes arguments and
gives sensible defaults.## Install
```bash
npm install zx
```## Documentation
Read documentation on [google.github.io/zx](https://google.github.io/zx/).
## License
[Apache-2.0](LICENSE)
Disclaimer: _This is not an officially supported Google product._