@puckzxz/prwr
v0.2.0
Published
Process Wrangler: a Windows-friendly process supervisor for local development.
Downloads
343
Maintainers
Readme
prwr
Process Wrangler, or prwr, is a small process supervisor for local development.
It runs the commands your project needs, keeps their output in one terminal, and gives each line a stable colored label. It is built for Windows first, with no tmux, panes, curses, or TUI.
backend | started pid=12644
web | started pid=18408
backend | Ready on http://localhost:8787
web | VITE v7 ready in 420 msInstall
npm install -g @puckzxz/prwrThen add a .prwr.yml file to a project and run prwr from that project directory.
Quick Start
processes:
backend:
command: npm run dev:backend
restart: on-failure
web:
command: npm run dev:web
stdin: true
env:
PORT: "3000"
docs:
command: npm run dev
cwd: ./docsStart everything:
prwrFrom another terminal in the same folder:
prwr status
prwr restart backend
prwr send web rs
prwr stop docs
prwr start docs
prwr down
prwr checkConfig Files
prwr looks for config in this order:
.prwr.yml.prwr.yamlProcfile.devProcfile
You can also pass a config path directly:
prwr .\.prwr.yml
prwr .\Procfile.dev
prwr up --config .\.prwr.yml
prwr up --procfile .\Procfile.devRuntime state is stored in .prwr/supervisor.json inside the project. That file is how status, restart, stop, start, and down find the running supervisor.
Process Options
processes:
backend:
command: npm run dev
cwd: ./apps/backend
env:
PORT: "3001"
restart: manual
killOnExit: false
stdin: false
startupDelayMs: 0
restartBackoffMs: 0
restartBackoffMaxMs: 0
restartBackoffResetMs: 0
restartMaxAttempts: 0command: command to run. Required.cwd: working directory, resolved relative to the config file.env: environment values merged with the parent process.restart:manual,always, oron-failure. Defaults tomanual.killOnExit: when true, this process exiting stops the whole supervisor.stdin: when true, enablesprwr send <name> <text>for this process.startupDelayMs: delay before starting the process.restartBackoffMs: first automatic restart delay. Defaults to the existingMath.max(100, startupDelayMs)behavior when unset.restartBackoffMaxMs: maximum automatic restart delay. Defaults to no extra backoff cap when unset.restartBackoffResetMs: stable run time before automatic restart attempts reset. Defaults to disabled.restartMaxAttempts: maximum consecutive automatic restart attempts.0means unlimited.
Procfile Support
Simple Foreman-style Procfiles work too:
backend: npm run dev:backend
web: npm run dev:web
docs: npm run devProcfile commands run from the Procfile directory and use manual restart behavior.
Command Reference
| Command | What it does |
| --- | --- |
| prwr | Start the project using the first matching config file. |
| prwr up | Same as prwr. |
| prwr check | Validate config, resolved working directories, and supervisor state without starting processes. |
| prwr status | Show supervisor and process state. |
| prwr restart <name> | Kill one process tree and start it again. |
| prwr stop <name> | Stop one process. |
| prwr start <name> | Start one stopped process. |
| prwr send <name> <text> | Send one newline-terminated input command to a process with stdin: true. |
| prwr down | Stop every process tree and exit the supervisor. |
Windows Behavior
Windows is the main target. When prwr stops a process, it kills the whole tree:
taskkill /PID <pid> /T /FThat matters for commands like npm run dev, where the process you see first is often not the server doing the real work. prwr down, Ctrl+C, and prwr restart <name> all use the same tree-kill path.
On macOS and Linux, prwr starts processes in their own process groups where possible and stops the group with POSIX signals.
Output And Color
prwr colors the label and separator by default. Child output is passed through unchanged.
Use --no-color or NO_COLOR=1 to turn label colors off:
prwr --no-color--no-color only controls prwr labels. Child commands still decide their own color output, and prwr preserves the existing default of setting FORCE_COLOR=1 unless it is already set.
Use --timestamps to prefix each log line with local time:
prwr --timestamps
prwr up --timestamps14:32:07 backend | Ready on http://localhost:8787Local Development
pnpm install
pnpm run build
pnpm test
node dist/cli.js --helpRelease Process
Releases are published as @puckzxz/prwr on npm.
For the next release:
- Update the version in
package.json. - Run
pnpm run lint,pnpm run build,pnpm test, andpnpm run pack:check. - Commit the version change.
- Push the commit and wait for CI to pass.
- Publish from a local terminal with
npm publish --access public. - Tag the commit with the same version, for example
git tag -a v0.1.1 -m "v0.1.1". - Push the tag and create a GitHub release.
CI runs on pushes and tags. npm publishing is intentionally manual for now.
Limitations
- Child stdin is ignored unless
stdin: trueis set.prwr sendis one-shot command input, not an interactive terminal. - Child color output depends on the child tool.
- Windows stops use
taskkill /F, so shutdown is forceful by design.
