# mprocs — Run Multiple Processes in a Split Terminal > mprocs is a TUI tool for running and managing multiple long-running processes side by side in a single terminal, with log scrolling and process control. ## Install Save as a script file and run: # mprocs — Run Multiple Processes in a Split Terminal ## Quick Use ```bash # Install brew install mprocs # or: cargo install mprocs / nix-env -iA nixpkgs.mprocs # Run multiple commands mprocs "npm run dev" "npm run api" "docker compose up db" # Or use a config file cat > mprocs.yaml << EOF procs: frontend: cmd: ["npm", "run", "dev"] backend: cmd: ["npm", "run", "api"] database: cmd: ["docker", "compose", "up", "db"] EOF mprocs --config mprocs.yaml ``` ## Introduction mprocs runs multiple commands in parallel and displays their output in a terminal UI with a selectable process list. It is designed for development workflows where you need to watch several long-running services simultaneously — a frontend dev server, a backend API, a database, and a log tailer — without juggling multiple terminal tabs. ## What mprocs Does - Launches multiple processes from the command line or a YAML config file - Displays a sidebar with process names, statuses, and exit codes - Streams each process's stdout/stderr in a scrollable output pane - Allows stopping, restarting, or sending signals to individual processes - Supports keyboard shortcuts for switching between process views ## Architecture Overview mprocs is a Rust application that spawns child processes via the OS process API and captures their stdout and stderr streams. A TUI layer built on crossterm renders a split-pane layout: a process list on the left and the selected process's output on the right. Each process's output is stored in a scrollback buffer. User input is routed to either the TUI (navigation, restart) or the selected process's stdin. ## Self-Hosting & Configuration - Install via Homebrew, Cargo, Nix, or download a prebuilt binary from GitHub Releases - Pass commands directly as CLI arguments for quick ad-hoc use - Define persistent setups in a `mprocs.yaml` file with named process entries - Configure per-process environment variables, working directories, and auto-restart behavior - Set keybindings in the config to match your workflow preferences ## Key Features - Split-pane TUI with a process sidebar and scrollable output per process - YAML config file for repeatable multi-service development setups - Stop, restart, or send signals to individual processes without leaving the TUI - Auto-restart option to recover crashed services during development - Lightweight single binary with no runtime dependencies ## Comparison with Similar Tools - **tmux / screen** — General terminal multiplexers, require manual pane layout and scripting - **Foreman / Overmind** — Procfile-based runners, output is interleaved rather than per-pane - **concurrently** — Node.js-based, interleaves output with color prefixes, no TUI - **Process Compose** — Docker Compose-like YAML, richer process lifecycle but heavier config - **just + parallel** — Task runner approach, no live TUI or per-process scrollback ## FAQ **Q: Can I interact with a running process's stdin?** A: Yes. Select the process in the sidebar and type — keystrokes are forwarded to the process's stdin. **Q: Does mprocs support auto-restart on crash?** A: Yes. Set `autostart: true` and `autorestart: true` in the YAML config for a process entry. **Q: How is mprocs different from tmux?** A: mprocs is purpose-built for managing named long-running commands with a structured sidebar. tmux is a general-purpose terminal multiplexer requiring manual pane setup. **Q: Can I use mprocs in CI pipelines?** A: It is primarily a development TUI tool. For CI, consider tools like GNU parallel or Make with background jobs. ## Sources - https://github.com/pvolok/mprocs - https://github.com/pvolok/mprocs#configuration --- Source: https://tokrepo.com/en/workflows/asset-bbbe9ecc Author: Script Depot