diff --git a/crates/uv-cli/src/lib.rs b/crates/uv-cli/src/lib.rs index 80e8750a42821..6cac9b58eae8d 100644 --- a/crates/uv-cli/src/lib.rs +++ b/crates/uv-cli/src/lib.rs @@ -586,6 +586,13 @@ pub enum ProjectCommand { )] Sync(SyncArgs), /// Update the project's lockfile (experimental). + /// + /// If the project lockfile (`uv.lock`) does not exist, it will be created. + /// If a lockfile is present, its contents will be used as preferences for + /// the resolution. + /// + /// If there are no changes to the project's dependencies, locking will have + /// no effect unless the `--upgrade` flag is provided. #[command( after_help = "Use `uv help lock` for more details.", after_long_help = "" @@ -2287,6 +2294,9 @@ pub struct SyncArgs { #[allow(clippy::struct_excessive_bools)] pub struct LockArgs { /// Assert that the `uv.lock` will remain unchanged. + /// + /// Requires that the lockfile is up-to-date. If the lockfile is missing or + /// needs to be updated, uv will exit with an error. #[arg(long, conflicts_with = "frozen")] pub locked: bool, diff --git a/docs/reference/cli.md b/docs/reference/cli.md index 99c47b5b862f3..6008594869d25 100644 --- a/docs/reference/cli.md +++ b/docs/reference/cli.md @@ -1278,7 +1278,11 @@ uv sync [OPTIONS] ## uv lock -Update the project's lockfile (experimental) +Update the project's lockfile (experimental). + +If the project lockfile (`uv.lock`) does not exist, it will be created. If a lockfile is present, its contents will be used as preferences for the resolution. + +If there are no changes to the project's dependencies, locking will have no effect unless the `--upgrade` flag is provided.
symlink
: Symbolically link packages from the wheel into the site-packages
directory--locked
Assert that the uv.lock
will remain unchanged
--locked
Assert that the uv.lock
will remain unchanged.
Requires that the lockfile is up-to-date. If the lockfile is missing or needs to be updated, uv will exit with an error.
--native-tls
Whether to load TLS certificates from the platform’s native certificate store.