# Install fswatch with Homebrew, apt, dnf, MacPorts, Nix, winget, zypper

Monitor a directory for changes and run a shell command. Version 1.21.0 via Homebrew; verified 2026-06-15.

## Install

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

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install fswatch
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install fswatch
```

  Evidence: MacPorts ports tree: sysutils/fswatch/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Debian apt (92%):

```sh
sudo apt install fswatch
```

  Evidence: Debian stable package indexes: fswatch from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install fswatch
```

  Evidence: Fedora Rawhide package metadata: fswatch from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#fswatch
```

  Evidence: nixpkgs package indexes: pkgs/by-name/fs/fswatch/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- zypper (92%):

```sh
sudo zypper install fswatch
```

  Evidence: openSUSE Tumbleweed package metadata: fswatch from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

### Windows

- winget (92%):

```sh
winget install --id emcrisostomo.fswatch -e
```

  Evidence: Windows Package Manager source index: emcrisostomo.fswatch from https://cdn.winget.microsoft.com/cache/source.msix

## Package facts

- **Package key:** brew:fswatch
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/fswatch>
- **Version:** 1.21.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>
- **Upstream docs:** <https://emcrisostomo.github.io/fswatch/documentation.html>
- **License:** GPL-3.0-or-later AND Apache-2.0
- **Source archive:** <https://github.com/emcrisostomo/fswatch/releases/download/1.21.0/fswatch-1.21.0.tar.gz>
- **Last updated:** 2026-06-15T10:20:16-04:00
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- fswatch (cli)
- fswatch (alias)

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 1.21.0
- Package-manager updated: 2026-06-15
- Local data: ok
- Upstream repository: https://github.com/emcrisostomo/fswatch
- info: No cached GitHub release or tag data was available.
## 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

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** fswatch
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## Other Package-Manager Records

- Debian apt - fswatch - 1.14.0+repack-13.1+b1: normalized package name match | Debian stable package indexes: fswatch from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | file change monitor based on inotify | http://emcrisostomo.github.io/fswatch
- Nix - fswatch: normalized package name match | nixpkgs package indexes: pkgs/by-name/fs/fswatch/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - fswatch - 1.14.0+repack-13.1: normalized package name match | Ubuntu 24.04 LTS package indexes: fswatch from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | file change monitor based on inotify | http://emcrisostomo.github.io/fswatch
- dnf - fswatch - 1.17.1-6.fc44: normalized package name match | Fedora Rawhide package metadata: fswatch from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | A cross-platform file change monitor | https://github.com/emcrisostomo/fswatch
- dnf - fswatch-devel - 1.17.1-6.fc44: normalized package name match | Fedora Rawhide package metadata: fswatch-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Development files for fswatch | https://github.com/emcrisostomo/fswatch
- dnf - fswatch-static - 1.17.1-6.fc44: normalized package name match | Fedora Rawhide package metadata: fswatch-static from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Static library for fswatch | https://github.com/emcrisostomo/fswatch
- zypper - fswatch - 1.21.0-1.1: normalized package name match | openSUSE Tumbleweed package metadata: fswatch from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Multi platform file change monitor | https://github.com/emcrisostomo/fswatch
- zypper - fswatch-doc - 1.21.0-1.1: normalized package name match | openSUSE Tumbleweed package metadata: fswatch-doc from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Documentation for fswatch | https://github.com/emcrisostomo/fswatch
- zypper - fswatch-lang - 1.21.0-1.1: normalized package name match | openSUSE Tumbleweed package metadata: fswatch-lang from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Translations for package fswatch | https://github.com/emcrisostomo/fswatch
- zypper - libfswatch-devel - 1.21.0-1.1: normalized package name match | openSUSE Tumbleweed package metadata: libfswatch-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Development files for fswatch | https://github.com/emcrisostomo/fswatch
- zypper - libfswatch15 - 1.21.0-1.1: normalized package name match | openSUSE Tumbleweed package metadata: libfswatch15 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Shared library for fswatch | https://github.com/emcrisostomo/fswatch
- MacPorts - fswatch: normalized package name match | MacPorts ports tree: sysutils/fswatch/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- winget - emcrisostomo.fswatch: normalized package name match | Windows Package Manager source index: emcrisostomo.fswatch from https://cdn.winget.microsoft.com/cache/source.msix


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Secret-risk packages](https://www.automicvault.com/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [gitwatch](https://www.automicvault.com/pkg/brew/gitwatch/) - Popular package that depends on this formula.
- [fsw](https://www.automicvault.com/pkg/brew/fsw/) - Shares av.db curated category or tags: cli, developer-tools, file-watcher, file-watching, filesystem-events.
- [watcher](https://www.automicvault.com/pkg/brew/watcher/) - Shares av.db curated category or tags: cli, cross-platform, developer-tools, file-watcher, file-watching.
- [funzzy](https://www.automicvault.com/pkg/brew/funzzy/) - Shares av.db curated category or tags: cli, developer-tools, file-watcher, file-watching.
- [gaze](https://www.automicvault.com/pkg/brew/gaze/) - Shares av.db curated category or tags: cli, developer-tools, file-watcher, file-watching.
- [watchexec](https://www.automicvault.com/pkg/brew/watchexec/) - Shares av.db curated category or tags: cli, developer-tools, file-watcher, file-watching.
- [watchman](https://www.automicvault.com/pkg/brew/watchman/) - Shares av.db curated category or tags: cli, developer-tools, file-watcher, file-watching.
- [wgo](https://www.automicvault.com/pkg/brew/wgo/) - Shares av.db curated category or tags: cli, developer-tools, file-watcher, file-watching.
- [brename](https://www.automicvault.com/pkg/brew/brename/) - Shares av.db curated category or tags: cli, cross-platform, developer-tools.

## 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
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
