This page is not available in every language. Missing translations are disabled in the language selector.

Quick reference

Watchman Cheatsheet

A quick reference guide for Facebook Watchman file watching service: directory watches, triggers, and CLI commands.

· Published

Watchman is an open-source file watching service by Meta that triggers actions when matching files change.

Getting Started

# Add ./src directory to the watch list
watchman watch ./src
# Add a trigger named 'retest' that executes npm test when any *.js file in ./src changes
watchman -- trigger ./src retest '*.js' -- npm test

Managing Watches

watchman watch ~/src       # Watch ~/src
watchman watch-list        # List all active watches
watchman watch-del ~/src   # Remove watch on ~/src

References

Related topics