Skip to content

olamedia/process-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pm — process manager

Docker-compose-like process manager. Runs any command, not limited to Node/Bun.

screenshot

Install

cargo build --release
# Binary at target/release/pm

Config

Create pm.yaml in your project root:

services:
  web:
    command: python3 -m http.server 8080
    environment:
      PYTHONUNBUFFERED: "1"
    depends_on:
      - logger
    restart: on-failure

  logger:
    command: bash -c "while true; do echo \"$(date +%T) heartbeat\"; sleep 5; done"

  worker:
    command: bash -c "echo 'worker started'; sleep infinity"

See pm.example.yml for a full example.

All fields except command are optional. working_dir defaults to the config directory.

Usage

pm                  # launch TUI (default)
pm up               # start all services (starts daemon if needed)
pm up api db        # start named services
pm stop             # stop all
pm stop api         # stop named
pm restart           # restart all
pm status            # print status table
pm logs api          # tail logs
pm logs api -f       # follow logs
pm reload            # reload config without restart
pm shutdown          # shut down daemon
pm tui               # launch interactive TUI

TUI keybindings

Key Action
↑/↓ or k/j Navigate services
s / Enter Start selected
x Stop selected
r Restart selected
a Start all
z Stop all
R (shift) Reload config
q Quit TUI (services keep running)

State

Runtime state stored in .pm/ next to your config:

.pm/
├── pm.sock     # daemon socket
├── pids/       # PID files per service
└── logs/       # log files per service

Add .pm/ to .gitignore.

Restart policies

  • no (default) — no auto-restart
  • on-failure — restart on non-zero exit
  • always — restart on any exit

Exponential backoff: 1s, 2s, 4s, 8s, 16s, 32s cap.

About

Tiny process manager for docker-compose like configuration, Dashboard

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors