uv Flags & Options
Fast Python package and project manager from Astral.All uv pages
- uv lock --upgrade-package PKG: update one dependency in uv.lockuv lock --upgrade-package PKG moves one dependency in uv.lock to the newest allowed version and keeps the rest. -P, -U, uv sync -P, exact versions, pitfalls.
- uv run --with PKG: add a package for one run without installing ituv run --with pkg adds a package for one run in a cached layered environment, without touching pyproject.toml or uv.lock. Versions, --no-project, requirements.
- uv sync --no-dev: install a project without its dev dependenciesuv sync --no-dev installs runtime dependencies only and removes the dev group from .venv. Group options, --locked, --no-install-project, Dockerfile, pitfalls.
- uvx --from PKG CMD: run a tool whose command name differs from the packageuvx --from PKG CMD runs a tool whose command name differs from its package, or a pinned version. @version shorthand, extras, git sources, uv tool install.