Work / concurrently

concurrently: Run commands concurrently. Like `npm run watch-js &

Run commands concurrently. Like `npm run watch-js & npm run watch-less` but better.

Open Source · 2026 · Active

Source on GitHub ↗ · Need one like it? →

How does it work?

[](https://github.com/open-cli-tools/concurrently/releases) [](https://github.com/open-cli-tools/concurrently/blob/main/LICENSE) [](https://www.npmjs.com/package/concurrently) [](https://github.com/open-cli-tools/concurrently/actions/workflows/ci.yml) [](https://coveralls.io/github/open-cli-tools/concurrently?branch=main)

Run multiple commands concurrently. Like npm run watch-js & npm run watch-less but better.

Table of Contents

Why

I like task automation with npm but the usual way to run multiple commands concurrently is npm run watch-js & npm run watch-css. That's fine but it's hard to keep on track of different outputs. Also if one process fails, others still keep running and you won't even notice the difference.

Another option would be to just run all commands in separate terminals. I got tired of opening terminals and made concurrently.

Features:

Installation

concurrently can be installed in the global scope (if you'd like to have it available and use it on the whole system) or locally for a specific package (for example if you'd like to use it in the scripts section of your package):

\* It's recommended to add concurrently to devDependencies as it's usually used for developing purposes. Please adjust the command if this doesn't apply in your case.

Usage

Note The concurrently command is also available under the shorthand alias conc.

The tool is written in Node.js, but you can use it to run any commands.

Remember to surround separate commands with quotes:

concurrently 'command1 arg' 'command2 arg'

Otherwise concurrently would try to run 4 separate commands: command1, arg, command2, arg.

[!IMPORTANT] Windows only supports double quotes: ``bash concurrently "command1 arg" "command2 arg" ` Remember to escape the double quotes in your package.json when using Windows: `json "start": "concurrently \"command1 arg\" \"command2 arg\"" ``

You can always check concurrently's flag list by running concurrently --help. For the version, run concurrently --version.

Check out documentation and other usage examples in the docs directory.

API

concurrently can be used programmatically by using the API documented below:

concurrently(commands[, options])

with the shape { command, name, prefixColor, env, cwd, ipc }.

Default: process.cwd().

Default: 0.

to read the input from. Should only be used in the rare instance you would like to stream anything other than process.stdin. Overrides handleInput.

Can be an array containing the strings success (status code zero) and/or failure (non-zero exit status).

to write logs to. Default: process.stdout.

Possible values: index, pid, time, command, name, none, or a template (eg [{time} process: {pid}]). Default: the name of the process, or its index if no name is set. Templates can wrap any portion of the prefix with {color} and {/color} to restrict coloring to that region (eg [{color}{name}{/color}] colors only the name, leaving the brackets uncolored). If either marker is omitted the missing side is implicit, so a template with no markers is colored in full.

Supports all Chalk color functions: #RRGGBB, bg#RRGGBB, hex(), bgHex(), rgb(), bgRgb(), ansi256(), bgAnsi256(). Functions and modifiers can be chained (e.g., rgb(255,136,0).bold, black.bgHex(#00FF00).dim). If concurrently would run more commands than there are colors, the last color is repeated, unless if the last color value is auto which means following colors are automatically picked to vary. Prefix colors specified per-command take precedence over this list.

be logged, without any prefixes, coloring or extra stuff. Can be overridden per command.

If first, only the first process to exit will make up the success of the run; if last, the last process that exits will determine whether the run succeeds. Anything else means all processes should exit successfully.

to use when prefixing with time. Default: yyyy-MM-dd HH:mm:ss.SSS

Returns: an object in the shape { result, commands }. - result: a Promise that resolves if the run was successful (according to successCondition option), or rejects, containing an array of CloseEvent, in the order that the commands terminated. - commands: an array of all spawned Commands.

Example:

const concurrently = require('concurrently');
const { result } = concurrently(
  [
    'npm:watch-*',
    { command: 'nodemon', name: 'server' },
    { command: 'deploy', name: 'deploy', env: { PUBLIC_KEY: '...' } },
    {
      command: 'watch',
      name: 'watch',
      cwd: path.resolve(__dirname, 'scripts/watchers'),
    },
  ],
  {
    prefix: 'name',
    killOthersOn: ['failure', 'success'],
    restartTries: 3,
    cwd: path.resolve(__dirname, 'scripts'),
  },
);
result.then(success, failure);

Command

An object that contains all information about a spawned command, and ways to interact with it. It has the following properties:

Read the full README on GitHub →

What else did I build?

View all →

GXBridge-MCP

Control Mitsubishi GX Works3 and your PLC with AI — an MCP server for any agent GX Works3 · Industrial Automation

eplanbridge

Drive EPLAN Pro Panel 2022.0.3 from outside the application — and build a 6-axis robot-arm control schematic with it. C# · EPLAN

tovex-cli-showcase

tovex-cli: command-line control of Siemens TIA Portal and live S7 PLCs, built for AI agents. Public overview; source is private.

/ Work / {{ project.name }} {{ project.category }}

{{ project.name }}{{ project.headline }}

{{ project.tagline }}

{{ m }}

What is it?

{{ project.description }}

npm i {{ project.npm }}

What does it do?

{{ f.n }}

{{ f.text }}

What is it made of?

{{ t }}

How does it work?

{{ b.s }}

{{ b.s }}

{{ b.s }}

{{ b.s }}
{{ b.s }}
  • {{ it }}

Read the full README on GitHub →

What do people ask about it?

{{ f.q }}

{{ f.a }}

What did I write about it?

What else did I build?

View all →

/ Work

Where did
it go?

That project doesn't exist. Head back to the full list.