# concurrently

> Node.js CLI that runs multiple shell commands in parallel with prefixed, colored output and options to kill or restart processes. Works on Windows.

Stars: 7.9k · Language: TypeScript · License: MIT · Categories: Dev Tools

- Repository: https://github.com/open-cli-tools/concurrently
- Website: https://www.npmjs.com/package/concurrently
- Page: https://www.trmn.sh/tools/concurrently

## Install

- npm: `npm i -g concurrently`
- Yarn: `yarn global add concurrently`
- pnpm: `pnpm add -g concurrently`

## Overview

concurrently is a command-line runner that starts several commands at the same time from a single terminal. It replaces patterns like `npm run watch-js & npm run watch-css` and opening a separate terminal per process. Each command is passed as a quoted argument, for example `concurrently 'command1 arg' 'command2 arg'`. It is written in Node.js but can run any command, and it is also available under the alias `conc`. It works cross-platform, including Windows, where only double quotes are supported.

Output from each process is prefixed so it can be told apart. Prefixes can be the process name, index, pid, time, or command, or a custom template such as `[{time} process: {pid}]`. Colors can be set per command or from a list, using Chalk color functions or `auto`. A raw mode prints only process output. The `--kill-others` switch stops all commands when one exits. The API also provides `killOthersOn` for success or failure, `maxProcesses`, `restartTries` and `restartDelay`, and a `successCondition` of `first`, `last`, or all.

concurrently can also be used programmatically. `concurrently(commands, options)` accepts command strings or objects with `command`, `name`, `prefixColor`, `env`, `cwd`, and `ipc`. It returns `{ result, commands }`, where `result` is a Promise that resolves or rejects with an array of `CloseEvent`s. Each `Command` object exposes `pid`, `state`, `stdin`, RxJS observables for stdout, stderr, and close events, plus `start()`, `send()`, and `kill([signal])`. Input can be forwarded to commands from stdin.

It suits JavaScript and Node.js developers who run watchers, dev servers, and build tasks side by side. A typical use is in the `scripts` section of a package.json. It can be installed locally as a devDependency or globally.

### Installation

```bash
# via npm
npm i -g concurrently
```

```bash
# via Yarn
yarn global add concurrently
```

```bash
# via pnpm
pnpm add -g concurrently
```

![concurrently demo](https://media.trmn.sh/cached/d2bde8fccc43a7badc0c50c678d2e15a629f95d2ee011da1abcab49a0693523c.gif)

## Alternatives

- [npm-check-updates](https://www.trmn.sh/tools/npm-check-updates.md): CLI that upgrades package.json dependencies to their latest versions, preserving semver range operators. Works with npm, yarn, pnpm, deno, and bun. (TypeScript, 10.3k stars)
- [tsx](https://www.trmn.sh/tools/tsx.md): TypeScript Execute (tsx): a CLI for running TypeScript files directly in Node.js. (TypeScript, 12.2k stars)
- [Supabase CLI](https://www.trmn.sh/tools/supabase-cli.md): Runs the Supabase stack locally, manages Postgres migrations, deploys Edge Functions, and generates TypeScript types from your database schema. (TypeScript, 2.4k stars)
- [Vercel CLI](https://www.trmn.sh/tools/vercel-cli.md): Command-line interface for the Vercel platform: deploy projects, run them locally with vercel dev, and manage deployments from the terminal. (TypeScript, 16.5k stars)
- [Angular CLI](https://www.trmn.sh/tools/angular-cli.md): Command-line tool for creating, serving, scaffolding, and maintaining Angular applications and workspaces via the ng command. (TypeScript, 27.0k stars)

---

Canonical: https://www.trmn.sh/tools/concurrently
