# watchexec

> Executes commands in response to file modifications

Source: https://talira.ai/catalog/watchexec-dq0r57ke
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Command-line tool
- Categories: [developer tools / build / file watchers](https://talira.ai/categories/developer-tools/build/file-watchers)
- Platforms: macos, linux, windows, cli
- Licence: Apache-2.0
- Pricing: Free and open source
- Free tier: yes
- Self-hostable: yes

watchexec watches a path and runs a command whenever it detects changes. It coalesces bursts of filesystem events, honours .gitignore and .ignore, uses process groups to keep hold of forking programs, can restart long-running servers, and passes the changed paths in environment variables or stdin. It is language-agnostic and runs on [macOS](https://talira.ai/catalog/macos-8swyggxb.md), Linux and Windows.

## Links

- Website: https://watchexec.github.io
- GitHub: https://github.com/watchexec/watchexec

## Ways to install

### Package managers

- [Homebrew](https://talira.ai/catalog/homebrew-djy17yn9.md): <https://formulae.brew.sh/formula/watchexec>[^1]
- [mise](https://talira.ai/catalog/mise-0axr08xw.md): <https://mise-versions.jdx.dev/tools/watchexec>[^2]

## Problems it solves

- rerun my tests automatically every time I save a file
- restart my dev server when source files change
- nodemon but for any language, not just Node
- entr needs a find pipeline and does not restart servers well
- rebuild assets when CSS or HTML files change
- file watcher that ignores everything in .gitignore
- editors that write temp files trigger my watcher several times
- run a linter on change across Mac, Linux and Windows

## Features

- event coalescing
- .gitignore support
- restart mode
- process group handling
- changed paths in env/stdin
- filters by extension

## Capabilities

- Has a command line tool: plan not known

## Trust

Overall: 0.66 out of 1.
Signals: maintenance 1.00, adoption 0.77, momentum 0.54, community 0.80, backing 0.00, extensibility 0.20.

- last commit 10 days ago
- 192 commits in the last 90 days
- latest release v2.8.0 48 days ago
- 7.3k GitHub stars
- 98 contributors
- accepts sponsorship (Liberapay)

## Alternatives

- [entr](https://talira.ai/catalog/entr-tnjj7sns.md): Run arbitrary commands when files change
- [bacon](https://talira.ai/catalog/bacon-sqn1nm4z.md): Background code checker
- [just](https://talira.ai/catalog/just-6pcsrbga.md): Just a command runner
- [Task](https://talira.ai/catalog/task-sewjtsth.md): A fast, cross-platform build tool inspired by Make, designed for modern workflows.
- [Air](https://talira.ai/catalog/air-x5em024g.md): Live reload for Go apps

## Sources

[^1]: https://formulae.brew.sh/api/formula.json (checked 21 Nov 2026)
[^2]: https://mise-versions.jdx.dev/tools.json (checked 21 Nov 2026)
