commands.sh

poetry

all

Manage Python packages and dependencies. Some subcommands such as `about`, `check`, `env`, etc. have their own usage documentation. See also: `asdf`, `pipenv`, `hatch`.

More info →

Subcommands (27)

poetry about

Get information about Poetry, an application to manage Python packages and dependencies. See also: `asdf`.

poetry add

Add required packages to the `pyproject.toml` file in Poetry. See also: `asdf`.

poetry build

Build a Poetry package as a tarball and a wheel.

poetry cache

Manage Poetry's cache. See also: `asdf`.

poetry check

Manage Poetry file validation and consistency. See also: `asdf`.

poetry config

Edit poetry config settings and repositories.

poetry-debug

Debug issues with your Poetry project. See also: `asdf`.

poetry-env

Manage virtual environments associated with a Poetry project. See also: `asdf`.

poetry export

Export Poetry's lock file to other formats. Provided by the Export Poetry Plugin.

poetry help

Display global help, or help for a specific `poetry` command.

poetry init

Create a basic `pyproject.toml` file interactively.

poetry install

Install all dependencies for a Python project as defined in the pyproject.toml file.

poetry list

List available Poetry commands. See also: `asdf`.

poetry lock

Lock dependencies in `pyproject.toml` (without installing them). See also: `asdf`.

poetry new

Create a new Poetry project in a specific directory.

poetry publish

Publish a package to a remote repository.

poetry-python

Manage Python versions through Poetry. See also: `asdf`.

poetry remove

Remove a package from the project dependencies.

poetry run

Run a command in the project's virtual environment.

poetry search

Search for packages on a remote index. Note: PyPI no longer supports searching via the command-line, so this command may fail on the default repository.

poetry-self

Manage the Poetry installation/runtime environment itself. These commands reference `pyproject.toml` and `poetry.lock` files in your Poetry configuration directory. See also: `asdf`.

poetry shell

Spawn a shell within the virtual environment. Note: The `shell` command was moved to a plugin: `poetry-plugin-shell`.

poetry show

Show details of packages in your Poetry project. See also: `asdf`.

poetry source

Add source configurations to your Poetry project. See also: `asdf`.

poetry sync

Syncs your project's environment with the `poetry.lock` file.

poetry update

Update the dependencies as according to the `pyproject.toml` file.

poetry version

Manage Poetry project version. Assumes the following project stages: `patch`, `minor`, `major`, `prepatch`, `preminor`, `premajor`, `prerelease`. See also: `asdf`.

Examples (8)

Create a new Poetry project in the directory with a specific name

poetry new project_name

Install and add a dependency and its sub-dependencies to the `pyproject.toml` file in the current directory

poetry add dependency

Install the project dependencies using the `pyproject.toml` file in the current directory

Interactively (append `-n` for non-interactively) initialize the current directory as a new Poetry project

Get the latest version of all dependencies and update `poetry.lock`

Execute a command inside the project's virtual environment

Bump the version of the project in `pyproject.toml`

poetry version patch|minor|major|prepatch|preminor|premajor|prerelease

Spawn a shell within the project's virtual environment (for versions below 2.0, use `poetry shell`)

eval "$(poetry env activate)"
made by @shridhargupta | data from tldr-pages