fswatch
$ fswatch Community Low Riskfswatch monitors directory trees using native OS backends (FSEvents, inotify, kqueue, Windows) and streams change events to stdout. Options like -1 (one-shot exit), --event filtering, and --format templating make it a purely read-only, scriptable observer, though it outputs line-delimited text rather than native --json.
brew install fswatch Local OS event streaming with fswatch -1 is instantaneous and strictly read-only without MCP overhead.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Clean non-TTY stdout streaming with -1 one-shot exit, --event filtering, and --format templating, though it lacks a native --json flag.
- Supports
-1one-shot exit and--formattemplating - No native
--jsonoutput flag
Strictly read-only filesystem event observer with zero network access or arbitrary command execution built in.
- Read-only event emitter; does not execute commands itself
Cross-platform support for macOS FSEvents, Linux inotify, BSD kqueue, and Windows via brew install fswatch and releases.
- Native OS backends across macOS, Linux, and Windows
Reliable recursive watching with regex --exclude / --include rules and -o batch counting.
- Flexible event filtering and batching options
Mature C++ project with steady long-term maintenance on GitHub.
- Maintained on GitHub under emcrisostomo/fswatch
Comprehensive manual and Texinfo docs explaining monitors, latency, and format placeholders.
- Detailed docs at emcrisostomo.github.io/fswatch/doc/
Security, Auth & Guardrails
None required; read-only local filesystem event stream.
100% free, offline, and open-source (GPL-3.0-or-later).
# fswatch Agent Rules - Always pass `-1` (one-shot) or `-o` with a bounded consumer so `fswatch` does not stream forever. - Use `--event` filters and `--exclude` regexes to ignore `.git` or build artifacts.
Agent-Ready Command Recipes
Safe Read-Only Queries
fswatch -1 -x -t src/
Monitors src/ for a single batch of changes (-1), prints timestamps (-t) and event flags (-x), and exits cleanly.
fswatch -1 --event Created --event Updated --format '%p|%f' .
Filters strictly for Created and Updated events and formats path plus flags using --format.
Strengths for Agents
- + Strictly read-only event emitter that pairs cleanly with
-1for bounded wait conditions. - + Rich
--eventfiltering and--formatoutput templates across macOS, Linux, and Windows.
Caveats & Pitfalls
- ! Lacks a native
--jsonflag;--formatrequires careful escaping if JSON is synthesized. - ! Streams continuously until killed unless
-1is specified.