Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,8 @@ The `self` namespace groups subcommands to manage the Poetry installation itself

{{% note %}}
Use of these commands will create the required `pyproject.toml` and `poetry.lock` files in your
[configuration directory]({{< relref "configuration" >}}).
[configuration directory]({{< relref "configuration#config-directory" >}}). The `pyproject.toml`
file is the system project used by `poetry self` commands.
{{% /note %}}

{{% warning %}}
Expand Down Expand Up @@ -973,6 +974,10 @@ poetry self install
The `self lock` command reads this Poetry installation's system `pyproject.toml` file. The system
dependencies are locked in the corresponding `poetry.lock` file.

The system `pyproject.toml` file is stored as `pyproject.toml` in Poetry's
[configuration directory]({{< relref "configuration#config-directory" >}}). Poetry creates it
when a `self` command needs it, for example `self lock`, `self add`, or `self update`.

```bash
poetry self lock
```
Expand Down Expand Up @@ -1049,6 +1054,13 @@ The `self update` command works exactly like the [`update` command](#update). Ho
is different in that the packages managed are for Poetry's runtime environment.
{{% /note %}}

`self update` uses the package sources configured for Poetry's system project. To update Poetry
from a custom package source, add a `[[tool.poetry.source]]` entry to the system `pyproject.toml`
in Poetry's [configuration directory]({{< relref "configuration#config-directory" >}}) using the
same format as [Package Sources]({{< relref "repositories/#package-sources" >}}). Sources configured
in the current project's `pyproject.toml` do not affect `self update`. Poetry preserves existing
`tool.poetry.source` entries when it regenerates this file.

```bash
poetry self update
```
Expand Down