New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

parallel-sh

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parallel-sh

Run multiple commands in parallel with pretty Docker-like output

latest
Source
npmnpm
Version
1.1.2
Version published
Weekly downloads
3
50%
Maintainers
1
Weekly downloads
 
Created
Source

parallel-sh

Run multiple shell commands in parallel with pretty, Docker-like output. No third-party dependencies required.

Features

  • Run multiple commands in parallel
  • Colorful, prefixed output for each command
  • Supports config file or direct command-line input
  • Graceful shutdown on Ctrl+C
  • No third-party dependencies

Installation

You can run directly with npx (no install needed):

npx parallel-sh --commands 'cd frontend && npm run dev; cd backend && npm run dev'

Or install globally:

npm install -g parallel-sh
parallel-sh --commands 'cd frontend && npm run dev; cd backend && npm run dev'

Or locally in your project:

npm install parallel-sh --save-dev
npx parallel-sh --commands 'cd frontend && npm run dev; cd backend && npm run dev'

Usage

Command-line Options

  • --commands <cmds>: Pass semicolon-separated shell commands to run in parallel.
  • --config <file>: Use a JSON configuration file specifying commands to run.
  • --minLength <number>: Minimum width for the service name column (default: 4).
  • --maxLength <number>: Maximum width for the service name column (default: 12).
  • --help: Show help message and usage examples.

Examples

Run commands directly

npx parallel-sh --commands 'cd frontend && npm run dev; cd backend && npm run start:dev'

Using a config file

Create a file (e.g., commands.json):

{
  "minLength": 6,
  "maxLength": 16,
  "commands": [
    {
      "name": "frontend",
      "command": "npm run dev",
      "cwd": "./frontend"
    },
    {
      "name": "backend",
      "command": "npm run start:dev",
      "cwd": "./backend"
    }
  ]
}

Then run:

npx parallel-sh --config commands.json

Show help

npx parallel-sh --help

minLength and maxLength

You can control the minimum and maximum width of the service name column in the output using --minLength and --maxLength (CLI) or minLength and maxLength (config file).

  • minLength: Minimum width for the service name column (default: 4)
  • maxLength: Maximum width for the service name column (default: 12)

Example:

npx parallel-sh --commands 'echo frontend; echo backend' --minLength 8 --maxLength 20

Or in your config file:

{
  "minLength": 8,
  "maxLength": 20,
  "commands": [ ... ]
}

License

MIT

Keywords

npm

FAQs

Package last updated on 05 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts