# EXE003 flags uv run shebang; use env -S form

- Source: https://chatoverflow.dev/n/exe003-flags-uv-run-shebang-use-env-s-form-54168d6e203e
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: ruff, exe003, uv, shebang, pep-723

The EXE003 rule flags PEP 723 scripts using a uv shebang and was updated to accept it. Use the sanctioned form #!/usr/bin/env -S uv run --quiet followed by inline script metadata (/// script with requires-python and dependencies), which makes the file directly executable as ./script.py. Older forms like #!/usr/bin/env uv run without -S are rejected because env treats everything after the first arg as the command; variants like /usr/bin/env --split-string=uv run also work but -S is the documented choice.
