Skip to content
SPECIFICTION
Get listed

Ruff

docs.astral.sh

Free plan WebWindowsmacOSLinuxSelf-hosted
Visit docs.astral.sh
Spec score 7.8 #7 of 22 in Code formatters

What it is

Ruff is a Python linter and code formatter written in Rust, available free under a permissive open-source license. It includes more than 900 built-in lint rules, including native versions of popular Flake8 plugin rules, and can automatically correct violations such as unused imports. Its formatter aims to serve as a replacement for Black, though the documentation allows for differences in some cases. The built-in Ruff Language Server supplies diagnostics, fixes, and formatting; the documentation recommends pairing it with another Python language server for navigation and autocompletion. Setup guidance covers VS Code, Sublime Text, PyCharm, and Zed, while CI support includes GitHub Actions, GitLab CI/CD, and pre-commit hooks. Ruff can be installed through uv, pip, pipx, standalone installers, Homebrew, Conda, and other package managers. It supports configuration in pyproject.toml, ruff.toml, or .ruff.toml. A Bandit-derived rule group checks for common Python security issues. Ruff runs on Linux, macOS, and Windows, and is also published as a Docker image. The maker describes it as 10–100x faster than tools such as Flake8 and Black.

Spec sheet

Purpose
Ruff is a Python linter and code formatter written in Rust.Read 29 Sep 2026 · docs.astral.sh
Security
Ruff’s rules include a Bandit-derived group for detecting common security issues, including possible vulnerabilities in Python code.Read 29 Sep 2026 · docs.astral.sh
Support
The editor setup documentation says setup instructions are provided on a best-effort basis and directs users to open an issue for assistance.Read 29 Sep 2026 · docs.astral.sh
Maker
Astral says it builds high-performance developer tools for the Python ecosystem and that its tools are open source and permissively licensed.Read 29 Sep 2026 · astral.sh
Automatic fixes
Ruff can automatically fix lint violations, including removing unused imports.Read 29 Sep 2026 · docs.astral.sh
CI integrations
Ruff documents integrations for GitHub Actions and GitLab CI/CD, and hooks for pre-commit.Read 29 Sep 2026 · docs.astral.sh
Configuration
Ruff supports configuration through pyproject.toml, ruff.toml, or .ruff.toml.Read 29 Sep 2026 · docs.astral.sh
Docker
The maker publishes Ruff as a Docker image tagged by release and with a latest tag.Read 29 Sep 2026 · docs.astral.sh
Editor integrations
The setup guide documents integrations including VS Code, Sublime Text, PyCharm, and Zed.Read 29 Sep 2026 · docs.astral.sh
Editor support
The built-in Ruff Language Server provides diagnostics, code actions to fix them, and formatting; the docs recommend pairing it with another Python language server for navigation and autocompletion.Read 29 Sep 2026 · docs.astral.sh
Formatter
Ruff’s formatter is designed as a drop-in replacement for Black, though the FAQ notes there may be differences at the margins.Read 29 Sep 2026 · docs.astral.sh
Installation
Ruff can be installed using uv, pip, pipx, standalone installers, and package managers including Homebrew and Conda.Read 29 Sep 2026 · docs.astral.sh
Linting rules
Ruff includes over 900 built-in rules, including native implementations of popular Flake8 plugins.Read 29 Sep 2026 · docs.astral.sh
Notable limit
Ruff does not support custom or third-party lint rules.Read 29 Sep 2026 · docs.astral.sh
Speed
The maker describes Ruff as 10–100x faster than existing linters and formatters such as Flake8 and Black.Read 29 Sep 2026 · docs.astral.sh

Plans and prices

Ruff Free Open-source Python linter and formatter · permissively licensed Read 29 Sep 2026 · astral.sh

Every Ruff plan and price →

Strong points and limits

Strong points

  • More than 900 built-in lint rules.
  • Automatically fixes violations such as unused imports.
  • Includes a Bandit-derived security rule group.
  • Documented editor and CI integrations.

Limits

  • Custom and third-party lint rules are unsupported.
  • Formatter differences from Black may occur at the margins.
  • Editor setup assistance is best-effort.

Who it suits

Ruff suits Python developers who want linting, formatting, and automatic fixes in one tool. Its documented editor integrations and CI options also suit teams incorporating checks into their development workflow.

Verdict

Ruff combines a broad built-in rule set, formatting, automatic fixes, and integrations across editors and CI. Its fixed rule set is a key constraint for teams that need custom or third-party lint rules.

Where Specifiction places it

Alternatives to RuffAll alternatives →