https://github.com/efureev/parallel
https://github.com/efureev/parallel
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/efureev/parallel
- Owner: efureev
- Created: 2024-03-22T12:02:14.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-13T16:51:39.000Z (over 1 year ago)
- Last Synced: 2025-01-15T09:02:36.588Z (about 1 year ago)
- Language: Go
- Size: 1.5 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Parallel
[](https://raw.githack.com/wiki/efureev/reggol/coverage.html)
[](https://github.com/efureev/parallel/actions/workflows/test.yml)
A tool for running multiple console commands in parallel with output display in the terminal.
## Installation
```shell script
go install github.com/efureev/parallel@latest
```
## Usage
If you have a configuration file `.parallelrc.yaml` in the execution folder:
```shell script
parallel
```
If the configuration file is located elsewhere:
```shell script
parallel -f /path/to/config/flow.yaml
```
## Screenshots



## Configuration File Structure
Language: `yaml`
```yaml
commands: # list of parallel commands
php-server: # command chain name
artisan: # command name
pipe: true # listen to stdOutput & stdErr for this command
cmd: [ 'php', 'artisan', 'serve', '--port', '8010' ] # command and its arguments
dir: 'app' # execution directory
web-services: # command mode
nginx-cmd:
pipe: true
cmd: [ 'docker', 'container', 'run', '--rm', '-p', '8090:80', '--name', 'nginx', 'nginx' ]
format:
cmdName: '%CMD_NAME% %CMD_ARGS%' # command name formatting
docker-services: # Docker mode
nginx-docker:
docker:
image:
name: 'nginx'
# tag: 'v1' # default 'latest'
# pull: 'always' # default: none
ports: [
'127.0.0.1:80:8080',
'127.0.0.1:443:8443',
]
# removeAfterAll: false # default: true
# cmd: 'exec' # default: 'run'
frontend:
list-files: # this command will execute without pipe
cmd: [ 'ls', '-la' ]
yarn-dev:
pipe: true
cmd: [ 'yarn', 'dev' ]
dir: 'app'
network:
ping-test:
pipe: true
cmd: [ 'ping', '-c', '3','ya.ru' ]
```
## Features
- **Command Chains**: Group related commands into logical blocks for better organization
- **Docker Support**: Built-in support for running Docker containers with automatic command formatting
- **Colored Output**: Each command chain gets a unique color for better readability
- **Output Control**: Control which commands should display their output via the `pipe` parameter
- **Working Directories**: Specify custom directories for command execution
- **Command Formatting**: Customize how command names are displayed in the output
- **Auto-cleanup**: Docker containers are automatically removed after execution (configurable)
- **Flexible Configuration**: Support for both direct commands and Docker-based workflows