Add/change in the start of the .replit
file (replace *.py
with the glob of the files you want to run):
onBoot = 'for i in *.py; do ((/nix/store/fbi9r30p3lqk96lmw5b1v1bpbj62cr2l-inotify-tools-3.20.11.0/bin/inotifywait -e modify $i;sed -i "/entrypoint/s/\".*\"/\"$i\"/" .replit)&);done'