Skip to content

Commands

This is a list of all the commands that rye provides:

  • add: Adds a Python package to this project
  • build: Builds a package for distribution
  • config: Reads or updates the Rye configuration
  • fetch: Fetches a Python interpreter for the local machine (alias)
  • fmt: Run the code formatter on the project
  • init: Initializes a new project
  • install: Installs a global tool (alias)
  • lock: Updates the lockfiles without installing dependencies
  • lint: Run the linter on the project
  • make-req: Builds and prints a PEP 508 requirement string from parts
  • pin: Pins a Python version to the project
  • publish: Publish packages to a package repository
  • remove: Remove a dependency from this project
  • run: Runs a command installed into this package
  • show: Prints the current state of the project
  • sync: Updates the virtualenv based on the pyproject.toml
  • test: Runs the project's tests
  • toolchain: Helper utility to manage Python toolchains
  • tools: Helper utility to manage global tools.
  • self: Rye self management
  • uninstall: Uninstalls a global tool (alias)
  • version: Get or set project version

Options

The toplevel rye command accepts the following options:

  • --env-file <FILE>: This can be supplied multiple times to make rye load a given .env file. Note that this file is not referenced to handle the RYE_HOME variable which must be supplied as environment variable always.