This Go module provides a client for Facebook's Watchman, a file watching service with support for recording and querying filesystem state. Two alternative APIs are provided. The high-level API is designed for common use cases. The low-level API is designed to enable advanced use cases.
Why use Watchman instead of fsnotify/inotify/kevent/etc?
- Watchman conserves system resources by enabling applications to share watches instead of duplicating them.
- Watchman waits for changes to settle down before sending notifications.
- Watchman can also be queried for changes since a previous check, or queried for current filesystem state.
- Watchman has been battle hardened by use in projects such as Buck, Mercurial, and React Native.
Are all Watchman features supported?
All primitives necessary to access the full Watchman protocol are implemented, however this project is still a work in progress. Most Watchman commands still need to be mapped to more friendly data structures and methods. In addition, the eventual replacement of JSON ecoding with more efficient BSER encoding is planned but not yet implemented.
For details, see docs/status.md.
This is a personal project. I work on it when I feel like it. The following is a list of things I might work on. It is not a list of commitments.
Contributions are welcome.
- improved test coverage
- start testing on Windows
- expose existing command options
- support additional commands
pre-commit install