fws-rs is an application written in rust that acts as a configurable file watcher, capable of detecting real-time changes and running custom commands. Configuration can be done via a JSON file or as arguments during runtime.
- Watch for file system changes (create, modify, delete)
- Execute custom commands
- Configuration via JSON file or command line arguments
- Recursive directory watching
- Observe custom files with patterns extensions
Clone the repo or download the most recently release from github.
git clone https://github.com/ChirujanoCodding/fws-rs.git
In the folder fws-rs
run:
cargo build --release
Once you have the program builded or downloaded from the most recently release, insert the fws-rs.exe
or fws-rs
(depends your OS) in your project.
- Using a configuration file:
fws-rs --config "config.json"
(You must need to create a config.json
file like this)
{
"watch": "your/path", // the path you want to observe.
"exec": "python main.py", // the command you want to be execute when apply changes on files.
"recursive": true | false // if you want to look specific path or recursive (default False).
"on_events_only": true, // if you want to execute commands only if ocurrs an event (default False).
"patterns": ['.rs', '.py', '.js'] // your .extensions (default is []).
}
- Using configuration arguments:
fws-rs --watch "your/path" --exec "your script"
Executing with different configs
Different logs:
This project is under the MIT License.