ruff

(★ 49,276)

An extremely fast Python linter and code formatter, written in Rust.

File Explorer

Showing a partial file list — download the zip above to see everything.

  • .editorconfig
  • .git-blame-ignore-revs
  • .gitattributes
  • .gitignore
  • .ignore
  • .known-crates
  • .markdownlint.yaml
  • .pre-commit-config.yaml
  • .prettierignore
  • _typos.toml
  • AGENTS.md
  • BREAKING_CHANGES.md
  • Cargo.lock
  • Cargo.toml
  • CHANGELOG.md
  • CLAUDE.md
  • clippy.toml
  • CONTRIBUTING.md
  • Dockerfile
  • LICENSE
  • README.md

# Installation Guide

rust
Prerequisites

Setup Steps

cargo build --release

Build the project in release mode.

Key Commands

cargo build

Build the project in debug mode.

cargo test

Run tests for the project.

Ruff is an extremely fast Python linter and code formatter written in Rust.

# Use via CDN

jsDelivr

jsDelivr serves any public GitHub repository as a CDN with zero setup. Pick a version and a file to get a ready-to-paste link and snippet.

Showing a partial file list.

Release Timeline

Actively Maintained

Command Glossary

Commands referenced in this DOCs, explained below.

🔍

pip install

View Details ▼

Install Python packages.

pip install {{package1 package2 ...}}

Install one or more packages:

pip install {{package1 package2 ...}} {{[-U|--upgrade]}}

Upgrade all specified packages to the latest version, installing any that are not already present:

pip install {{package}}=={{version}}

Install a specific version of a package:

🔍

pip

View Details ▼

Python package manager.
Some subcommands such as `install` have their own usage documentation.

pip install {{package}}

Install a package (see `pip install` for more install examples):

pip install --user {{package}}

Install a package to the user's directory instead of the system-wide default location:

pip install {{[-U|--upgrade]}} {{package}}

Upgrade a package:

🔍

pipx

View Details ▼

Install and run Python applications in isolated environments.

pipx run {{pycowsay}} {{moo}}

Run an app in a temporary virtual environment:

pipx install {{package}}

Install a package in a virtual environment and add entry points to path:

pipx uninstall {{package}}

Uninstall a package:

🔍

powershell

View Details ▼

This command may be mistaken as the cross-platform version of PowerShell (formerly known as PowerShell Core), which uses `pwsh` instead of `powershell`.
The original `powershell` command in Windows is still available to use the legacy Windows version of PowerShell (version 5.1 and below).

tldr pwsh

View the documentation for the command referring to the latest, cross-platform version of PowerShell (version 6 and above):

powershell

Start an interactive shell session:

tldr powershell {{[-p|--platform]}} windows

View the documentation for the command referring to the legacy Windows PowerShell (version 5.1 and below):

🔍

ruff check

View Details ▼

An extremely fast Python linter. `check` is the default command - it can be omitted everywhere.
If no files or directories are specified, the current working directory is used by default.

ruff check {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}

Run the linter on the given files or directories:

ruff check --fix

Apply the suggested fixes, modifying the files in-place:

ruff check --watch

Run the linter and re-lint on change:

🔍

ruff format

View Details ▼

An extremely fast Python code formatter.
If no files or directories are specified, the current working directory is used by default.

ruff format {{path/to/file_or_directory1 path/to/file_or_directory2 ...}}

Format given files or directories in-place:

ruff format --check

Print which files would have been modified and return a non-zero exit code if there are files to reformat, and zero otherwise:

ruff format --diff

Print what changes would be made without modifying the files:

🔍

ruff

View Details ▼

An extremely fast Python linter and code formatter, written in Rust.
See also: `black`.

tldr ruff check

View documentation for the Ruff linter:

tldr ruff format

View documentation for the Ruff code formatter:

🔍

uv add

View Details ▼

Add package dependencies to the `pyproject.toml` file.
Packages are specified according to <https://peps.python.org/pep-0508/>.

uv add {{package}}

Add the latest version of a package:

uv add {{package1 package2 ...}}

Add multiple packages:

uv add {{package>=1.2.3}}

Add a package with a version requirement:

🔍

uv tool

View Details ▼

Install and run commands provided by Python packages.

uv tool run {{command}}

Run a command from a package, without installing it:

uv tool install {{package}}

Install a Python package system-wide:

uv tool upgrade {{package}}

Upgrade an installed Python package:

🔍

uvx

View Details ▼

This command is an alias of `uv tool run`.

tldr uv tool

View documentation for the original command:

🔍

venv

View Details ▼

Create lightweight virtual environments in Python.

python -m venv {{path/to/virtual_environment}}

Create a Python virtual environment:

{{[.|source]}} {{path/to/virtual_environment}}/bin/activate

Activate the virtual environment (Linux and macOS):

{{path\to\virtual_environment}}\Scripts\activate.bat

Activate the virtual environment (Windows):

# Project Badges

// repository documentation