| Crates.io | saw-it |
| lib.rs | saw-it |
| version | 0.1.12 |
| created_at | 2026-01-08 06:15:17.907439+00 |
| updated_at | 2026-01-08 09:09:00.308858+00 |
| description | A simple CLI tool to watch files and execute commands |
| homepage | |
| repository | https://github.com/fepfitra/saw-it |
| max_upload_size | |
| id | 2029645 |
| size | 26,826 |
A simple, lightweight CLI tool that watches for file changes in a directory and executes a specified command.
The name saw is the past tense of the verb see. The concept is grounded in simple cause and effect:
"I saw a change, so it (the file) needs to be done."
This tool acts as a vigilant observer for your workspace. It watches your files, and the moment it saw a modification, it immediately triggers your specified action. It bridges the gap between observing an event and automating the response.
saw --it <PATH> --do <COMMAND>
| Short | Long | Description | Default |
|---|---|---|---|
--it |
Directory or file to watch | (Required) | |
--do |
Command to execute on change | (Required) | |
-c |
--clear |
Clear screen before executing | false |
-v |
--verbose |
Print verbose logs (change info, etc.) | false |
-r |
--restart |
Terminate and restart if still running | false |
-h |
--help |
Print help information | |
-V |
--version |
Print version information |
Watch the current directory and run cargo check on change:
saw --it . --do "cargo check"
Watch the src folder, clear the screen, and run tests with verbose output:
saw --it src -c -v --do "cargo test"
Watch a specific file and restart the command if it's still running:
saw --it server.py -r --do "python server.py"
Watch a specific file and run a python script:
saw --it script.py --do "python script.py"
cargo install saw-it
cargo binstall saw-it
git clone https://github.com/fepfitra/saw-it.git
cd saw-it
cargo install --path .
This will install the binary saw.