Is it possible to specify the currently open file as entrypoint in .replit?

When I have a collection of multiple scripts in a Replit project, I would like to run the script I have currently open in the Replit editor. So something like you can do in VS Code where you can specify the launch task for the current file.

I know that I can always manually edit the .replit file and enter the desired path as entrypoint, but some configuration to automatically run the currently open file would be cool.


I don’t think this exists and I think it would be a good feature request.

1 Like

Welcome to the community! @sonicx180

I’ve moved this topic to #feature-requests as this doesn’t seem to be a feature yet.


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- -e modify $i;sed -i "/entrypoint/s/\".*\"/\"$i\"/" .replit)&);done'