pz is a local process manager. It runs commands through a daemon, stores process state in SQLite, and lets you inspect, stop, restart, and attach to processes later.
The CLI is only one client. The daemon owns the processes so commands keep running if the terminal, SSH session, or agent harness exits.
cargo install pzpz daemon start
pz daemon status
pz daemon stopUse foreground mode for debugging:
pz daemon runpz run --name api -- cargo run
pz run --name worker --cwd /path/to/repo -- ./gradlew :app:runProcesses run with an empty environment by default. Add env explicitly:
pz run --env-file .env -- /usr/bin/env
pz run --env FOO=bar -- /usr/bin/env
pz run --inherit-env -- /usr/bin/envpz ps
pz show api
pz logs api -f
pz stop api
pz stop api --force
pz wait api
pz restart apiResources and ports:
pz resources api
pz ports apipz run --name slow --timeout 30s -- /bin/sleep 300
pz timeout slow 5m
pz timeout slow clearTimeouts are enforced by the daemon.
pz reads defaults from:
~/.config/pz.toml
Example:
[run]
inherit_env = false
env_files = []
[env]
PATH = [
"/opt/homebrew/bin",
"/usr/local/bin",
"/usr/bin",
"/bin"
]
JAVA_HOME = "/path/to/java"Config env values are used at spawn time. pz stores env keys and env-file paths, not env values.
- Commands are spawned directly, not through a shell.
- Processes are placed in their own process groups.
pz stopsignals the process group.- Logs are captured after spawn and can be read or followed later.
- If the daemon dies, previously running processes are marked
loston daemon restart.