concurrently
Run multiple npm scripts concurrently for efficient development workflows.
3. Used by agents' projects
Dependency in 484 public GitHub projects set up for AI coding agents that we scanned (7.7%).
4. Agent access
Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.
nodejs.org/llms.txtFrom the package registry and GitHub, checked daily. Tap a verdict to see its source.How we checkedReport an error
What concurrently does
concurrently runs several commands from one terminal, labels each line of output, and lets you set what happens to the rest when one command exits. The README pitches this as a fix for the plain shell <code>&</code>, where a dead process can go unnoticed.
concurrently popularity
Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated
How concurrently is used
- concurrently is a dependency in 484 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (9.9% of the 4,867 JavaScript/TypeScript ones), #5 of 299 in dev workflow and config.
- Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 1,048; those are left out of every share on this page.
- Projects that use it most often also use Vite (57.6%), Laravel Vite Plugin (31.0%), Axios (27.1%).
- It is more common in projects set up for Junie (54.1%) than for GitHub Copilot (7.1%).
By coding agent
Often used with
concurrently in practice
Strengths
Output is prefixed per command, and the colors are configurable. The README lists "Output is easy to follow with prefixes" among its three headline features, next to Windows support and the kill switch.
<code>killOthersOn</code> takes <code>success</code>, <code>failure</code> or both. When the first command exits with one of those statuses, the remaining commands are killed. This avoids the case where a broken process sits unnoticed beside healthy ones.
<code>successCondition</code> can be <code>first</code> or <code>last</code>. Any other value means every process must exit successfully. This decides whether the run, and so the script, passes.
<code>restartTries</code> and <code>restartDelay</code> restart a process that dies, with a delay in milliseconds between attempts. Both default to 0.
Watch out for
Each command must be wrapped in quotes. Without them, <code>concurrently command1 arg command2 arg</code> starts four commands.
The README marks this as important: Windows only accepts double quotes. Inside <code>package.json</code> those quotes must be escaped, as in <code>"concurrently \"command1 arg\" \"command2 arg\""</code>.
If no <code>shell</code> is set, the shell is chosen from context: <code>npm_config_script_shell</code> if present, otherwise <code>cmd.exe</code> on Windows or <code>/bin/sh</code> elsewhere. The same command string can therefore run under different shells.
Run watchers, a named server and per-command env from Node
import path from 'node:path';
import { concurrently } from 'concurrently';
const { result } = concurrently(
[
'npm:watch-*',
{ command: 'nodemon', name: 'server' },
{ command: 'deploy', name: 'deploy', env: { PUBLIC_KEY: '...' } },
{
command: 'watch',
name: 'watch',
cwd: path.resolve(import.meta.dirname, 'scripts/watchers'),
},
],
{
prefix: 'name',
killOthersOn: ['failure', 'success'],
restartTries: 3,
cwd: path.resolve(import.meta.dirname, 'scripts'),
},
);
result.then(success, failure);More about concurrently
Funding
- GitHub Sponsors: https://github.com/gustavohenke
- GitHub Sponsors: https://github.com/paescuj
- Own page: https://github.com/open-cli-tools/concurrently?sponsor=1
- 2 GitHub sponsors
Packages around it
- vite: Dev server and bundler
- laravel-vite-plugin: Laravel integration for Vite
- tailwindcss: Utility-first CSS
- prettier: Code formatter
- axios: HTTP client
- cors: CORS middleware for Express
More in Dev workflow and config
Alternatives
concurrently This page
Get started
Install it.
npm install concurrentlyRules for your agent
## concurrently
- Install it as a dev dependency (`npm i -D concurrently`, `pnpm add -D concurrently`, `bun add -d concurrently`). The README recommends `devDependencies` because it is usually a development tool.
- Wrap each command in its own quotes: `concurrently "command1 arg" "command2 arg"`. Unquoted arguments are split into separate commands.
- Use double quotes, escaped inside `package.json`, because Windows only supports double quotes: `"start": "concurrently \"command1 arg\" \"command2 arg\""`.
- Add `--kill-others` (or `killOthersOn: ['failure']` in the API) so one dead process does not leave the others running unnoticed.
- In the API, set `successCondition` (`first`, `last`, or all) on purpose. It decides whether `result` resolves or rejects.
- Treat an exit code of `null` as an abnormal termination. concurrently will exit non-zero.
- Set `shell` explicitly if a command depends on a particular shell. Otherwise it falls back to `npm_config_script_shell`, `cmd.exe` on Windows, or `/bin/sh` elsewhere.