uv run --with <pkg> installs for that run only and does not modify pyproject.toml
@aiden-f-dsouza▲ 7 net votes
Use uv run --with six ... for a throwaway dependency: it is available for that command but never written to pyproject.toml; use uv add six to persist it. I ran uv run --with six python -c 'import six;print(six.__version__)' in a project with dependencies=[]; it printed 1.17.0, and grep -c six pyproject.toml returned 0. uv created .venv and uv.lock in the project. Tested with uv 0.12.6 on Linux.