Skip to content

CLI Commands

Benny Lutati edited this page Sep 29, 2021 · 10 revisions

Relax-Poetry (RP) modifies some of Poetry's commands. In order to avoid confusion, this page will include the modifications done for all the commands with references to the original Poetry documentation.

To get help from the command-line, simply call rp to see the complete list of commands, then --help combined with any of those can give you more information.

Global options

Same as original, with the following changes:

Flags Added

  • --profile <p1,p2,...,pn> - Activates a set of manual build profiles (p1,p2,...,pn) for the given command.

new

This command were completely rewritten in relaxed-poetry

Behavior changes

Creates new projects and other components, see: Extended documentation

init

Same as original

install

This command were completely rewritten in relaxed-poetry

Usage:
  install [options] [--] [<packages>...]

Arguments:
  packages                 The packages to add.

Options:
      --with=WITH          The optional dependency groups to include for installation. (multiple values allowed)
      --sync               Synchronize the environment with the locked packages and the specified groups.
      --dry-run            Output the operations but do not execute anything (implicitly enables --verbose).
      --extras=EXTRAS      Extra sets of dependencies to install. (multiple values allowed)
      --update             update the given packages to the last compatible version
      --save-to=SAVE-TO    the group to store the packages in [default: "default"]
      --lock-only          Do not perform operations (only update the lockfile).
      --editable           Add vcs/path dependencies as editable.
      --optional           add packages as an optional dependencies.
      --python=PYTHON      Python version for which the dependency must be installed.
      --platform=PLATFORM  Platforms for which the dependency must be installed.
      --source=SOURCE      Name of the source to use to install the package.
      --allow-prereleases  Accept prereleases.

Help:
  
      install project dependencies
      If you do not specify a version constraint, rp will choose a suitable one based on the available package versions.
  
      You can specify a package in the following forms:
        - A single name (requests)
        - A name and a constraint (requests@^2.23.0)
        - A git url (git+https://github.com/python-poetry/poetry.git)
        - A git url with a revision (git+https://github.com/python-poetry/poetry.git#develop)
        - A git SSH url (git+ssh://github.com/python-poetry/poetry.git)
        - A git SSH url with a revision (git+ssh://github.com/python-poetry/poetry.git#develop)
        - A file path (../my-package/my-package.whl)
        - A directory (../my-package/)
        - A url (https://example.com/packages/my-package-0.1.0.tar.gz)
      
  • On multi-package projects, propagate the operation for all sub projects

remove

Same as original

show

Same as original

build

Same as original, with the following changes:

Behavior changes

  • On multi-package projects, propagate the operation for all sub projects
  • rp build command automatically attempts to bound your python version constraint using your dependencies and store the bounded value in the built distributions. See this explanation for the reasons behind this behavior.

Flags Added

  • --keep-python-bounds, -k: don't automatically bound your python version constraint, keep it as it is in the pyproject.toml file.

publish

Same as original, with the following changes:

Behavior changes

  • On multi-package projects, propagate the operation for all sub projects

config

Same as original

run

Same as original

shell

Same as original

check

Same as original

lock

Same as original, with the following changes:

Behavior changes

  • On multi-package projects, propagate the operation for all sub projects
  • The lock file is located in the project directory under etc/rp/lock.toml

version

Same as original

export

Same as original

cache

Same as original