$linuxjunkies
>

rye(1)

Rye is an experimental, all-in-one Python project manager that handles virtual environments, dependencies, and packaging.

UbuntuDebianFedoraArch

Synopsis

rye [COMMAND] [OPTIONS] [ARGS]

Description

Rye is a modern Python project manager written in Rust that aims to simplify Python development workflows. It manages virtual environments, dependencies, Python versions, and project structure in a single tool, inspired by tools like Rust's Cargo.

Rye uses a pyproject.toml file for project configuration and a requirements.lock file for reproducible builds. It automatically handles Python version installation, environment isolation, and dependency resolution.

Common options

FlagWhat it does
--help, -hShow help message and exit
--versionDisplay Rye version
--verbose, -vEnable verbose output for debugging
--quiet, -qSuppress informational output

Examples

Create a new Python project with pyproject.toml and basic structure

rye init my-project

Add the requests library as a project dependency

rye add requests

Synchronize the virtual environment with declared dependencies

rye sync

Execute a Python script in the project's virtual environment

rye run python script.py

Pin the project to use Python 3.11

rye pin 3.11

Remove a dependency from the project

rye remove pytest

Activate the project's virtual environment in the current shell

rye shell

Build distribution packages (wheel and sdist) for the project

rye build

Related commands