https://github.com/rustunit/parallelrun
Rust cli tool for running multiple commands in parallel
https://github.com/rustunit/parallelrun
cli terminal
Last synced: 9 months ago
JSON representation
Rust cli tool for running multiple commands in parallel
- Host: GitHub
- URL: https://github.com/rustunit/parallelrun
- Owner: rustunit
- License: mit
- Created: 2024-09-14T13:01:57.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-10-21T09:59:39.000Z (over 1 year ago)
- Last Synced: 2025-04-21T07:00:51.486Z (10 months ago)
- Topics: cli, terminal
- Language: Rust
- Homepage: https://crates.io/crates/parallelrun
- Size: 104 KB
- Stars: 21
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE-MIT
Awesome Lists containing this project
README
# parallelrun
[![crates.io][sh_crates]][lk_crates]
[![ci][sh_ci]][lk_ci]
[![discord][sh_discord]][lk_discord]
[sh_crates]: https://img.shields.io/crates/v/parallelrun.svg
[lk_crates]: https://crates.io/crates/parallelrun
[sh_ci]: https://github.com/rustunit/parallelrun/workflows/ci/badge.svg
[lk_ci]: https://github.com/rustunit/parallelrun/actions
[sh_discord]: https://img.shields.io/discord/1176858176897953872?label=discord&color=5561E6
[lk_discord]: https://discord.gg/rQNeEnMhus

Runs several commands concurrently.
Heavily inspired by the `nodejs` tool [concurrently](https://www.npmjs.com/package/concurrently).
Supported and tested on Linux, MacOS and Windows.
Supported Options:
* `--kill-others` (terminates all other commands as soon as one exits)
# Demo
[](https://asciinema.org/a/677736?autoplay=1)
# Installation
```
cargo install parallelrun
```
# Example
```sh
$ parallelrun --kill-others "echo wait 2 && sleep 2" "echo wait 3 && sleep 3"
[0] wait 2
[1] wait 3
[0] echo wait 2 && sleep 2 exited with code 0
--> Sending SIGTERM to other processes..
[1] echo wait 3 && sleep 3 exited with code SIGTERM
```
# TODO
- [ ] support more `concurrently` arguments