Watches filesystem changes via inotify and emits structured events to stdout as NDJSON (newline-delimited JSON). Also ships a Model Context Protocol mode for JSON-RPC 2.0 integration.
$ cargo install --git https://github.com/moughamir/inowatchOr build from source:
$ git clone https://github.com/moughamir/inowatch
$ cd inowatch
$ cargo build --release$ inowatch [OPTIONS] <PATH>...Watch one or more paths and print coalesced events to stdout:
$ inowatch /var/log
{"timestamp":"2026-06-08T12:00:00.000000000Z","seq":1,"events":[{"type":"create","path":"/var/log/nginx/access.log","info":{"size":0,"mode":"0644","is_dir":false}}]}| Flag | Description |
|---|---|
-d |
Fork into background (daemon mode). |
-p <FILE> |
Write PID to file (implies -d). |
--debounce <MS> |
Coalescing window in milliseconds (default: 500). |
--no-recursive |
Do not watch subdirectories recursively. |
-q |
Suppress the startup banner record. |
--mcp |
Run in MCP mode (see below). |
All paths are watched recursively by default.
--mcp puts fwd in Model Context Protocol mode — it speaks JSON-RPC 2.0 over stdin/stdout, exposing filesystem events as MCP resources. This mode is incompatible with -d, -p, and -q.
$ inowatch --mcpStandard mode emits one NDJSON line per batch of coalesced events:
{
"timestamp": "2026-06-08T12:00:00.000000000Z",
"seq": 1,
"events": [
{
"type": "create|modify|delete|rename",
"path": "/some/file",
"cookie": null,
"info": { "size": 1024, "mode": "0644", "is_dir": false }
}
]
}The first line may be a "type":"banner" record with the daemon version, PID, watched paths, and debounce setting.
AGPL-3.0-only. See LICENSE.