# emcrisostomo/fswatch

A cross-platform file change monitor with multiple backends: Apple macOS File System Events, *BSD kqueue, Solaris/Illumos File Events Notification, Linux inotify and fanotify, Microsoft Windows and a stat()-based backend.

Repository: https://github.com/emcrisostomo/fswatch
Canonical: https://ross.abutalabs.com/products/fswatch
Homepage: https://emcrisostomo.github.io/fswatch/
Language: C++
License: GPL-3.0
License Family: copyleft
Topics: event-notifications, change-monitor, fswatch, kqueue, inotify, solaris, c, c-plus-plus, windows
Last push: 2026-07-22T17:12:54+00:00

## Health v2 (maintenance only)
Score: 95/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 93, release rhythm 94, longevity 100
- inputs: {"age_days": 6278, "days_push": 42, "days_rel": 42, "gap_med": 9, "n_releases_24m": 10}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5588, forks 346 (observed 2026-08-28T04:09:22.623300+00:00)

## What it is
fswatch is a cross-platform file change monitor that emits notifications when files or directories are modified, using native OS backends such as macOS FSEvents, Linux inotify/fanotify, BSD kqueue, Solaris FEN, and Windows ReadDirectoryChangesW, with a portable stat-based fallback. It ships as a CLI tool plus libfswatch, a library with C, C++, and Go bindings.

## Use cases
- watch source files and rerun tests or rebuild on change
- trigger a command whenever a directory is modified
- monitor log or config files for changes in shell scripts
- cross-platform file watching without OS-specific code
- filter file change events with regex include/exclude patterns
- stream changed file paths into a pipeline with null-delimited output

## When to choose
- you need a single portable file-watching command across macOS, Linux, BSD, Solaris, and Windows
- you want native, efficient file system event APIs instead of polling
- you need a C/C++/Go library for embedding file monitoring into your own tools
- you want regex filtering, custom output formats, and batched event counts for build automation

## When to avoid
- you only target Linux and prefer a lightweight inotify-only tool
- you need a long-running daemon with alerting or monitoring integrations rather than a CLI stream
- your project requires a permissively licensed dependency, since fswatch is GPL-3.0

## Facets
- artifact type: cli-tool
- maturity: active
- function: file-system, developer-tools, cli, workflow-automation
- domain: developer-tools, cross-platform
- platform: windows, bsd, cli, cross-platform
- tags: file-change-monitor, inotify, fsevents, kqueue, fanotify, watch-files, libfswatch, command-line, automation, macos, linux

## Member repositories
- emcrisostomo/fswatch (main) score 95

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:22.623300+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:55:31.801352+00:00, confidence not recorded.
  - readme: https://github.com/emcrisostomo/fswatch (fetched 2026-08-28T04:09:22.623300+00:00, sha 89837cfa146f)
  - homepage: https://emcrisostomo.github.io/fswatch/ (fetched 2026-08-29T08:50:26.663922+00:00, sha ea34111ed861)
- Data as of 2026-08-30T08:39:29.467469+00:00.
