survos/supervisor-bundle

Supervises a configured set of long-running processes and presents them in a multi-pane TUI.

Maintainers

Package info

github.com/survos/supervisor-bundle

Type:symfony-bundle

pkg:composer/survos/supervisor-bundle

Fund package maintenance!

kbond

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

2.10.20 2026-06-23 12:42 UTC

This package is auto-updated.

Last update: 2026-06-23 12:43:10 UTC


README

Supervises a configured set of long-running processes and presents them in a multi-pane TUI dashboard — start them, watch each one's live output in its own pane, and let them restart on their own. Think foreman/honcho with a built-in terminal UI, built on symfony/process and symfony/tui.

It also knows how to run one messenger:consume worker per transport (--workflow), so you can supervise a whole async pipeline with a single command instead of hand-starting a worker per queue.

Installation

composer require survos/supervisor-bundle

symfony/messenger is optional — only the --workflow queue discovery needs it; the supervisor works as a generic process runner without it.

Usage

1. Supervise processes from a config file

Create supervisor.yaml in your project root:

processes:
  api:
    cmd: ['php', 'bin/console', 'app:serve', '-v']
    restart: always
  worker:
    cmd: ['php', 'bin/console', 'messenger:consume', 'async', '-v', '--time-limit=3600', '--memory-limit=512M']
    restart: always
  one-shot:
    cmd: ['php', 'bin/console', 'app:warmup']
    restart: never

ring_buffer_lines: 5000      # scrollback kept per process
follow_by_default: true      # panes auto-scroll to the newest line

Then run the dashboard:

php bin/console survos:supervisor                 # ./supervisor.yaml (or bundle config)
php bin/console survos:supervisor -c deploy.yaml  # an explicit config
php bin/console survos:supervisor --no-tui        # stream prefixed lines instead of the TUI

2. Supervise a messenger pipeline (--workflow)

Instead of a config file, point it at a transport code and it runs one supervised messenger:consume per matching transport — discovered from the messenger transport registry, so it needs no knowledge of how the queues were defined:

# Every transport named "dataset" or "dataset.*" → dataset.raw, dataset.normalize, dataset.enrich, …
php bin/console survos:supervisor --workflow=dataset
php bin/console survos:supervisor -w dataset --no-tui

This is the one-command way to run and monitor an async workflow: the supervisor is both the runner (it spawns the consumers) and the monitor (each consumer's output in its own pane).

Configuration reference

Per process:

key default meaning
cmd (required) argv array, e.g. ['php','bin/console','…']
restart never never · on-failure · always
cwd (project dir) working directory
env {} extra environment variables
autostart true start with the supervisor (vs. start it manually later)
backoff restart backoff: initial (1.0s), max (30.0s), multiplier (2.0)

Top level:

key default meaning
ring_buffer_lines 5000 scrollback retained per process
follow_by_default true panes follow the tail on launch

Command options

option shortcut description
--config -c path to a supervisor YAML (default ./supervisor.yaml, then bundle config)
--workflow -w supervise one messenger:consume per transport matching this code
--no-tui disable the TUI; stream prefixed output lines to stdout

License

MIT