Chokidar vs Watchman
Which should you use? A side-by-side look at what each one does, who it suits, what it costs, how hard it is to set up, and where each falls short.
Open source · MIT
A Node.js library that watches files and folders and reports adds, changes, and deletions reliably.
Open source · MIT
Watches files for changes and triggers actions or reports when they happen.
The short answer
Choose Chokidar if you need…
- Node.js developers building build tools or dev servers that rerun work on file changes
- Teams that need consistent file events across macOS, Windows, and Linux
- Projects that watch network or unusual filesystems and can accept higher CPU use via polling
- Developers who want to scope watches with ignore rules and depth limits
Choose Watchman if you need…
- Developers who want to run a build or test when source files change
- Teams whose tools need fast, reliable notifications about file changes
- Developers working in large codebases where repeatedly scanning directories is slow
Side-by-side
| Chokidar | Watchman | |
|---|---|---|
| Type | Library | Dev tool |
| Price | Free and open source | Free and open source |
| Licence | MIT | MIT |
| GitHub stars | 12.3k | 13.8k |
| Setup difficulty | Intermediate | Intermediate |
| How you get it | Install with a package manager | Clone and build from source |
| Main language | TypeScript | C++ |
| Last code update | 9 days ago | 4 days ago |
What each one is
Chokidar
Chokidar is a JavaScript/TypeScript library for Node.js that watches files and directories for changes. Raw Node file watching is inconsistent across operating systems, so Chokidar provides normalized add, change, and unlink events, with optional handling for editor saves and large writes. Developers use it inside build tools, dev servers, and scripts that need to react when files change.
Watchman
Watchman is a file-watching service that monitors directories and notices when files are created, changed, or deleted. It can then run an action or report the change to a program that asked for it. The README provided was empty, so this description relies mainly on the repository's short summary.
Best for
Chokidar
- Node.js developers building build tools or dev servers that rerun work on file changes
- Teams that need consistent file events across macOS, Windows, and Linux
- Projects that watch network or unusual filesystems and can accept higher CPU use via polling
- Developers who want to scope watches with ignore rules and depth limits
Watchman
- Developers who want to run a build or test when source files change
- Teams whose tools need fast, reliable notifications about file changes
- Developers working in large codebases where repeatedly scanning directories is slow
Strengths
Chokidar
- Normalizes file events so add, change, and unlink behave more predictably than raw fs.watch
- Uses native file watching by default to keep CPU use low, with polling as a fallback
- Offers filtering, depth limits, and editor atomic-save handling in one API
Watchman
- Written in C++ and maintained under the Meta organization on GitHub
- Released under the permissive MIT license
- Has a large community following, with about 13,700 stars
Not ideal for
Chokidar
- Non-JavaScript projects, since it is a Node.js library (the README does not cover other runtimes)
- People who only need a one-off file check rather than ongoing watching
- Users who want to watch huge trees without filtering, since the README warns it watches everything under the given paths
Watchman
- People who only need a simple one-off file search (the tool is built for ongoing watching)
- Users who need a point-and-click app (the README provided did not describe a graphical interface)
- Anyone needing detailed setup guidance from this entry alone, since the README was unavailable
Trade-offs
Chokidar
- Polling can miss in-place writes that do not change size, modification time, existence, or inode, per the README
- Atomic and write-finish timing involve trade-offs between responsiveness and safety that users must tune
- The README is truncated, so some details of the event API and version changes are not fully visible
Watchman
- The README was not available for this analysis, so setup and feature details are unverified
- No binaries are listed with the latest release, so you will likely need to build it yourself
- Topics and detailed documentation were not provided in the metadata
Getting started
Watchman
Clone the repository
git clone https://github.com/meta/watchmanFrequently asked questions
What is the difference between Chokidar and Watchman?
Chokidar: A Node.js library that watches files and folders and reports adds, changes, and deletions reliably. Watchman: Watches files for changes and triggers actions or reports when they happen. Chokidar suits node.js developers building build tools or dev servers that rerun work on file changes, while Watchman suits developers who want to run a build or test when source files change.
Are Chokidar and Watchman free?
Chokidar: Free and open source. Watchman: Free and open source.
Is Chokidar or Watchman more popular?
Watchman has more GitHub stars (13.8k) than Chokidar (12.3k). Popularity isn't the same as fit — check which one matches your use case above.
What are other alternatives to Chokidar and Watchman?
Other options people compare them with include nodemon, Flysystem.
Keep comparing
Built from our catalogue entries for both products: open-source details come from each project's README (AI-assisted, refreshed weekly) and GitHub data; AI-tool details are editorial. Spotted something wrong? Let us know from either product's page.