Documentation
README
File Watcher
Use Claude Code's FileChanged and CwdChanged hooks to create reactive workflows that respond to file system changes.
Trigger
Use when:
- Setting up auto-reload for config changes
- Watching for dependency updates
- Monitoring build output
- Creating reactive development workflows
How File Watching Works
Claude Code's SessionStart and CwdChanged hooks support returning watchPaths to register file watchers. The current cwd-changed.js script focuses on env injection; to add watch registration, your hook script must output this JSON structure:
{
"hookSpecificOutput": {
"hookEventName": "SessionStart",
"watchPaths": [
"/absolute/path/to/.env",
"/absolute/path/to/package.json"
]
}
}
This is the opening of the README. Read the full README on GitHub.