Skip to content
This repository was archived by the owner on Feb 5, 2026. It is now read-only.
This repository was archived by the owner on Feb 5, 2026. It is now read-only.

Maybe rye can provide a parameter compatible with the native requirements.txt #1449

@Fromsko

Description

@Fromsko

Idea

I found that when I was doing secondary development of some projects, I encountered the problem that the dependencies in requirements.txt in the original project could not be installed quickly.

Although batch installation can be done by writing a simple script, it would be more perfect if a parameter could be provided to support it.

args

It seems that no directives compatible with requirements.txt were found.

> rye add --help
Adds a Python package to this project

Usage: rye add [OPTIONS] <REQUIREMENTS>...

Arguments:
  <REQUIREMENTS>...
          The package to add as PEP 508 requirement string. e.g. 'flask==2.2.3'

Options:
      --git <GIT>
          Install the given package from this git repository

      --url <URL>
          Install the given package from this URL

      --path <PATH>
          Install the given package from this local path

      --absolute
          Force non interpolated absolute paths

      --tag <TAG>
          Install a specific tag

      --rev <REV>
          Update to a specific git rev

      --branch <BRANCH>
          Update to a specific git branch

      --features <FEATURES>
          Adds a dependency with a specific feature

  -d, --dev
          Add this as dev dependency

      --excluded
          Add this as an excluded dependency that will not be installed even if it's a sub dependency

      --optional <OPTIONAL>
          Add this to an optional dependency group

      --pin <PIN>
          Overrides the pin operator

          [possible values: equal, tilde-equal, greater-than-equal]

      --sync
          Runs `sync` even if auto-sync is disabled

      --no-sync
          Does not run `sync` even if auto-sync is enabled

  -v, --verbose
          Enables verbose diagnostics

  -q, --quiet
          Turns off all output

      --pre
          Include pre-releases when finding a package version and automatically syncing the workspace

      --with-sources
          Set to `true` to lock with sources in the lockfile when automatically syncing the workspace

      --generate-hashes
          Set to `true` to lock with hashes in the lockfile when automatically syncing the workspace

      --keyring-provider <KEYRING_PROVIDER>
          Attempt to use `keyring` for authentication for index URLs

          [default: disabled]

          Possible values:
          - disabled:   Do not use keyring for credential lookup
          - subprocess: Use the `keyring` command for credential lookup

  -h, --help
          Print help (see a summary with '-h')

Maybe rye can provide a parameter compatible with the native requirements.txt

eg.

> rye add -r requirements.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions