Earlier quoted context omitted.
> The script now works like a standalone executable But whoever runs this has to install uv first, so not really standalone.
This is a PEP and not specific to uv: https://peps.python.org/pep-0723/
The two main runners I am aware of are uv and pipx. (Any compliant runner can be referenced in the shebang to make a script standalone where shebangs are supported.)