Ruff
Python linter and code formatter written in Rust, with 900+ rules, auto-fix, caching, and drop-in parity with Flake8, isort, and Black.
Ruff is a Python linter and code formatter written in Rust. It is run through two subcommands: ruff check to lint files or directories, and ruff format to format them. Both accept paths, globs, or an @arguments.txt file of newline-delimited arguments. It is intended to replace Flake8 (and many of its plugins), Black, isort, pydocstyle, pyupgrade, autoflake, and similar tools with a single executable.
The linter ships with over 900 built-in rules, including native re-implementations of popular Flake8 plugins such as flake8-bugbear. It supports automatic fixes (for example, removing unused imports) via --fix, and has built-in caching so unchanged files are not re-analyzed. The README documents parity with Flake8, isort, and Black, and claims 10-100x speedups over those tools. The README also shows it linting the CPython codebase in a benchmark chart. An opt-in preview mode (--preview or preview = true) enables unstable rules and formatter style changes.
Configuration is read from pyproject.toml, ruff.toml, or .ruff.toml, with hierarchical and cascading config discovery for monorepos. Common options such as --select can be passed on the command line, and other settings can be overridden with --config. Default settings mirror Black (line length 88, double quotes, space indentation).
Ruff integrates with a pre-commit hook (ruff-pre-commit), a GitHub Action (ruff-action), and first-party editor support including a VS Code extension, with setup guides for other editors. It targets Python developers and teams who want linting and formatting in local development, editors, and CI. The README lists Apache Airflow, FastAPI, Pandas, and SciPy among its users.
Installation
# via uv
uv tool install ruff@latest
# via pip
pip install ruff
# via Standalone installer (macOS/Linux)
curl -LsSf https://astral.sh/ruff/install.sh | sh
Alternatives & related tools
just
Command runner that saves and runs project-specific commands from a justfile with make-inspired syntax
zellij
Terminal multiplexer with floating panes, multiplayer collaboration, WebAssembly plugins, and built-in web client
mise
CLI tool for managing development environments with version-controlled tools, environment variables, and tasks
hyperfine
Command-line benchmarking tool that runs statistical analysis across multiple timing runs of shell commands
fnm
Fast Node.js version manager built in Rust with support for .node-version and .nvmrc files
add a badge to your README
Maintain Ruff? Show that it's featured on trmn. The badge links back to this page.
[](https://www.trmn.sh/tools/ruff?utm_source=badge)<a href="https://www.trmn.sh/tools/ruff?utm_source=badge"><img src="https://www.trmn.sh/badge/ruff.svg" alt="Featured on trmn" height="20"></a>