Skip to content
/ procman Public

A process manager for local development on macOS

License

Notifications You must be signed in to change notification settings

croaky/procman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

procman

procman is a process manager for local development on macOS.

Install:

go install github.com/croaky/procman@latest

Define your process definitions in Procfile.dev. For example:

clock: bundle exec ruby cmd/clock.rb
esbuild: bun run buildwatch
queues: bundle exec ruby cmd/queues.rb
web: bundle exec ruby cmd/web.rb

Run processes by naming them in a comma-delimited list:

procman esbuild,web

You must list at least one process. There are no options or flags.

The output from multiple processes will be combined. For example:

esbuild |
esbuild | > buildwatch
esbuild | > node build.mjs --watch
esbuild |
esbuild | watching...
web     | [67296] Puma starting in cluster mode...
web     | [67296] * Puma version: 6.4.2 (ruby 3.3.0-p0) ("The Eagle of Durango")
web     | [67296] *  Min threads: 12
web     | [67296] *  Max threads: 12
web     | [67296] *  Environment: development
web     | [67296] *   Master PID: 67296
web     | [67296] *      Workers: 2
web     | [67296] *     Restarts: (✔) hot (✖) phased
web     | [67296] * Preloading application
web     | [67296] * Listening on http://0.0.0.0:3000
web     | [67296] Use Ctrl-C to stop
web     | [67296] - Worker 1 (PID: 67331) booted in 0.9s, phase: 0
web     | [67296] - Worker 0 (PID: 67330) booted in 0.9s, phase: 0

procman will run its processes until it receives a SIGINT (Ctrl+C), SIGTERM, or SIGHUP.

If one of the processes finishes, it will send a SIGINT to all remaining running processes, wait 5s, and then send a SIGKILL to all remaining processes.

procman runs exactly one process per definition.

It runs the processes in Procfile.dev "as-is"; It does not load environment variables from .env before running.

File watching

Add # watch: PATTERNS to automatically restart a process when files change:

web: bundle exec ruby cmd/web.rb  # watch: lib/**/*.rb,ui/**/*.haml
esbuild: bun run buildwatch

Patterns are relative to the directory containing Procfile.dev. Glob patterns support * (single directory) and ** (recursive). Processes without a watch annotation run without file watching. Changes are debounced (500ms) to avoid rapid restarts. On change, procman sends SIGINT, waits for the process to exit, then restarts it.

procman is distributed via Go source code, not via a Homebrew package.

procman depends on:

Developing

# checks
goimports -local "$(go list -m)" -w .
go vet ./...
go test ./...
deadcode -test ./...

# commit
git add -A
git commit -m "proc: add new feature" # commit with prefix, imperative mood, hard-wrap 72 cols

License

MIT

About

A process manager for local development on macOS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages