# Install fswatch with Homebrew

Monitor a directory for changes and run a shell command. Version 1.22.0 via Homebrew; verified 2026-07-22.

## Install

```sh
sudo av install brew:fswatch
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install fswatch
```

  Evidence: provider-native install command

## Package facts

- **Package key:** brew:fswatch
- **Package manager:** Homebrew
- **Version:** 1.22.0
- **Source summary:** Monitor a directory for changes and run a shell command
- **Homepage:** <https://emcrisostomo.github.io/fswatch/>
- **Repository:** <https://github.com/emcrisostomo/fswatch>
- **Last updated:** 2026-07-22T12:18:56Z
- **Generated:** 2026-08-03T00:40:33+00:00

## Executables

- fswatch (alias)

## Install behavior

- Bottle: not available

## Freshness

- Page generated: 2026-08-03
- Package-manager version: 1.22.0
## Project history and usage

fswatch is a cross-platform file-change monitor and libfswatch frontend with backends for macOS, BSD, Linux, Solaris/Illumos, Windows, and portable polling.

### Project history

The fswatch README traces the project to Alan Dipert's 2009 OS X implementation using Apple's FSEvents API. At the end of 2013 Enrico M. Crisostomo wrote fsw as a cross-platform replacement and front end for multiple filesystem event APIs.

In April 2014, the authors of fswatch and fsw agreed to merge the programs, with future development continuing in the fswatch repository under Crisostomo's maintenance. The current README describes fswatch as a frontend for libfswatch, with C, C++, and Go bindings noted.

### Adoption history

The official README tells users to obtain fswatch from their operating-system or third-party package manager when available, and gives examples for MacPorts, Homebrew, and FreeBSD pkg. The supplied package data shows packages across Homebrew, Debian, Fedora, MacPorts, Nix, Ubuntu, winget, and openSUSE families.

The project has continued as a packaged command-line utility while also exposing libfswatch for programs that need filesystem events without maintaining per-platform watcher code.

### How it is used

fswatch accepts paths and streams events for changes to files or directories. Its output can be piped to shell loops or to xargs, and the -o mode supports running one command per batch of changes.

By default fswatch chooses the best available monitor for the platform, while users can select monitors explicitly. The README recommends FSEvents on macOS, File Events Notification on Solaris derivatives, inotify on Linux, the Windows monitor on Windows, kqueue for small BSD/macOS watch sets, and polling as the fallback.

### Why package nerds care

fswatch is important to package users because it provides one CLI and one library abstraction over the incompatible filesystem notification APIs that build tools, static-site generators, test runners, and shell automation frequently need.

For maintainers, fswatch is also a classic portability package: it wraps native APIs where possible, keeps a poll fallback, publishes Texinfo/man/PDF/API documentation, and ships through many Unix and Windows package channels.

### Timeline

- 2009: First fswatch implementation written for OS X FSEvents.
- 2013: fsw written as a multi-backend replacement effort.
- 2014: fsw and fswatch merged, with development continuing in fswatch.
- 2024: fswatch 1.18.0 adopted C++17 and updated FSEvents/inotify rename-correlation support.
- 2026: fswatch 1.21.0 documented conjunctive filters, pruning, and CMake package configuration files for libfswatch.

### Related projects

- fsw is the predecessor project that merged into fswatch.
- libfswatch is the library layer behind the fswatch frontend.
- The project is related to native event systems including FSEvents, kqueue, File Events Notification, inotify, fanotify, ReadDirectoryChangesW, and stat-based polling.

### Sources

- <https://api.github.com/repos/emcrisostomo/fswatch>
- <https://emcrisostomo.github.io/fswatch/documentation.html>
- <https://github.com/emcrisostomo/fswatch>
- <https://raw.githubusercontent.com/emcrisostomo/fswatch/master/NEWS>
- <https://raw.githubusercontent.com/emcrisostomo/fswatch/master/README.md>


## Security Notes

generalized runtime or code generation signal.

- **Geiger risk:** yellow / medium
- generalized runtime or code generation signal


## Combined YAML source

View the package source record on GitHub. [combined/fswatch.yml](https://github.com/automic-vault/db/blob/main/combined/fswatch.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
