Warning
Monitor is currently under active development and is a part of my daily development workflow.
As I am still learning GoLang, the APIs, features, and other aspects of the tool are subject to regular changes. This project serves as both a practical tool and a learning experience.
I welcome any suggestions on features, code practices, and improvements. If you have any feedback, please feel free to open an issue. I'd love to learn more and discuss potential enhancements!
- Watches a specified directory for file changes.
- Debounces events to prevent multiple executions from rapid subsequent changes.
- Ignores extra
CHMOD
events on Linux to avoid duplicate command executions.
To install Monitor, you need to have Go installed on your machine. Then, you can build the project using the following commands:
git clone https://github.com/yourusername/monitor.git
cd monitor
go build -o monitor .
After building the project, you can run the monitor command with the following options:
./monitor <directory> <command/service to run>
--verbose
,-v
gives out the verbose output.
version
: prints the cli version
To watch the current directory and output hello
everytime a modification is made within the directory:
./monitor ./ "echo hello"
or
go run main.go ./ "echo hello"
Contributions are welcome! Please feel free to submit a Pull Request for anything you might like to see or have any issues with.
This project is Licensed under MIT License