@ssafar There's quite a few bash/python inotify implementations floating around, but my favorite for quick one-liner use is entr. 
Using it to watch e.g. a repository is as easy as `find . type -f -name "*.py" | entr -r python main.py` as an example of recursive watching,
but it can also fulfill some more complex needs if necessary.
Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.