v2.7.0: Polling watch, run-as user, and bulk stop/restart
Pitchfork v2.7.0 adds a polling file-watch backend for networked filesystems, lets daemons run as a configured unix user, and introduces bulk stop/restart flags scoped to local or global config.
Added
-
Polling and auto watch backends -- File watching is no longer limited to OS-native notifications. Each daemon can pick a backend with
watch_mode, which is especially useful for NFS and other remote mounts where inotify/FSEvents miss events. (#353) - @gaojunran[daemons.api] run = "npm run dev" watch = ["src/**/*.ts", "package.json"] watch_mode = "auto" # native | poll | auto (default: native)
native: OS-native notifications (inotify/FSEvents/ReadDirectoryChangesW)poll: periodic filesystem scansauto: prefer native, fall back to polling per-directory if native setup fails
Polling cadence is controlled by a new setting:
[settings.supervisor] watch_poll_interval = "500ms" # default
Note:
settings.supervisor.watch_interval(default10s) is now documented as the supervisor's watch-config refresh interval, not the filesystem scan rate. If you previously lowered it to detect changes faster, move that tuning towatch_poll_interval. -
Run daemons as a configured unix user -- Set a default user for the supervisor and override per-daemon. Values can be usernames or numeric UIDs. (#384) - @ConnerPetzold
[settings.supervisor] run_user = "conner" [daemons.api] run = "npm run dev" # runs as "conner" [daemons.postgres] run = "postgres -D /var/lib/postgres" user = "postgres" # per-daemon override [daemons.low-port-web] run = "python -m http.server 80" user = "root"
Precedence: per-daemon
user→ supervisorrun_user→SUDO_UID/SUDO_GIDwhen running undersudo→ inherited supervisor identity. -
Bulk stop/restart by config scope --
pitchfork stopandpitchfork restartaccept new flags to target every daemon defined in local or global config: (#385) - @gaojunranpitchfork stop -l # all local daemons (pitchfork.toml) pitchfork stop -g # all global daemons (~/.config/pitchfork/config.toml, /etc/pitchfork/config.toml) pitchfork restart -l pitchfork restart -g
--all,--local, and--globalare mutually exclusive, and the dependency-aware reverse stop order applies to all three. -
IPC version handshake -- The CLI now sends its version on connect, and the supervisor responds with its own. If they don't match, you'll get a clear warning telling you to run
pitchfork supervisor start --force. The handshake is backward compatible — newer CLIs talking to older supervisors fall back to the legacy connect path and still surface the mismatch warning. (#354) - @gaojunran
Fixed
- TOML parse errors are no longer silent -- When a
pitchfork.tomlfailed to parse, the error was previously printed to stderr and ignored, leaving daemons mysteriously missing. Parse failures now propagate as proper errors with the offending file path. (#386) - @gaojunran
Changed
- The documentation site has moved from
pitchfork.jdx.devtopitchfork.en.dev. (#389)
Full Changelog: v2.6.0...v2.7.0
💚 Sponsor pitchfork
pitchfork is built by @jdx at en.dev — an independent studio shipping developer tools like mise, aube, hk, pitchfork, and more. Development is sustained by sponsorships.
If pitchfork has a place in your dev workflow, please consider sponsoring at en.dev. Individual and company sponsorships are what keep the project healthy and moving forward.