# watchexec/watchexec

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/watchexec-watchexec).**

6,762 stars · 181 forks · Rust · apache-2.0

## Links

- GitHub: https://github.com/watchexec/watchexec
- awesome-repositories: https://awesome-repositories.com/repository/watchexec-watchexec.md

## Topics

`command-line` `developer-tools` `file-watchers` `linux` `macos` `rust` `windows`

## Description

Watchexec is a command-line task runner and file system change trigger that automates developer workflows by executing scripts or programs when files in a directory are modified. It functions as a process lifecycle manager, ensuring that triggered child processes and process groups are managed and restarted cleanly.

The tool provides path filtering to restrict monitoring to specific extensions or directories and utilizes debouncing to group rapid bursts of file system notifications into a single execution. It supports propagating the list of modified files to the executed command via standard input or platform-specific environment variables.

Its capabilities cover automated test execution, continuous build automation, and hot-reload development workflows.

## Tags

### Development Tools & Productivity

- [File Change Listeners](https://awesome-repositories.com/f/development-tools-productivity/file-change-listeners.md) — Provides a CLI tool that automatically executes specific commands when modifications are detected in monitored file paths. ([source](https://cdn.jsdelivr.net/gh/watchexec/watchexec@main/README.md))
- [File Watchers](https://awesome-repositories.com/f/development-tools-productivity/file-watchers.md) — Acts as a file watcher task runner that executes commands based on filtered file system events.
- [Process Lifecycle Managers](https://awesome-repositories.com/f/development-tools-productivity/process-lifecycle-managers.md) — Manages the lifecycle of child processes and process groups to ensure clean restarts between executions. ([source](https://cdn.jsdelivr.net/gh/watchexec/watchexec@main/README.md))
- [Event-Driven Execution](https://awesome-repositories.com/f/development-tools-productivity/shell-command-execution/event-driven-execution.md) — Automatically triggers shell commands in response to asynchronous file system notifications from the operating system kernel.
- [Build Automation Scripts](https://awesome-repositories.com/f/development-tools-productivity/build-automation-scripts.md) — Enables continuous build automation by triggering compilation scripts immediately after files are saved.
- [Automated Test Execution](https://awesome-repositories.com/f/development-tools-productivity/debugging-profiling-testing/test-execution-management/automated-test-execution.md) — Supports automated test execution by triggering test suites whenever source code files are modified.
- [Event Debouncing Utilities](https://awesome-repositories.com/f/development-tools-productivity/event-debouncing-utilities.md) — Implements event debouncing to prevent redundant command execution during rapid bursts of file system notifications.
- [Glob Pattern Resolvers](https://awesome-repositories.com/f/development-tools-productivity/glob-pattern-resolvers.md) — Utilizes glob patterns to filter file system events and determine if a change should trigger a command.
- [Hot Code Reloading](https://awesome-repositories.com/f/development-tools-productivity/hot-code-reloading.md) — Facilitates hot-reload development workflows by reflecting code edits in the running application without manual restarts.

### Operating Systems & Systems Programming

- [File-Watch Resource Triggers](https://awesome-repositories.com/f/operating-systems-systems-programming/system-administration-maintenance/file-system-management/file-systems/file-change-detection/file-watch-resource-triggers.md) — Functions as a file system change trigger that runs scripts or programs when directory files are modified.
- [Child Process Management Helpers](https://awesome-repositories.com/f/operating-systems-systems-programming/kernel-core-internals/process-and-memory-management/memory-management/process-lifecycle-orchestrators/child-process-management-helpers.md) — Tracks and terminates child processes using process group IDs to prevent orphaned processes during restarts.

### Software Engineering & Architecture

- [Workflow Automation](https://awesome-repositories.com/f/software-engineering-architecture/workflow-automation.md) — Automates repetitive developer tasks like testing and compiling by monitoring source code changes in real time.

### System Administration & Monitoring

- [File System Monitors](https://awesome-repositories.com/f/system-administration-monitoring/file-system-monitors.md) — Monitors file system events to execute custom shell commands or scripts in response to directory changes. ([source](https://cdn.jsdelivr.net/gh/watchexec/watchexec@main/README.md))

### Part of an Awesome List

- [System Utilities](https://awesome-repositories.com/f/awesome-lists/devtools/system-utilities.md) — Command execution on file modification.
