Monitoring

watcher – rerun development commands when files change

watcher is a command-line utility that monitors files in a directory and runs a command whenever a relevant filesystem change occurs. It is intended to simplify development workflows involving frequent editing, compilation and testing.

The program can monitor the current working directory or a separately specified location. When files are created, modified or deleted, watcher executes a configured command. It can also attempt to recognise an appropriate command from the structure of a development project.

watcher includes controls for managing how and when commands run. A configurable delay helps avoid repeated execution during closely spaced filesystem events, while ignore rules prevent changes to unrelated files from triggering unnecessary work.

The utility can also manage long-running processes, including development servers. Its combination of automatic command detection and configurable file monitoring makes it useful for straightforward development automation without requiring a more elaborate build system.

This is free and open source software.

Key Features

  • Watch the current directory or a specified directory for filesystem changes.
  • Detect file creation, modification and deletion.
  • Execute a user-defined command when changes occur.
  • Automatically recognise commands for supported project structures.
  • Configurable delay before executing a command after a change.
  • Optionally execute the command immediately when watcher starts.
  • Supports long-running processes, including development servers.
  • Ignore files using configurable patterns.
  • Supports ignore files using Gitignore-style syntax.
  • Optionally include or exclude hidden files from monitoring.
  • Display the list of monitored files when starting.
  • Configurable maximum number of monitored files.
  • Optionally clear the terminal between command executions.
  • Manual refresh controls can trigger execution without a detected change.

Website: github.com/sethigeet/watcher
Support:
Developer: Geet Sethi
License: Apache License 2.0

watcher is written in Go. Learn Go with our recommended free books and free tutorials.

Alternatives to watch


Explore Linux

Best Free and Open Source Software - A huge collection of recommended free and open source software covering every major category.
In-depth Linux Software Reviews - Detailed assessments of Linux software covering features, usability and overall quality.

The Big List of Active Linux Distros - An extensive collection of actively developed Linux distributions.
Open Source Alternatives - Alternatives to software and services from Google, Microsoft, Apple, Adobe, IBM, Autodesk, Oracle and others.
Essential Linux System Tools - Indispensable utilities for monitoring, maintaining and managing Linux systems.
Linux Productivity Tools - Useful utilities for improving productivity and streamlining everyday tasks.
Alternatives to Popular CLI Tools - Modern alternatives to familiar command-line utilities supplied with Linux systems.
Awesome Free Linux Game Tools - Tools, utilities and companion software that improve gaming on Linux.
Machine Learning on Linux - Machine learning and deep learning software, self-hosted applications and practical tools.
Saving Money with Linux - Practical ways to reduce electricity consumption and lower computing costs with Linux.
Linux Candy - Fun, entertaining and sometimes delightfully quirky software from the lighter side of Linux.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted