{"id":13475218,"url":"https://github.com/pvolok/mprocs","last_synced_at":"2025-05-13T18:07:53.027Z","repository":{"id":37207156,"uuid":"401345297","full_name":"pvolok/mprocs","owner":"pvolok","description":"Run multiple commands in parallel","archived":false,"fork":false,"pushed_at":"2025-05-08T19:58:42.000Z","size":2429,"stargazers_count":1676,"open_issues_count":68,"forks_count":59,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-05-08T20:41:17.854Z","etag":null,"topics":["cli","linux","macos","rust","terminal","tui","windows"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pvolok.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-08-30T13:00:56.000Z","updated_at":"2025-05-08T19:58:46.000Z","dependencies_parsed_at":"2023-09-24T23:03:55.261Z","dependency_job_id":"4d6def6c-5f5f-4bde-a7fa-cde264d54234","html_url":"https://github.com/pvolok/mprocs","commit_stats":{"total_commits":283,"total_committers":20,"mean_commits":14.15,"dds":"0.10600706713780916","last_synced_commit":"f51fd3fc97a0844e314271411bad05e8c6f59cc3"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvolok%2Fmprocs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvolok%2Fmprocs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvolok%2Fmprocs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pvolok%2Fmprocs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pvolok","download_url":"https://codeload.github.com/pvolok/mprocs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254000849,"owners_count":21997441,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","linux","macos","rust","terminal","tui","windows"],"created_at":"2024-07-31T16:01:18.425Z","updated_at":"2025-05-13T18:07:53.015Z","avatar_url":"https://github.com/pvolok.png","language":"Rust","readme":"# mprocs\n\n_mprocs_ runs multiple commands in parallel and shows output of each command\nseparately.\n\nWhen you work on a project you very often need the same list of commands to be\nrunning. For example: `webpack serve`, `jest --watch`, `node src/server.js`.\nWith mprocs you can list these command in `mprocs.yaml` and run all of them by\nrunning `mprocs`. Then you can switch between outputs of running commands and\ninteract with them.\n\nIt is similar to\n[concurrently](https://github.com/open-cli-tools/concurrently) but _mprocs_\nshows output of each command separately and allows to interact with processes\n(you can even work in _vim_ inside _mprocs_).\n\n\u003c!--ts--\u003e\n\n- [Screenshots](#screenshots)\n- [Installation](#installation)\n  - [Download binary (Linux, Macos, Windows)](#download-binary-linux-macos-windows)\n  - [npm (Linux, Macos, Windows)](#npm-linux-macos-windows)\n  - [homebrew (Macos)](#homebrew-macos)\n  - [cargo (All platforms)](#cargo-all-platforms)\n  - [scoop (Windows)](#scoop-windows)\n  - [AUR (Arch Linux)](#aur-arch-linux)\n  - [MPR (Debian/Ubuntu)](#mpr-debianubuntu)\n- [Usage](#usage)\n  - [Config](#config)\n    - [Keymap](#keymap)\n    - [$select operator](#select-operator)\n    - [Running scripts from package.json](#running-scripts-from-packagejson)\n  - [Default keymap](#default-keymap)\n  - [Remote control](#remote-control)\n- [FAQ](#faq)\n  - [mprocs vs tmux/screen](#mprocs-vs-tmuxscreen)\n\n\u003c!-- Created by https://github.com/ekalinin/github-markdown-toc --\u003e\n\u003c!-- Added by: pvolok, at: Sun Jul  3 22:53:57 +07 2022 --\u003e\n\n\u003c!--te--\u003e\n\n## Screenshots\n\n\u003cimg src=\"img/screenshot1.png\" width=\"900\" height=\"645\" /\u003e\n\u003cimg src=\"img/screenshot2.png\" width=\"900\" height=\"645\" /\u003e\n\n## Installation\n\n[![Packaging status](https://repology.org/badge/vertical-allrepos/mprocs.svg)](https://repology.org/project/mprocs/versions)\n\n### Download binary (Linux, Macos, Windows)\n\n[Download](https://github.com/pvolok/mprocs/releases) executable for your\nplatform and put it into a directory included in PATH.\n\n### npm (Linux, Macos, Windows)\n\n```sh\nnpm install -g mprocs\n```\n\n```sh\nyarn global add mprocs\n```\n\n### homebrew (Macos, Linux)\n\n```sh\nbrew install mprocs\n```\n\n### cargo (All platforms)\n\n```sh\ncargo install mprocs\n```\n\n### scoop (Windows)\n\n```sh\nscoop install mprocs\n```\n\n### AUR (Arch Linux)\n\n```sh\nyay mprocs\n```\n\n```sh\nyay mprocs-bin\n```\n\n### MPR (Debian/Ubuntu)\n\n```sh\ngit clone 'https://mpr.makedeb.org/mprocs'\ncd mprocs/\nmakedeb -si\n```\n\n## Usage\n\n1. Run `mprocs cmd1 cmd2 …` (example: `mprocs \"yarn test -w\" \"webpack serve\"`)\n\nOR\n\n1. Create `mprocs.yaml` file\n2. Run `mprocs` command\n\nExample `mprocs.yaml`:\n\n```yaml\nprocs:\n  nvim:\n    cmd: [\"nvim\"]\n  server:\n    shell: \"nodemon server.js\"\n  webpack: \"webpack serve\"\n  tests:\n    shell: \"jest -w\"\n    env:\n      NODE_ENV: test\n```\n\n### Config\n\n[JSON/YAML Configuration Schema](https://json.schemastore.org/mprocs-0.6.4.json)\n\nThere are two kinds of configs: global and local. _Global_ config is loaded\nfrom `~/.config/mprocs/mprocs.yaml` (or\n`~\\AppData\\Roaming\\mprocs\\mprocs.yaml` on Windows). _Local_ config\nis loaded from `mprocs.yaml` from current directory (or set via cli argument:\n`mprocs --config ./cfg/mprocs.yaml`). Settings in the _local_ config override\nsettings the _global_.\n\n- **procs**: _object_ - Processes to run. Only allowed in local config.\n  - **shell**: _string_ - Shell command to run (exactly one of **shell** or\n    **cmd** must be provided).\n  - **cmd**: _array\u003cstring\u003e_ - Array of command and args to run (exactly one of\n    **shell** or **cmd** must be provided).\n  - **cwd**: _string_ - Set working directory for the process. Prefix\n    `\u003cCONFIG_DIR\u003e` will be replaced with the path of the directory where the\n    config is located.\n  - **env**: _object\u003cstring, string|null\u003e_ - Set env variables. Object keys are\n    variable names. Assign variable to null, to clear variables inherited from\n    parent process.\n  - **add_path**: _string|array\u003cstring\u003e_ - Add entries to the _PATH_\n    environment variable.\n  - **autostart**: _bool_ - Start process when mprocs starts. Default: _true_.\n  - **autorestart**: _bool_ - Restart process when it exits. Default: false. Note: If process exits within 1 second of starting, it will not be restarted.\n  - **stop**: _\"SIGINT\"|\"SIGTERM\"|\"SIGKILL\"|{send-keys:\n    array\u003ckey\u003e}|\"hard-kill\"_ -\n    A way to stop a process (using `x` key or when quitting mprocs).\n- **hide_keymap_window**: _bool_ - Hide the pane at the bottom of the screen\n  showing key bindings.\n- **mouse_scroll_speed**: _integer_ - Number of lines to scrollper one mouse\n  scroll.\n- **scrollback**: _integer_ - Scrollback size. Default: _1000_.\n- **proc_list_width**: _integer_ - Process list window width.\n- **keymap_procs**: _object_ - Key bindings for process list. See\n  [Keymap](#keymap).\n- **keymap_term**: _object_ - Key bindings for terminal window. See\n  [Keymap](#keymap).\n- **keymap_copy**: _object_ - Key bindings for copy mode. See\n  [Keymap](#keymap).\n\n#### Keymap\n\nDefault key bindings can be overridden in config using _keymap_procs_,\n_keymap_term_, or _keymap_copy_ fields. Available commands are documented in\nthe [Remote control](#remote-control) section.\n\nThere are three keymap levels:\n\n- Default keymaps\n- `~/.config/mprocs/mprocs.yaml` (or `~\\AppData\\Roaming\\mprocs\\mprocs.yaml` on Windows)\n- `./mprocs.yaml` (can be overridden by the _-c/--config_ cli arg)\n\nLower levels override bindings from previous levels. Key bindings from previous\nlevels can be cleared by specifying `reset: true` field at the same level as\nkeys.\n\nKey bindings are defined between `\u003c` and `\u003e`, e.g., `\u003cEnter\u003e` (enter key), `\u003cDown\u003e` (down arrow), `\u003cUp\u003e` (up arrow), `\u003cC-q\u003e` (CTRL + q).\n\n```yaml\nkeymap_procs: # keymap when process list is focused\n  \u003cC-q\u003e: { c: toggle-focus }\n  \u003cC-a\u003e: null # unbind key\nkeymap_term: # keymap when terminal is focused\n  reset: true\n  \u003cC-q\u003e: { c: toggle-focus }\n  \u003cC-j\u003e:\n    c: batch\n    cmds:\n      - { c: focus-procs }\n      - { c: next-proc }\n```\n\n#### `$select` operator\n\nYou can define different values depending on the current operating system. Any\nvalue in config can be wrapped with a _$select_ operator. To provide different\nvalues based on current OS define an object with:\n\n- First field `$select: os`\n- Fields defining values for different OSes: `macos: value`. Possible\n  values are listed here:\n  https://doc.rust-lang.org/std/env/consts/constant.OS.html.\n- Field `$else: default value` will be matched if no value was defined for\n  current OS. If current OS is not matched and field `$else` is missing, then\n  mprocs will fail to load config.\n\nExample `mprocs.yaml`:\n\n```yaml\nprocs:\n  my process:\n    shell:\n      $select: os\n      windows: \"echo %TEXT%\"\n      $else: \"echo $TEXT\"\n    env:\n      TEXT:\n        $select: os\n        windows: Windows\n        linux: Linux\n        macos: Macos\n        freebsd: FreeBSD\n```\n\n#### Running scripts from package.json\n\nIf you run _mprocs_ with an `--npm` argument, it will load scripts from\n`package.json`. But the scripts are not run by default, and you can launch\ndesired scripts manually.\n\n```sh\n# Run mprocs with scripts from package.json\nmprocs --npm\n```\n\n### Default keymap\n\nProcess list focused:\n\n- `q` - Quit (soft kill processes and wait then to exit)\n- `Q` - Force quit (terminate processes)\n- `C-a` - Focus output pane\n- `x` - Soft kill selected process (send SIGTERM signal, hard kill on Windows)\n- `X` - Hard kill selected process (send SIGKILL)\n- `s` - Start selected process, if it is not running\n- `r` - Soft kill selected process and restart it when it stops\n- `R` - Hard kill selected process and restart it when it stops\n- `a` - Add new process\n- `C` - Duplicate selected process\n- `d` - Remove selected process (process must be stopped first)\n- `e` - Rename selected process\n- `k` or `↑` - Select previous process\n- `j` or `↓` - Select next process\n- `M-1` - `M-8` - Select process 1-8\n- `C-d` or `page down` - Scroll output down\n- `C-u` or `page up` - Scroll output up\n- `C-e` - Scroll output down by 3 lines\n- `C-y` - Scroll output up by 3 lines\n- `z` - Zoom into terminal window\n- `v` - Enter copy mode\n\nProcess output focused:\n\n- `C-a` - Focus processes pane\n\nCopy mode:\n\n- `v` - Start selecting end point\n- `c` - Copy selected text\n- `Esc` - Leave copy mode\n- `C-a` - Focus processes pane\n- `C-d` or `page down` - Scroll output down\n- `C-u` or `page up` - Scroll output up\n- `C-e` - Scroll output down by 3 lines\n- `C-y` - Scroll output up by 3 lines\n- `h` or `↑` - Move cursor up\n- `l` or `→` - Move cursor right\n- `j` or `↓` - Move cursor down\n- `h` or `←` - Move cursor left\n\n### Remote control\n\nOptionally, _mprocs_ can listen on TCP port for remote commands.\nYou have to define remote control server address in `mprocs.yaml`\n(`server: 127.0.0.1:4050`) or via cli argument (`mprocs --server 127.0.0.1:4050`). To send a command to running _mprocs_ instance\nuse the **ctl** argument: `mprocs --ctl '{c: quit}'` or `mprocs --ctl '{c: send-key, key: \u003cC-c\u003e}'`.\n\nCommands are encoded as yaml. Available commands:\n\n- `{c: quit-or-ask}` - Stop processes and quit. If any processes are running,\n  show a confirmation dialog.\n- `{c: quit}` - Stop processes and quit. Does not show confirm dialog.\n- `{c: force-quit}`\n- `{c: toggle-focus}` - Toggle focus between process list and terminal.\n- `{c: focus-procs}` - Focus process list\n- `{c: focus-term}` - Focus process terminal window\n- `{c: zoom}` - Zoom into terminal window\n- `{c: next-proc}`\n- `{c: prev-proc}`\n- `{c: select-proc, index: \u003cPROCESS INDEX\u003e}` - Select process by index, top process has index 0\n- `{c: start-proc}`\n- `{c: term-proc}`\n- `{c: kill-proc}`\n- `{c: restart-proc}`\n- `{c: force-restart-proc}`\n- `{c: show-add-proc}`\n- `{c: add-proc, cmd: \"\u003cSHELL COMMAND\u003e\", name: \"\u003cPROC NAME\u003e\"}` - Add proccess. `name` field is optional.\n- `{c: duplicate-proc}`\n- `{c: show-remove-proc}`\n- `{c: remove-proc, id: \"\u003cPROCESS ID\u003e\"}`\n- `{c: show-rename-proc}`\n- `{c: rename-proc, name: \"\u003cNEW_NAME\u003e\"}` - Rename currently selected process\n- `{c: scroll-down}`\n- `{c: scroll-up}`\n- `{c: scroll-down-lines, n: \u003cCOUNT\u003e}`\n- `{c: scroll-up-lines, n: \u003cCOUNT\u003e}`\n- `{c: copy-mode-enter}` - Enter copy mode\n- `{c: copy-mode-leave}` - Leave copy mode\n- `{c: copy-mode-move, dir: \u003cDIRECTION\u003e }` - Move starting or ending position\n  of the selection. Available directions: `up/right/down/left`.\n- `{c: copy-mode-end}` - Start selecting end point of the selection.\n- `{c: copy-mode-copy}` - Copy selected text to the clipboard and leave copy\n  mode.\n- `{c: send-key, key: \"\u003cKEY\u003e\"}` - Send key to current process. Key examples:\n  `\u003cC-a\u003e`, `\u003cEnter\u003e`\n- `{c: batch, cmds: [{c: focus-procs}, …]}` - Send multiple commands\n\n## FAQ\n\n### mprocs vs tmux/screen\n\n_mprocs_ is meant to make it easier to run specific commands that you end up\nrunning repeatedly, such as compilers and test runners. This is in contrast\nwith _tmux_, which is usually used to run much more long-lived processes -\nusually a shell - in each window/pane. Another difference is that _tmux_ runs a\nserver and a client, which allows the client to detach and reattach later,\nkeeping the processes running. _mprocs_ is meant more for finite lifetime\nprocesses that you keep re-running, but when _mprocs_ ends, so do the processes\nit is running within its windows.\n\n### Copying doesn't work in tmux\n\nTmux doesn't have escape sequences for copying enabled by default. To enable it\nadd the following to `~/.tmux.conf`:\n\n```\nset -g set-clipboard on\n```\n","funding_links":[],"categories":["Shell/Terminal","Rust","Applications","💻 Apps","应用程序 Applications","cli","\u003ca name=\"launcher\"\u003e\u003c/a\u003eCommand launchers"],"sub_categories":["Utilities","🚀 Productivity and Utilities","公用事业公司 Utilities"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpvolok%2Fmprocs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpvolok%2Fmprocs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpvolok%2Fmprocs/lists"}