Skip to content

mprocs - Run Multiple Commands in Parallel Cheatsheet

mprocs - Run Multiple Commands in Parallel Cheatsheet

mprocs runs several long-running commands at once, each in its own labeled pane with independent output and scrollback, controlled from a single TUI. It is designed for the common dev situation where you would otherwise open multiple terminals or tmux splits to run a frontend server, a backend, a watcher, and a database. You define the processes once in a config file and start them all together.

Installation

PlatformCommand
Cargo (all platforms)cargo install mprocs
macOS (Homebrew)brew install mprocs
npmnpm install -g mprocs
Arch Linux (AUR)yay -S mprocs
Scoop (Windows)scoop install mprocs
Prebuilt binaryDownload from the GitHub Releases page

Basic Usage

CommandDescription
mprocsStart using mprocs.yaml in the current directory
mprocs "npm run dev" "npm run api"Run ad-hoc commands as panes
mprocs -c path/to/mprocs.yamlUse a specific config file
mprocs --names web,api "npm run dev" "cargo run"Name ad-hoc panes
mprocs --helpFull option list

Configuration (mprocs.yaml)

procs:
  web:
    shell: "npm run dev"
  api:
    shell: "cargo run"
  db:
    shell: "docker compose up postgres"
    autostart: false        # start it manually with the UI
  worker:
    cmd: ["python", "worker.py"]
    cwd: "./backend"
    env:
      LOG_LEVEL: debug
FieldPurpose
shellCommand run through the shell
cmdCommand as an argv list (no shell parsing)
cwdWorking directory for the process
envPer-process environment variables
autostartWhether the process starts on launch
stopHow to stop it (SIGTERM, SIGKILL, hard-kill)

Keyboard Controls

KeyAction
Ctrl+a then j/kMove selection down/up the process list
Ctrl+a then sStart the selected process
Ctrl+a then xStop the selected process
Ctrl+a then rRestart the selected process
Ctrl+a then aToggle focus between list and pane (interact with the process)
Ctrl+a then cCopy mode / scroll the pane output
Ctrl+a then qQuit mprocs (stops all processes)
MouseClick a process to select; scroll its output

The prefix defaults to Ctrl+a; it is configurable. Press the prefix, release, then the action key.

Remote Control

mprocs can be controlled programmatically, which is handy from scripts or editor tasks.

# Send a command to a running mprocs instance over its control socket
mprocs --ctl '{c: restart-proc, proc: web}'

Common Workflows

# One command to bring up a full local stack defined in mprocs.yaml
mprocs

# Quick throwaway: watch tests and a dev server side by side
mprocs --names test,dev "npm test -- --watch" "npm run dev"

# Keep the database pane present but start it only when needed (autostart: false)

mprocs vs Alternatives

ToolModelBest for
mprocsTUI, one pane per processDev process groups, simple config
tmuxFull terminal multiplexerSessions, splits, remote persistence
foreman/overmindProcfile runnersProcfile-based process management
GNU parallelBatch parallelismRunning many short jobs, not long-lived servers

Resources