Command-line tool
fswatch
brew/fswatch
Checked 25 Oct 2026, 21:09 UTC · Listing refreshed from Homebrew, winget, npm, Scoop and cargo; npm packages checked against OSV.dev
Monitor a directory for changes and run a shell command
At a glance
- Type
- Command-line tool
- Install on
- Windows, macOS, Linux
- Last checked
- 25 Oct 2026, 21:09 UTC
Install it
Windows
winget install --id emcrisostomo.fswatch -e
macOS
brew install fswatch
Linux
brew install fswatch
Run a Bash command on file creation, update, or deletion
fswatch path/to/file | xargs -n 1 bash_command
Watch one or more files and/or directories
fswatch path/to/file path/to/directory path/to/another_directory/**/*.js | xargs -n 1 bash_command
Print the absolute paths of the changed files
fswatch path/to/directory | xargs -n 1 -I _ echo _
Related command-line tools
- mcfly
Fly through your shell history history search shell 搜索 历史 - tre-command
Tree command, improved - rxvt-unicode
Rxvt fork with Unicode support - ipython
Interactive computing in Python - watchexec
Execute commands when watched files change rust developer-tools command-line file-watchers - reflex
Run a command when files change - broot
New way to see and navigate directory trees rust cli command-line - gping
Ping, but with a graph rust linux graph cli ping shell command-line network-monitoring
Listing text is written by the maker; AptLynx lists tools and does not vouch for them. Find another tool · Browse by topic · For agents