poetry-sync: add page (#18705)

Co-authored-by: Alison Kim <seoyunalison@gmail.com>
Co-authored-by: Dylan <145150333+dmmqz@users.noreply.github.com>
This commit is contained in:
alison
2025-10-16 00:10:19 -07:00
committed by GitHub
parent 3caa87576b
commit 43cc318c7d
+36
View File
@@ -0,0 +1,36 @@
# 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`