Skip to content

Rye Tools Reference Guide

A comprehensive guide to managing Python tools with Rye

Rye GitHub Repository ยท Official Documentation


Development Tools Installation

Quick Install Commands

Install development tools into your global Rye toolchain with ease.

Code Formatting & Linting

Bash
# Install Black formatter with colorama support
rye tools install black --features colorama -p cpython@3.11.11 -f

# Install Ruff - the ultra-fast Python linter
rye tools install ruff -p cpython@3.11.11 -f

# Install Ruff Language Server for IDE integration
rye tools install ruff-lsp -p cpython@3.11.11 -f

# Install Radon for code complexity analysis
rye tools install radon -p cpython@3.11.11 -f
Tool Repository Documentation
Black psf/black black.readthedocs.io
Ruff astral-sh/ruff docs.astral.sh/ruff
Ruff-LSP astral-sh/ruff-lsp docs.astral.sh/ruff
Radon rubik/radon radon.readthedocs.io

Package Management

Bash
# Install uv - faster package installer
rye tools install uv -p cpython@3.11.11 -f

# Install pip - standard package installer
rye tools install pip -p cpython@3.11.11 -f
Tool Repository Documentation
uv astral-sh/uv docs.astral.sh/uv
pip pypa/pip pip.pypa.io

UV Management Commands

Bash
# Sync development dependencies (--extra dev)
uv sync --extra dev

# Sync documentation dependencies (--extra docs)
uv sync --extra docs

# Sync testing dependencies (--extra test)
uv sync --extra test

# Run mkdocs build with detailed output
uv run mkdocs build -v

Using UV vs Rye

UV is significantly faster than pip for dependency resolution and installation. Use UV for faster builds in CI/CD pipelines and development environments.

Learn More About Rye & UV

Learn about Rye and UV integration in Armin Ronacher's blog post Rye Grows with UV.

Rust Integration

Bash
# Install Maturin for Python/Rust bindings
rye tools install maturin -p cpython@3.11.11 -f
Tool Repository Documentation
Maturin PyO3/maturin maturin.rs

Toolchain Management

System Information

Useful commands to inspect your Rye installation.

Bash
# List installed Python versions
uv python list

# List available Rye toolchains
rye toolchain list

# List all installed tools with detailed information
rye tools list -sv

Command Format Reference

Parameter Description Example
--features Specify optional features to install --features colorama
-p Specify Python version -p cpython@3.11.11
-f Force installation (overwrite existing) -f
-v Verbose output -v
--optional=dev Add dependency to optional dev group --optional=dev uvenv
-sv Show detailed (verbose) listing -sv

Further Reading

For more detailed information on Rye commands and options, visit the Rye documentation.