Files
cheatsheet-tldr/tldr/poetry-sync
2025-10-17 00:19:47 +00:00

42 lines
885 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# poetry sync
> Syncs your project's environment with the `poetry.lock` file.
> More information: <https://python-poetry.org/docs/cli/#sync>.
- Sync your projects environment with the `poetry.lock` file:
`poetry sync`
- Exclude one or more dependency groups for the installation:
`poetry sync --without {{test|docs|...}}`
- Select optional dependency groups:
`poetry sync --with {{test|docs|...}}`
- Install all dependency groups including optional groups:
`poetry sync --all-groups`
- Install specific dependency groups:
`poetry sync --only {{test|docs|...}}`
- Install project without dependencies:
`poetry sync --only-root`
- Specify extras to install:
`poetry sync {{[-E|--extras]}}`
- Skip the defaulted package installation for your project:
`poetry sync --no-root`