Using uv as your shebang line

from blog Rob Allen, | ↗ original
I create a fair few scripts in my ~/bin/ directory to automate tasks. Since discovering uv and inline script metadata, I've started using Python far more for these. As ~/bin is on my path, I want to run the script by calling it directly on the command line. To do this, I use this shebang: #!/usr/bin/env -S uv run --script The command line will...