pvolok / mprocs

Run multiple commands in parallel
MIT License
1.42k stars 48 forks source link

Feature Request: Process Groups #117

Open wyrmisis opened 4 months ago

wyrmisis commented 4 months ago

One of my main use cases for mprocs is running a dev environment for an app with multiple microservices and single-run scripts. Currently, I organize my processes by prefixing them (M for microservices, TOOL for scripts, etc).

I think it would be helpful to have subheadings under the process list under which processes with a matching group property in the config file are displayed. Something like...

┌─Processes────────────┐ ┌─Terminal───────────────────────┐
│Frontend              │ │                                │
│Backend               │ │                                │
│                      │ │                                │
│-- Microservices --   │ │                                │
│Microservice A     UP │ │                                │
│Microservice B     UP │ │                                │
│Microservice C     UP │ │                                │
│                      │ │                                │
│-- Scripts --         │ │                                │
│Some Script      DOWN │ │                                │
│Another Script   DOWN │ │                                │
│                      │ │                                │
│-- Applications --    │ │                                │
│Application A      UP │ │                                │
│Another App      DOWN │ │                                │
│                      │ │                                │
│                      │ │                                │
│                      │ │                                │
│                      │ │                                │
│                      │ │                                │
│                      │ │                                │
│                      │ │                                │
└──────────────────────┘ └────────────────────────────────┘
legobeat commented 1 month ago

I'm thinking it could look something like this in config

proc_groups:
  apps:
    label: '-- Applications --'
  services:
    label: '-- Microservices --'
  scripts:
    label: '-- Scripts --'
procs:
  'Microservice A':
    groups: ['services']