rye(1)
Rye is an experimental, all-in-one Python project manager that handles virtual environments, dependencies, and packaging.
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
| Flag | What it does |
|---|---|
--help, -h | Show help message and exit |
--version | Display Rye version |
--verbose, -v | Enable verbose output for debugging |
--quiet, -q | Suppress informational output |
Examples
Create a new Python project with pyproject.toml and basic structure
rye init my-projectAdd the requests library as a project dependency
rye add requestsSynchronize the virtual environment with declared dependencies
rye syncExecute a Python script in the project's virtual environment
rye run python script.pyPin the project to use Python 3.11
rye pin 3.11Remove a dependency from the project
rye remove pytestActivate the project's virtual environment in the current shell
rye shellBuild distribution packages (wheel and sdist) for the project
rye build