Skip to content

micouy/prozess

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pz

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.

Install

cargo install pz

Daemon

pz daemon start
pz daemon status
pz daemon stop

Use foreground mode for debugging:

pz daemon run

Run Processes

pz run --name api -- cargo run
pz run --name worker --cwd /path/to/repo -- ./gradlew :app:run

Processes 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/env

Inspect And Control

pz ps
pz show api
pz logs api -f
pz stop api
pz stop api --force
pz wait api
pz restart api

Resources and ports:

pz resources api
pz ports api

Timeouts

pz run --name slow --timeout 30s -- /bin/sleep 300
pz timeout slow 5m
pz timeout slow clear

Timeouts are enforced by the daemon.

Config

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.

Notes

  • Commands are spawned directly, not through a shell.
  • Processes are placed in their own process groups.
  • pz stop signals the process group.
  • Logs are captured after spawn and can be read or followed later.
  • If the daemon dies, previously running processes are marked lost on daemon restart.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages