# Inspiration [Hatch syncs the environments automatically](https://hatch.pypa.io/latest/environment/#dependencies) whenever you run a command. `poetry install --sync` existed since [1.2.0a2](https://python-poetry.org/history/#120a2---2021-08-01). | Tool | Date added | Version | | ---------------------------------------------------------------- | -------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | | [`pdm sync`](https://pdm-project.org/latest/reference/cli/#sync) | [2020-01-20](https://pdm-project.org/en/latest/dev/changelog/#release-v001-2020-01-20) | [0.0.1](https://pdm-project.org/en/latest/dev/changelog/#release-v001-2020-01-20) | | [`uv sync`](https://docs.astral.sh/uv/reference/cli/#uv-sync) | [2024-08-24](https://astral.sh/blog/uv-unified-python-packaging) | [0.3](https://astral.sh/blog/uv-unified-python-packaging) | | [`poetry sync`](https://python-poetry.org/docs/cli/#sync) | [2025-01-05](https://python-poetry.org/history/#200---2025-01-05) | [2.0.0](https://python-poetry.org/history/#200---2025-01-05) | ## PDM ``` usage: pdm sync [-h] [-v | -q] [-g] [-p PROJECT_PATH] [-G GROUP] [--without ] [--no-default] [-d | --prod] [--dry-run] [-L LOCKFILE] [-k SKIP] [--clean | --only-keep] [--no-editable] [--no-self] [--fail-fast] [--no-isolation] [--config-setting CONFIG_SETTING] [--venv [NAME]] [-r] Synchronize the current working set with lock file options: -h, --help Show this help message and exit. -v, --verbose Use `-v` for detailed output and `-vv` for more detailed -q, --quiet Suppress output -g, --global Use the global project, supply the project root with `-p` option -p, --project PROJECT_PATH Specify another path as the project root, which changes the base of pyproject.toml and __pypackages__ [env var: PDM_PROJECT] --dry-run Show the difference only and don't perform any action -L, --lockfile LOCKFILE Specify another lockfile path. Default: pdm.lock. [env var: PDM_LOCKFILE] -k, --skip SKIP Skip some tasks and/or hooks by their comma-separated names. Can be supplied multiple times. Use ":all" to skip all hooks. Use ":pre" and ":post" to skip all pre or post hooks. --clean Clean packages not in the lockfile --only-keep, --clean-unselected Only keep the selected packages --venv [NAME] Run the command in the virtual environment with the given key. [env var: PDM_IN_VENV] -r, --reinstall Force reinstall existing dependencies Dependencies Selection: -G, --group, --with GROUP Select group of optional-dependencies separated by comma or dependency-groups (with `-d`). Can be supplied multiple times, use ":all" to include all groups under the same species. --without Exclude groups of optional-dependencies or dependency- groups --no-default Don't include dependencies from the default group -d, --dev Select dev dependencies --prod, --production Unselect dev dependencies Install options: --no-editable Install non-editable versions for all packages. [env var: PDM_NO_EDITABLE] --no-self Don't install the project itself. [env var: PDM_NO_SELF] --fail-fast, -x Abort on first installation error --no-isolation Disable isolation when building a source distribution that follows PEP 517, as in: build dependencies specified by PEP 518 must be already installed if this option is used. --config-setting, -C CONFIG_SETTING Pass options to the builder. Options with a value must be specified after "=": `--config-setting=key(=value)` or `-Ckey(=value)` ``` ## uv ``` Update the project's environment. Syncing ensures that all project dependencies are installed and up-to-date with the lockfile. By default, an exact sync is performed: uv removes packages that are not declared as dependencies of the project. Use the `--inexact` flag to keep extraneous packages. Note that if an extraneous package conflicts with a project dependency, it will still be removed. Additionally, if `--no-build-isolation` is used, uv will not remove extraneous packages to avoid removing possible build dependencies. If the project virtual environment (`.venv`) does not exist, it will be created. The project is re-locked before syncing unless the `--locked` or `--frozen` flag is provided. uv will search for a project in the current directory or any parent directory. If a project cannot be found, uv will exit with an error. Note that, when installing from a lockfile, uv will not provide warnings for yanked package versions. Usage: uv sync [OPTIONS] Options: --extra <EXTRA> Include optional dependencies from the specified extra name. May be provided more than once. When multiple extras or groups are specified that appear in `tool.uv.conflicts`, uv will report an error. Note that all optional dependencies are always included in the resolution; this option only affects the selection of packages to install. --output-format <OUTPUT_FORMAT> Select the output format Possible values: - text: Display the result in a human-readable format - json: Display the result in JSON format [default: text] --all-extras Include all optional dependencies. When two or more extras are declared as conflicting in `tool.uv.conflicts`, using this flag will always result in an error. Note that all optional dependencies are always included in the resolution; this option only affects the selection of packages to install. --no-extra <NO_EXTRA> Exclude the specified optional dependencies, if `--all-extras` is supplied. May be provided multiple times. --no-dev Disable the development dependency group. This option is an alias of `--no-group dev`. See `--no-default-groups` to disable all default groups instead. [env: UV_NO_DEV=] --only-dev Only include the development dependency group. The project and its dependencies will be omitted. This option is an alias for `--only-group dev`. Implies `--no-default-groups`. --group <GROUP> Include dependencies from the specified dependency group. When multiple extras or groups are specified that appear in `tool.uv.conflicts`, uv will report an error. May be provided multiple times. --no-group <NO_GROUP> Disable the specified dependency group. This option always takes precedence over default groups, `--all-groups`, and `--group`. May be provided multiple times. [env: UV_NO_GROUP=] --no-default-groups Ignore the default dependency groups. uv includes the groups defined in `tool.uv.default-groups` by default. This disables that option, however, specific groups can still be included with `--group`. [env: UV_NO_DEFAULT_GROUPS=] --only-group <ONLY_GROUP> Only include dependencies from the specified dependency group. The project and its dependencies will be omitted. May be provided multiple times. Implies `--no-default-groups`. --all-groups Include dependencies from all dependency groups. `--no-group` can be used to exclude specific groups. --no-editable Install any editable dependencies, including the project and any workspace members, as non-editable. [env: UV_NO_EDITABLE=] --inexact Do not remove extraneous packages present in the environment. When enabled, uv will make the minimum necessary changes to satisfy the requirements. By default, syncing will remove any extraneous packages from the environment --active Sync dependencies to the active virtual environment. Instead of creating or updating the virtual environment for the project or script, the active virtual environment will be preferred, if the `VIRTUAL_ENV` environment variable is set. --no-install-project Do not install the current project. By default, the current project is installed into the environment with all of its dependencies. The `--no-install-project` option allows the project to be excluded, but all of its dependencies are still installed. This is particularly useful in situations like building Docker images where installing the project separately from its dependencies allows optimal layer caching. The inverse `--only-install-project` can be used to install _only_ the project itself, excluding all dependencies. --no-install-workspace Do not install any workspace members, including the root project. By default, all workspace members and their dependencies are installed into the environment. The `--no-install-workspace` option allows exclusion of all the workspace members while retaining their dependencies. This is particularly useful in situations like building Docker images where installing the workspace separately from its dependencies allows optimal layer caching. The inverse `--only-install-workspace` can be used to install _only_ workspace members, excluding all other dependencies. --no-install-local Do not install local path dependencies Skips the current project, workspace members, and any other local (path or editable) packages. Only remote/indexed dependencies are installed. Useful in Docker builds to cache heavy third-party dependencies first and layer local packages separately. The inverse `--only-install-local` can be used to install _only_ local packages, excluding all remote dependencies. --no-install-package <NO_INSTALL_PACKAGE> Do not install the given package(s). By default, all of the project's dependencies are installed into the environment. The `--no-install-package` option allows exclusion of specific packages. Note this can result in a broken environment, and should be used with caution. The inverse `--only-install-package` can be used to install _only_ the specified packages, excluding all others. --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. [env: UV_LOCKED=] --frozen Sync without updating the `uv.lock` file. Instead of checking if the lockfile is up-to-date, uses the versions in the lockfile as the source of truth. If the lockfile is missing, uv will exit with an error. If the `pyproject.toml` includes changes to dependencies that have not been included in the lockfile yet, they will not be present in the environment. [env: UV_FROZEN=] --dry-run Perform a dry run, without writing the lockfile or modifying the project environment. In dry-run mode, uv will resolve the project's dependencies and report on the resulting changes to both the lockfile and the project environment, but will not modify either. --all-packages Sync all packages in the workspace. The workspace's environment (`.venv`) is updated to include all workspace members. Any extras or groups specified via `--extra`, `--group`, or related options will be applied to all workspace members. --package <PACKAGE> Sync for specific packages in the workspace. The workspace's environment (`.venv`) is updated to reflect the subset of dependencies declared by the specified workspace member packages. If any workspace member does not exist, uv will exit with an error. --script <SCRIPT> Sync the environment for a Python script, rather than the current project. If provided, uv will sync the dependencies based on the script's inline metadata table, in adherence with PEP 723. --python-platform <PYTHON_PLATFORM> The platform for which requirements should be installed. Represented as a "target triple", a string that describes the target platform in terms of its CPU, vendor, and operating system name, like `x86_64-unknown-linux-gnu` or `aarch64-apple-darwin`. When targeting macOS (Darwin), the default minimum version is `13.0`. Use `MACOSX_DEPLOYMENT_TARGET` to specify a different minimum version, e.g., `14.0`. When targeting iOS, the default minimum version is `13.0`. Use `IPHONEOS_DEPLOYMENT_TARGET` to specify a different minimum version, e.g., `14.0`. When targeting Android, the default minimum Android API level is `24`. Use `ANDROID_API_LEVEL` to specify a different minimum version, e.g., `26`. WARNING: When specified, uv will select wheels that are compatible with the _target_ platform; as a result, the installed distributions may not be compatible with the _current_ platform. Conversely, any distributions that are built from source may be incompatible with the _target_ platform, as they will be built for the _current_ platform. The `--python-platform` option is intended for advanced use cases. Possible values: - windows: An alias for `x86_64-pc-windows-msvc`, the default target for Windows - linux: An alias for `x86_64-unknown-linux-gnu`, the default target for Linux - macos: An alias for `aarch64-apple-darwin`, the default target for macOS - x86_64-pc-windows-msvc: A 64-bit x86 Windows target - aarch64-pc-windows-msvc: An ARM64 Windows target - i686-pc-windows-msvc: A 32-bit x86 Windows target - x86_64-unknown-linux-gnu: An x86 Linux target. Equivalent to `x86_64-manylinux_2_28` - aarch64-apple-darwin: An ARM-based macOS target, as seen on Apple Silicon devices - x86_64-apple-darwin: An x86 macOS target - aarch64-unknown-linux-gnu: An ARM64 Linux target. Equivalent to `aarch64-manylinux_2_28` - aarch64-unknown-linux-musl: An ARM64 Linux target - x86_64-unknown-linux-musl: An `x86_64` Linux target - riscv64-unknown-linux: A RISCV64 Linux target - x86_64-manylinux2014: An `x86_64` target for the `manylinux2014` platform. Equivalent to `x86_64-manylinux_2_17` - x86_64-manylinux_2_17: An `x86_64` target for the `manylinux_2_17` platform - x86_64-manylinux_2_28: An `x86_64` target for the `manylinux_2_28` platform - x86_64-manylinux_2_31: An `x86_64` target for the `manylinux_2_31` platform - x86_64-manylinux_2_32: An `x86_64` target for the `manylinux_2_32` platform - x86_64-manylinux_2_33: An `x86_64` target for the `manylinux_2_33` platform - x86_64-manylinux_2_34: An `x86_64` target for the `manylinux_2_34` platform - x86_64-manylinux_2_35: An `x86_64` target for the `manylinux_2_35` platform - x86_64-manylinux_2_36: An `x86_64` target for the `manylinux_2_36` platform - x86_64-manylinux_2_37: An `x86_64` target for the `manylinux_2_37` platform - x86_64-manylinux_2_38: An `x86_64` target for the `manylinux_2_38` platform - x86_64-manylinux_2_39: An `x86_64` target for the `manylinux_2_39` platform - x86_64-manylinux_2_40: An `x86_64` target for the `manylinux_2_40` platform - aarch64-manylinux2014: An ARM64 target for the `manylinux2014` platform. Equivalent to `aarch64-manylinux_2_17` - aarch64-manylinux_2_17: An ARM64 target for the `manylinux_2_17` platform - aarch64-manylinux_2_28: An ARM64 target for the `manylinux_2_28` platform - aarch64-manylinux_2_31: An ARM64 target for the `manylinux_2_31` platform - aarch64-manylinux_2_32: An ARM64 target for the `manylinux_2_32` platform - aarch64-manylinux_2_33: An ARM64 target for the `manylinux_2_33` platform - aarch64-manylinux_2_34: An ARM64 target for the `manylinux_2_34` platform - aarch64-manylinux_2_35: An ARM64 target for the `manylinux_2_35` platform - aarch64-manylinux_2_36: An ARM64 target for the `manylinux_2_36` platform - aarch64-manylinux_2_37: An ARM64 target for the `manylinux_2_37` platform - aarch64-manylinux_2_38: An ARM64 target for the `manylinux_2_38` platform - aarch64-manylinux_2_39: An ARM64 target for the `manylinux_2_39` platform - aarch64-manylinux_2_40: An ARM64 target for the `manylinux_2_40` platform - aarch64-linux-android: An ARM64 Android target - x86_64-linux-android: An `x86_64` Android target - wasm32-pyodide2024: A wasm32 target using the Pyodide 2024 platform. Meant for use with Python 3.12 - arm64-apple-ios: An ARM64 target for iOS device - arm64-apple-ios-simulator: An ARM64 target for iOS simulator - x86_64-apple-ios-simulator: An `x86_64` target for iOS simulator --check Check if the Python environment is synchronized with the project. If the environment is not up to date, uv will exit with an error. Index options: --index <INDEX> The URLs to use when resolving dependencies, in addition to the default index. Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format. All indexes provided via this flag take priority over the index specified by `--default-index` (which defaults to PyPI). When multiple `--index` flags are provided, earlier values take priority. Index names are not supported as values. Relative paths must be disambiguated from index names with `./` or `../` on Unix or `.\\`, `..\\`, `./` or `../` on Windows. [env: UV_INDEX] --default-index <DEFAULT_INDEX> The URL of the default package index (by default: <https://pypi.org/simple>). Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format. The index given by this flag is given lower priority than all other indexes specified via the `--index` flag. [env: UV_DEFAULT_INDEX] -i, --index-url <INDEX_URL> (Deprecated: use `--default-index` instead) The URL of the Python package index (by default: <https://pypi.org/simple>). Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format. The index given by this flag is given lower priority than all other indexes specified via the `--extra-index-url` flag. [env: UV_INDEX_URL] --extra-index-url <EXTRA_INDEX_URL> (Deprecated: use `--index` instead) Extra URLs of package indexes to use, in addition to `--index-url`. Accepts either a repository compliant with PEP 503 (the simple repository API), or a local directory laid out in the same format. All indexes provided via this flag take priority over the index specified by `--index-url` (which defaults to PyPI). When multiple `--extra-index-url` flags are provided, earlier values take priority. [env: UV_EXTRA_INDEX_URL] -f, --find-links <FIND_LINKS> Locations to search for candidate distributions, in addition to those found in the registry indexes. If a path, the target must be a directory that contains packages as wheel files (`.whl`) or source distributions (e.g., `.tar.gz` or `.zip`) at the top level. If a URL, the page must contain a flat list of links to package files adhering to the formats described above. [env: UV_FIND_LINKS] --no-index Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via `--find-links` --index-strategy <INDEX_STRATEGY> The strategy to use when resolving against multiple index URLs. By default, uv will stop at the first index on which a given package is available, and limit resolutions to those present on that first index (`first-index`). This prevents "dependency confusion" attacks, whereby an attacker can upload a malicious package under the same name to an alternate index. Possible values: - first-index: Only use results from the first index that returns a match for a given package name - unsafe-first-match: Search for every package name across all indexes, exhausting the versions from the first index before moving on to the next - unsafe-best-match: Search for every package name across all indexes, preferring the "best" version found. If a package version is in multiple indexes, only look at the entry for the first index [env: UV_INDEX_STRATEGY=] --keyring-provider <KEYRING_PROVIDER> Attempt to use `keyring` for authentication for index URLs. At present, only `--keyring-provider subprocess` is supported, which configures uv to use the `keyring` CLI to handle authentication. Defaults to `disabled`. Possible values: - disabled: Do not use keyring for credential lookup - subprocess: Use the `keyring` command for credential lookup [env: UV_KEYRING_PROVIDER=] Resolver options: -U, --upgrade Allow package upgrades, ignoring pinned versions in any existing output file. Implies `--refresh` -P, --upgrade-package <UPGRADE_PACKAGE> Allow upgrades for a specific package, ignoring pinned versions in any existing output file. Implies `--refresh-package` --resolution <RESOLUTION> The strategy to use when selecting between the different compatible versions for a given package requirement. By default, uv will use the latest compatible version of each package (`highest`). Possible values: - highest: Resolve the highest compatible version of each package - lowest: Resolve the lowest compatible version of each package - lowest-direct: Resolve the lowest compatible version of any direct dependencies, and the highest compatible version of any transitive dependencies [env: UV_RESOLUTION=] --prerelease <PRERELEASE> The strategy to use when considering pre-release versions. By default, uv will accept pre-releases for packages that _only_ publish pre-releases, along with first-party requirements that contain an explicit pre-release marker in the declared specifiers (`if-necessary-or-explicit`). Possible values: - disallow: Disallow all pre-release versions - allow: Allow all pre-release versions - if-necessary: Allow pre-release versions if all versions of a package are pre-release - explicit: Allow pre-release versions for first-party packages with explicit pre-release markers in their version requirements - if-necessary-or-explicit: Allow pre-release versions if all versions of a package are pre-release, or if the package has an explicit pre-release marker in its version requirements [env: UV_PRERELEASE=] --fork-strategy <FORK_STRATEGY> The strategy to use when selecting multiple versions of a given package across Python versions and platforms. By default, uv will optimize for selecting the latest version of each package for each supported Python version (`requires-python`), while minimizing the number of selected versions across platforms. Under `fewest`, uv will minimize the number of selected versions for each package, preferring older versions that are compatible with a wider range of supported Python versions or platforms. Possible values: - fewest: Optimize for selecting the fewest number of versions for each package. Older versions may be preferred if they are compatible with a wider range of supported Python versions or platforms - requires-python: Optimize for selecting latest supported version of each package, for each supported Python version [env: UV_FORK_STRATEGY=] --exclude-newer <EXCLUDE_NEWER> Limit candidate packages to those that were uploaded prior to the given date. Accepts RFC 3339 timestamps (e.g., `2006-12-02T02:07:43Z`), local dates in the same format (e.g., `2006-12-02`) resolved based on your system's configured time zone, a "friendly" duration (e.g., `24 hours`, `1 week`, `30 days`), or an ISO 8601 duration (e.g., `PT24H`, `P7D`, `P30D`). Durations do not respect semantics of the local time zone and are always resolved to a fixed number of seconds assuming that a day is 24 hours (e.g., DST transitions are ignored). Calendar units such as months and years are not allowed. [env: UV_EXCLUDE_NEWER=] --exclude-newer-package <EXCLUDE_NEWER_PACKAGE> Limit candidate packages for specific packages to those that were uploaded prior to the given date. Accepts package-date pairs in the format `PACKAGE=DATE`, where `DATE` is an RFC 3339 timestamp (e.g., `2006-12-02T02:07:43Z`), a local date in the same format (e.g., `2006-12-02`) resolved based on your system's configured time zone, a "friendly" duration (e.g., `24 hours`, `1 week`, `30 days`), or an ISO 8601 duration (e.g., `PT24H`, `P7D`, `P30D`). Durations do not respect semantics of the local time zone and are always resolved to a fixed number of seconds assuming that a day is 24 hours (e.g., DST transitions are ignored). Calendar units such as months and years are not allowed. Can be provided multiple times for different packages. --no-sources Ignore the `tool.uv.sources` table when resolving dependencies. Used to lock against the standards-compliant, publishable package metadata, as opposed to using any workspace, Git, URL, or local path sources [env: UV_NO_SOURCES=] --no-sources-package <NO_SOURCES_PACKAGE> Don't use sources from the `tool.uv.sources` table for the specified packages [env: UV_NO_SOURCES_PACKAGE=] Installer options: --reinstall Reinstall all packages, regardless of whether they're already installed. Implies `--refresh` --reinstall-package <REINSTALL_PACKAGE> Reinstall a specific package, regardless of whether it's already installed. Implies `--refresh-package` --link-mode <LINK_MODE> The method to use when installing packages from the global cache. Defaults to `clone` (also known as Copy-on-Write) on macOS, and `hardlink` on Linux and Windows. WARNING: The use of symlink link mode is discouraged, as they create tight coupling between the cache and the target environment. For example, clearing the cache (`uv cache clean`) will break all installed packages by way of removing the underlying source files. Use symlinks with caution. Possible values: - clone: Clone (i.e., copy-on-write or reflink) packages from the wheel into the `site-packages` directory - copy: Copy packages from the wheel into the `site-packages` directory - hardlink: Hard link packages from the wheel into the `site-packages` directory - symlink: Symbolically link packages from the wheel into the `site-packages` directory [env: UV_LINK_MODE=] --compile-bytecode Compile Python files to bytecode after installation. By default, uv does not compile Python (`.py`) files to bytecode (`__pycache__/*.pyc`); instead, compilation is performed lazily the first time a module is imported. For use-cases in which start time is critical, such as CLI applications and Docker containers, this option can be enabled to trade longer installation times for faster start times. When enabled, uv will process the entire site-packages directory (including packages that are not being modified by the current operation) for consistency. Like pip, it will also ignore errors. [env: UV_COMPILE_BYTECODE=] Build options: -C, --config-setting <CONFIG_SETTING> Settings to pass to the PEP 517 build backend, specified as `KEY=VALUE` pairs --config-settings-package <CONFIG_SETTINGS_PACKAGE> Settings to pass to the PEP 517 build backend for a specific package, specified as `PACKAGE:KEY=VALUE` pairs --no-build-isolation Disable isolation when building source distributions. Assumes that build dependencies specified by PEP 518 are already installed. [env: UV_NO_BUILD_ISOLATION=] --no-build-isolation-package <NO_BUILD_ISOLATION_PACKAGE> Disable isolation when building source distributions for a specific package. Assumes that the packages' build dependencies specified by PEP 518 are already installed. --no-build Don't build source distributions. When enabled, resolving will not run arbitrary Python code. The cached wheels of already-built source distributions will be reused, but operations that require building distributions will exit with an error. [env: UV_NO_BUILD=] --no-build-package <NO_BUILD_PACKAGE> Don't build source distributions for a specific package [env: UV_NO_BUILD_PACKAGE=] --no-binary Don't install pre-built wheels. The given packages will be built and installed from source. The resolver will still use pre-built wheels to extract package metadata, if available. [env: UV_NO_BINARY=] --no-binary-package <NO_BINARY_PACKAGE> Don't install pre-built wheels for a specific package [env: UV_NO_BINARY_PACKAGE=] Cache options: -n, --no-cache Avoid reading from or writing to the cache, instead using a temporary directory for the duration of the operation [env: UV_NO_CACHE=] --cache-dir <CACHE_DIR> Path to the cache directory. Defaults to `$XDG_CACHE_HOME/uv` or `$HOME/.cache/uv` on macOS and Linux, and `%LOCALAPPDATA%\uv\cache` on Windows. To view the location of the cache directory, run `uv cache dir`. [env: UV_CACHE_DIR=] --refresh Refresh all cached data --refresh-package <REFRESH_PACKAGE> Refresh cached data for a specific package Python options: -p, --python <PYTHON> The Python interpreter to use for the project environment. By default, the first interpreter that meets the project's `requires-python` constraint is used. If a Python interpreter in a virtual environment is provided, the packages will not be synced to the given environment. The interpreter will be used to create a virtual environment in the project. See `uv help python` for details on Python discovery and supported request formats. [env: UV_PYTHON=] --managed-python Require use of uv-managed Python versions. By default, uv prefers using Python versions it manages. However, it will use system Python versions if a uv-managed Python is not installed. This option disables use of system Python versions. [env: UV_MANAGED_PYTHON=] --no-managed-python Disable use of uv-managed Python versions. Instead, uv will search for a suitable Python version on the system. [env: UV_NO_MANAGED_PYTHON=] --no-python-downloads Disable automatic downloads of Python. [env: "UV_PYTHON_DOWNLOADS=never"] Global options: -q, --quiet... Use quiet output. Repeating this option, e.g., `-qq`, will enable a silent mode in which uv will write no output to stdout. -v, --verbose... Use verbose output. You can configure fine-grained logging using the `RUST_LOG` environment variable. (<https://docs.rs/tracing-subscriber/latest/tracing_subscriber/filter/struct.EnvFilter.html#directives>) --color <COLOR_CHOICE> Control the use of color in output. By default, uv will automatically detect support for colors when writing to a terminal. Possible values: - auto: Enables colored output only when the output is going to a terminal or TTY with support - always: Enables colored output regardless of the detected environment - never: Disables colored output --native-tls Whether to load TLS certificates from the platform's native store [env: UV_NATIVE_TLS=] By default, uv loads certificates from the bundled `webpki-roots` crate. The `webpki-roots` are a reliable set of trust roots from Mozilla, and including them in uv improves portability and performance (especially on macOS). However, in some cases, you may want to use the platform's native certificate store, especially if you're relying on a corporate trust root (e.g., for a mandatory proxy) that's included in your system's certificate store. --offline Disable network access. When disabled, uv will only use locally cached data and locally available files. [env: UV_OFFLINE=] --allow-insecure-host <ALLOW_INSECURE_HOST> Allow insecure connections to a host. Can be provided multiple times. Expects to receive either a hostname (e.g., `localhost`), a host-port pair (e.g., `localhost:8080`), or a URL (e.g., `https://localhost`). WARNING: Hosts included in this list will not be verified against the system's certificate store. Only use `--allow-insecure-host` in a secure network with verified sources, as it bypasses SSL verification and could expose you to MITM attacks. [env: UV_INSECURE_HOST=] --no-progress Hide all progress outputs. For example, spinners or progress bars. [env: UV_NO_PROGRESS=] --directory <DIRECTORY> Change to the given directory prior to running the command. Relative paths are resolved with the given directory as the base. See `--project` to only change the project root directory. [env: UV_WORKING_DIR=] --project <PROJECT> Discover a project in the given directory. All `pyproject.toml`, `uv.toml`, and `.python-version` files will be discovered by walking up the directory tree from the project root, as will the project's virtual environment (`.venv`). Other command-line arguments (such as relative paths) will be resolved relative to the current working directory. See `--directory` to change the working directory entirely. This setting has no effect when used in the `uv pip` interface. [env: UV_PROJECT=] --config-file <CONFIG_FILE> The path to a `uv.toml` file to use for configuration. While uv configuration can be included in a `pyproject.toml` file, it is not allowed in this context. [env: UV_CONFIG_FILE=] --no-config Avoid discovering configuration files (`pyproject.toml`, `uv.toml`). Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories. [env: UV_NO_CONFIG=] -h, --help Display the concise help for this command ``` ## Poetry ``` Description: Update the project's environment according to the lockfile. Usage: sync [options] Options: --without=WITHOUT The dependency groups to ignore. (multiple values allowed) --with=WITH The optional dependency groups to include. (multiple values allowed) --only=ONLY The only dependency groups to include. (multiple values allowed) --no-root Do not install the root package (the current project). --no-directory Do not install any directory path dependencies; useful to install dependencies without source code, e.g. for caching of Docker layers) --dry-run Output the operations but do not execute anything (implicitly enables --verbose). -E, --extras=EXTRAS Extra sets of dependencies to install. (multiple values allowed) --all-extras Install all extra dependencies. --all-groups Install dependencies from all groups. --only-root Exclude all dependencies. --compile Compile Python source files to bytecode. -h, --help Display help for the given command. When no command is given display help for the list command. -q, --quiet Do not output any message. -V, --version Display this application version. --ansi Force ANSI output. --no-ansi Disable ANSI output. -n, --no-interaction Do not ask any interactive question. --no-plugins Disables plugins. --no-cache Disables Poetry source caches. -P, --project=PROJECT Specify another path as the project root. All command-line arguments will be resolved relative to the current working directory. -C, --directory=DIRECTORY The working directory for the Poetry command (defaults to the current working directory). All command-line arguments will be resolved relative to the given directory. -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug. Help: The sync command makes sure that the project's environment is in sync with the poetry.lock file. It is equivalent to running poetry install --sync. poetry sync By default, the above command will also install the current project. To install only the dependencies and not including the current project, run the command with the --no-root option like below: poetry sync --no-root If you want to use Poetry only for dependency management but not for packaging, you can set the "package-mode" to false in your pyproject.toml file. ``` # Purpose Get everything ready to run code. # Notes - Create a virtual environment as necessary - Automatically install dependencies - Specify extras, dependency groups, and/or lock file (see [[#`py run`]]) - Does **not** install pip and setuptools - Keep a cached copy of the latest `pip.pyz` around instead - `--editable` to do an editable install - `--watch` to watch the file used for installing dependencies to automatically recreate the environment - Some option to opt into installing sdists and source trees (i.e. [`pip install --prefer-binary`](https://pip.pypa.io/en/stable/cli/pip_install/#cmdoption-only-binary) by default) - Specify indexes - Have a specific flag to opt out of PyPI - Require a lock file? - All the other workflow tools require a lock file for their `sync` command - This might mean a separate `ready` command is warranted if there's only a `pyproject.toml` file