Run multiple project commands in parallel from a simple JSON config.
spcrun discovers a spcrun.config.json in your current working directory, then starts each configured command in its respective subfolder, prefixing output with a colored tag for easy scanning.
From source (global CLI):
npm install
npm run build
npm install -g .
spcrun --helpFrom source (local/dev without global install):
npm install
npm run dev -- --help
# or
npm run dev-selectNote: Installing globally from this repo (
npm install -g .) makes thespcruncommand available on your PATH.
spcrun [options]Options:
-s, --select— interactively select whichpathentries to run.-c, --config <path>— path to a config file (defaults to./spcrun.config.json).
Behavior:
- Without
--select, only entries withisEnabled: trueare run. - With
--select, you choose one or morepaths interactively;isEnabledis ignored. - Each command runs with
shell: truein the directory resolved fromprocess.cwd()+path. - Output from each process is line-prefixed with a colored
[path]label. - All environment variables from the parent process are passed through.
Exit codes:
- Exits
0if all commands exit with code0. - Exits
1if any command exits non‑zero (also prints how many failed).
Stopping:
- Press Ctrl+C to stop; spcrun will attempt to kill all child processes before exiting.
- On Windows, Ctrl+Break is also handled.
Default location: ./spcrun.config.json (override with --config path/to/file.json).
Schema:
{
"commands": [
{
"path": "string",
"run": "string",
"isEnabled": "boolean (optional)"
}
]
}Field notes:
path: Folder (relative to where you runspcrun) to use as the working directory.run: The command to execute (e.g.npm run dev,pnpm start,vite,node server.js).isEnabled(optional): If true, the entry runs by default when not using--select.
{
"commands": [
{ "path": "apps/web", "run": "npm run dev", "isEnabled": true },
{ "path": "packages/ui", "run": "npm run dev", "isEnabled": true }
]
}{
"commands": [
{ "path": "apps/web", "run": "npm run dev -- --port 3000", "isEnabled": true },
{ "path": "apps/admin", "run": "npm run dev -- --port 3001", "isEnabled": true }
]
}Run all enabled services:
spcrunInteractively choose which to run:
spcrun --selectUse a custom config path:
spcrun --config ./configs/spcrun.local.jsonEach process prints prefixed lines, e.g.:
[apps/web] ready in 500ms
[packages/ui] built successfully
Different colors are used per process for quick visual separation. A spinner shows while a process is starting and stops on first output.
- "Config file not found": Ensure
spcrun.config.jsonexists in the current directory or pass--config. - "Invalid JSON": Fix JSON syntax errors reported for your config file.
- "Invalid command at index …": Each entry must include non‑empty
pathandrunstrings. - Commands not starting: Confirm the
pathexists and the command runs manually in that folder.
MIT