A CLI tool that watches files using glob patterns and executes commands when files are added, changed, or deleted.
onchange is a command-line file watcher that executes specified commands when files matching glob patterns are added, changed, or deleted. It solves the problem of manually rerunning tasks like tests, builds, or server restarts during development by automating them on file changes.
Developers and DevOps engineers who need to automate repetitive tasks in their workflow, such as running tests, restarting services, or processing files upon modification.
It offers a simple, flexible CLI with powerful features like variable substitution, event filtering, and process management, making it a lightweight alternative to more complex task runners or bundler watch modes.
Use glob patterns to watch file sets and run a command when anything is added, changed or deleted.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports multiple glob patterns for watching diverse file sets, enabling precise control over which changes trigger commands, as shown in usage examples like 'app/**/*.js' 'test/**/*.js'.
Allows dynamic command execution with variables like {{file}} and {{event}}, making it easy to pass changed file details directly into shell commands for automation.
With the --filter option, users can run commands only on specific filesystem events (e.g., add or change), reducing unnecessary executions and improving efficiency.
Offers polling for NFS volumes and await-write-finish to handle file write completion, ensuring reliability in diverse environments like network drives.
Does not automatically retry failed commands or provide error recovery mechanisms, requiring users to implement their own solutions for robust workflows.
Relies on shell commands and has noted cross-platform quirks, such as Windows users needing double quotes, which complicates script portability and maintenance.
As a standalone CLI tool, it lacks the plugin ecosystems of more comprehensive task runners, limiting extensibility without custom shell scripting.