Skip to content

A file system watcher that executes a command when a specified file changes.

License

Notifications You must be signed in to change notification settings

jmarcelomb/fswatcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fswatcher

Crates.io License Downloads

📌 Overview

fswatcher is a simple CLI tool to monitor file changes and execute a command when modifications are detected. It is built with Rust and utilizes the notify crate for efficient filesystem event watching.

🚀 Installation

You can install fswatcher using Cargo:

cargo install fswatcher

🛠 Usage

Run fswatcher by specifying a file to watch and a command to execute when the file changes:

fswatcher <file> <command>

Example:

fswatcher config.yaml 'echo "Config changed!"'

This will monitor config.yaml and print "Config changed!" whenever the file is modified.

✨ Features

  • Watches a specified file for changes
  • Executes a command automatically upon file modification
  • Uses a lock mechanism to prevent same command duplicate execution

🔧 Development

Clone the repository and build locally:

git clone https://github.com/jmarcelomb/fswatcher.git
cd fswatcher
cargo build --release

Run the tool with:

cargo run -- <file> <command>

📜 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙌 Contribution

Contributions, issues, and feature requests are welcome! Feel free to open an issue or submit a pull request.


Created by Marcelo Borges.

About

A file system watcher that executes a command when a specified file changes.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages