explaingit

coreybutler/fsevents

Analysis updated 2026-08-07 · repo last pushed 2019-10-28

Audience · developerComplexity · 2/5DormantLicenseSetup · easy

TLDR

A Mac-only Node.js library that lets apps instantly detect file and folder changes by tapping into macOS's built-in FSEvents system, instead of repeatedly scanning for updates.

Mindmap

mindmap
  root((repo))
    What it does
      Watches files and folders
      Instant change notifications
      Reports event details
    Tech stack
      Node.js
      macOS FSEvents
      Native addon
    Use cases
      Text editors with live refresh
      File sync apps
      Build systems
    Audience
      Node developers on Mac
      Tool builders
      Cross-platform via Chokidar

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Build a text editor that automatically refreshes its view the moment a file is saved.

USE CASE 2

Create a file sync app that instantly detects when files are created, edited, deleted, or moved.

USE CASE 3

Make a development build tool that rebuilds your project as soon as a source file changes.

What is it built with?

Node.jsC++macOS FSEvents

How does it compare?

coreybutler/fsevents00kaku/gallery-slider-block04amanrajj/netwatch
Stars0
LanguageJavaScriptRust
Last pushed2019-10-282021-05-19
MaintenanceDormantDormant
Setup difficultyeasyeasymoderate
Complexity2/52/53/5
Audiencedevelopergeneralops devops

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Works only on macOS, not suitable for apps that need file watching on Windows or Linux.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

fsevents is a tool that lets Mac applications built with Node.js listen for changes to files and folders. Instead of constantly checking whether something has been modified, your program gets an automatic heads-up the moment the operating system notices a file was created, edited, deleted, or moved. This makes file-watching features feel instant and responsive. Under the hood, it taps into a built-in macOS feature called FSEvents, which already knows about every file change happening on your computer. The library connects Node.js directly to that system, so when a file changes, your code receives a notification with details about what happened and where. You write a small bit of code that says "watch this folder," and then you get a callback each time something changes, along with helpful context about the event. Developers who build tools like text editors, file sync apps, or build systems would find this useful. For example, if you're making a development tool that automatically refreshes whenever you save a file, this library lets your program react the instant the save happens. It's faster and lighter than alternative approaches that repeatedly scan folders looking for changes. The project describes itself as a low-level library, meaning it handles the core plumbing but doesn't try to do everything. It works only on macOS, so it's not a fit if you need your app to watch files on Windows or Linux. For that cross-platform scenario, the README points readers toward a companion project called Chokidar that uses this library under the hood while adding broader compatibility.

Copy-paste prompts

Prompt 1
I want to watch a folder in my Node.js app on macOS and get instant notifications when files are added, changed, or removed. How do I use the fsevents library to set that up with a callback?
Prompt 2
I am building a Node.js development tool on Mac that needs to auto-rebuild whenever a source file is saved. How can I use fsevents to detect the change immediately and trigger my rebuild function?
Prompt 3
I need to see the details of file change events (like what type of change happened and which path was affected) using fsevents in my Node.js project. How do I access that information in the callback?
Prompt 4
I only need to watch files on macOS but heard Chokidar wraps fsevents. Should I use fsevents directly or Chokidar for my Node.js file-watching needs, and what is the difference?

Frequently asked questions

What is fsevents?

A Mac-only Node.js library that lets apps instantly detect file and folder changes by tapping into macOS's built-in FSEvents system, instead of repeatedly scanning for updates.

Is fsevents actively maintained?

Dormant — no commits in 2+ years (last push 2019-10-28).

What license does fsevents use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is fsevents to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is fsevents for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.