snippetbashTip
uv lock — Update the project's lockfile. More information: <https://docs.astral.sh/uv/reference/cli/#uv-lock>.
Viewed 0 times
theuv locklockfilecommandupdateclimoreproject
Problem
How to use the
uv lock command: Update the project's lockfile. More information: <https://docs.astral.sh/uv/reference/cli/#uv-lock>.Solution
uv lock — Update the project's lockfile. More information: <https://docs.astral.sh/uv/reference/cli/#uv-lock>.Create or update the project's lockfile:
uv lockCheck if the lockfile is up-to-date without updating it:
uv lock --checkAssert that a lockfile exists without checking if it's current:
uv lock --check-existsPreview what would be locked without writing the lockfile:
uv lock --dry-runLock a specific Python script instead of the current project:
uv lock --script {{path/to/script.py}}Upgrade all packages to their latest compatible versions:
uv lock --upgradeUpgrade only specific packages:
uv lock --upgrade-package {{package1}} --upgrade-package {{package2}}Code Snippets
Create or update the project's lockfile
uv lockCheck if the lockfile is up-to-date without updating it
uv lock --checkAssert that a lockfile exists without checking if it's current
uv lock --check-existsPreview what would be locked without writing the lockfile
uv lock --dry-runLock a specific Python script instead of the current project
uv lock --script {{path/to/script.py}}Context
tldr-pages: common/uv lock
Revisions (0)
No revisions yet.