Skip to content
Search

Chokidar

lastmod 2026-01-05created 2026-01-053 edits

Efficient cross-platform file watching library

About

  • A tool developed to normalize file change events from various OSes and deliver them consistently, making up for the limitations of fs.watch-family APIs
  • Absorbs event differences across Mac, Linux, and Windows to provide a clear event model centered on add / change / unlink
  • Designed to reliably detect the atomic write pattern used by some editors and chunked writes of large files, handling events based on when the write actually completes
  • Uses a non-polling structure based on fs.watch by default to keep CPU usage low
    • Supports switching to polling mode in special environments such as network file systems
  • Provides features needed in practice out of the box, such as file/directory filtering, symbolic link following, and always-recursive watching
  • Since v5, switched to an ESM-only package and raised the minimum Node.js version to v20 or later
  • Started in 2012 for Brunch, an HTML build tool, and has since become a proven production library used in about 30 million repositories
  • Through ecosystem extensions such as the CLI tool chokidar-cli, it can be widely used in build, automation, and development workflows

See also

Favorite site

author Zer0 sitemap