watchexec 1.14.0 Executes commands in response to file modifications

watchexec is a simple, standalone tool that watches a path and runs a command whenever it detects modifications.

Example use cases:

  • Automatically run unit tests

  • Run linters/syntax checkers

Features:

  • Coalesces multiple filesystem events into one, for editors that use swap/backup files during saving

  • By default, uses .gitignore and .ignore to determine which files to ignore notifications for

  • Supports watching files with a specific extension

  • Supports filtering/ignoring events based on glob patterns

  • Launches child processes in a new process group

  • Sets environment variables that allow the executed program to learn the details of how it was triggered.