Preview features
uv includes opt-in preview features to provide an opportunity for community feedback and increase confidence that changes are a net-benefit before enabling them for everyone.
Enabling preview features
To enable all preview features, use the --preview flag:
Or, set the UV_PREVIEW environment variable:
To enable specific preview features, use the --preview-features flag:
The --preview-features flag can be repeated to enable multiple features:
Or, features can be provided in a comma separated list:
The UV_PREVIEW_FEATURES environment variable can be used similarly, e.g.:
Preview features can also be enabled in uv.toml, or under [tool.uv] in pyproject.toml and PEP
723 metadata:
Set preview-features = true to enable all preview features.
Some preview features take effect before configuration files are loaded and cannot be enabled from configuration.
For backwards compatibility, enabling preview features that do not exist will warn, but not error, regardless of the source.
Using preview features
Often, preview features can be used without changing any preview settings if the behavior change is
gated by some sort of user interaction, For example, while pylock.toml support is in preview, you
can use uv pip install with a pylock.toml file without additional configuration because
specifying the pylock.toml file indicates you want to use the feature. However, a warning will be
displayed that the feature is in preview. The preview feature can be enabled to silence the warning.
Available preview features
The following preview features are available:
add-bounds: Allows configuring the default bounds foruv addinvocations.adjust-ulimit: On Unix, raises the process's soft open-file limit at startup, up to the hard limit.audit-command: Allows usinguv auditanduv tool audit.auth-helper: Allows usinguv auth helperas a credential helper for external tools.azure-endpoint: Allows signing requests to Azure Blob Storage endpoints with Azure credentials.cache-physical-space: Reports the physical disk space reclaimed by cache cleanup, accounting for hardlinks and copy-on-write clones.cache-size: Allows usinguv cache size.centralized-project-envs: Stores project virtual environments in the uv cache.check-command: Allows usinguv check.detect-module-conflicts: Warns when multiple packages would install conflicting Python modules into the same environment.direct-publish: Allows publishing directly to a package index.extra-build-dependencies: Allows specifying additional dependencies for package builds.format-command: Allows usinguv format.gcs-endpoint: Allows signing requests to configured Google Cloud Storage endpoints.index-exclude-newer: Allows settingexclude-neweron configured package indexes.index-hash-algorithm: Allows requiring a hash algorithm for configured package indexes.init-project-flag: Rejects the deprecated--projectoption inuv init.json-output: Allows--output-format jsonfor various uv commands.lock-without-metadata: Omitpackage.metadatafromuv.lock.lockfile-format-check: Rejects non-canonical lockfile formatting when using--lockedor--check.malware-check: Allowsuv syncand other commands to check for malware using OSV before installing packages.metadata-json: Includes JSON metadata files in built wheels.native-auth: Enables storage of credentials in a system-native location.no-distutils-patch: Stops installing the_virtualenv.py/_virtualenv.pthdistutils configuration monkeypatch in virtual environments for Python 3.10 and later.package-conflicts: Allows defining workspace conflicts at the package level.packaged-init: Makesuv initcreate a packaged application with asrc/layout, build system, and script entry point by default.project-directory-must-exist: Rejects an invalid--projectpath instead of warning and continuing. Except foruv init, the path must already exist as a directory or point to apyproject.tomlfile. This feature takes effect before configuration is loaded.publish-require-normalized: Requires normalized distribution filenames when publishing, skipping files whose names are not normalized.pylock: Allows installing frompylock.tomlfiles.python-install-default: Allows installingpythonandpython3executables.relocatable-envs-default: Creates relocatable virtual environments by default.s3-endpoint: Allows signing requests to configured S3-compatible endpoints.sbom-export: Allows usinguv export --format=cyclonedx1.5.special-conda-env-names: Stops treating Conda environments namedbaseorrootas special.target-workspace-discovery: Uses the directory containing a localuv runtarget, rather than the current working directory, as the starting point for project and workspace discovery. This feature takes effect before configuration is loaded.toml-backwards-compatibility: Rewritespyproject.tomlas TOML 1.0 when building source distributions, preserving the original aspyproject.toml.origto ensure compatibility with older build tools.tool-install-locks: Stores auv.lockalongside each installed tool and reuses it for reproducible installations, upgrades, and audits.venv-safe-clear: Preventsuv venv --clearfrom clearing a directory that does not contain apyvenv.cfgfile unless--forceis provided.workspace-dir: Allows usinguv workspace dir.workspace-list: Allows usinguv workspace list.workspace-list-scripts: Allows usinguv workspace list --scripts.workspace-metadata: Allows usinguv workspace metadata.
Disabling preview features
The --no-preview option can be used to disable preview features.