Ruff
docs.astral.sh
- Free plan
- Windows
- macOS
- Linux
- Web
- Self-hosted
What Ruff is
Ruff is a free Python linter and code formatter written in Rust. It brings lint checks and formatting together, with more than 900 built-in rules, including native implementations of popular Flake8 plugins. Ruff can automatically fix violations such as unused imports. Its formatter is designed as a replacement for Black, though the documentation notes possible differences at the margins.
The built-in Ruff Language Server provides diagnostics, code actions, and formatting; the documentation recommends pairing it with another Python language server for navigation and autocompletion. Setup guides cover VS Code, Sublime Text, PyCharm, and Zed, while CI documentation covers 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, and includes a Bandit-derived group of rules for common security issues. The maker describes Ruff as 10–100x faster than existing linters and formatters such as Flake8 and Black. It does not support custom or third-party lint rules.
Who it suits
Ruff suits Python developers who want linting and formatting in one tool, with editor and CI integrations. It is also relevant to teams that need built-in security checks but can work without custom lint rules.
Good to know, and what to watch
- More than 900 built-in lint rules
- Automatically fixes some violations
- Provides editor diagnostics and formatting
- Integrates with CI and pre-commit hooks
- Includes Bandit-derived security rules
- No custom or third-party lint rules
- Formatter may differ from Black at the margins
Plans
Every plan and priceRuff
Free plan
Getting started
- Open the Ruff documentation website
- Install Ruff with uv, pip, pipx, a standalone installer, Homebrew, or Conda
- Add Ruff to VS Code, Sublime Text, PyCharm, or Zed
- Configure it in pyproject.toml, ruff.toml, or .ruff.toml
- Connect it to GitHub Actions, GitLab CI/CD, or pre-commit
- Use the published Docker image when a container deployment is preferred
Limits to check
The free Ruff plan does not support custom or third-party lint rules. Its formatter is intended to replace Black, but the documentation notes possible differences at the margins.
The verdict
Ruff combines Python linting and formatting with broad built-in rules, automatic fixes, and editor and CI integrations. Its main stated limitation is the lack of support for custom or third-party lint rules.
Questions people ask
Is Ruff free?
Yes. Ruff has a free plan priced at no cost and no free trial.
Which platforms support Ruff?
Ruff is available for Linux, macOS, Windows, self-hosted setups, and the web. The maker also publishes a Docker image.
Is Ruff open source?
Astral describes its tools as open source and permissively licensed.
Can Ruff fix lint errors automatically?
Yes. It can automatically fix violations, including unused imports.
Does Ruff support custom rules?
No. Ruff does not support custom or third-party lint rules.
Which editors and CI tools integrate with Ruff?
Setup documentation covers VS Code, Sublime Text, PyCharm, and Zed, plus GitHub Actions, GitLab CI/CD, and pre-commit hooks.
What the maker publishes
- Automatic fixes
- Ruff can automatically fix lint violations, including removing unused imports. source
- CI integrations
- Ruff documents integrations for GitHub Actions and GitLab CI/CD, and hooks for pre-commit. source
- Configuration
- Ruff supports configuration through pyproject.toml, ruff.toml, or .ruff.toml. source
- Docker
- The maker publishes Ruff as a Docker image tagged by release and with a latest tag. source
- Editor integrations
- The setup guide documents integrations including VS Code, Sublime Text, PyCharm, and Zed. source
- 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. source
- Formatter
- Ruff’s formatter is designed as a drop-in replacement for Black, though the FAQ notes there may be differences at the margins. source
- Installation
- Ruff can be installed using uv, pip, pipx, standalone installers, and package managers including Homebrew and Conda. source
- Linting rules
- Ruff includes over 900 built-in rules, including native implementations of popular Flake8 plugins. source
- Maker
- Astral says it builds high-performance developer tools for the Python ecosystem and that its tools are open source and permissively licensed. source
- Notable limit
- Ruff does not support custom or third-party lint rules. source
- Purpose
- Ruff is a Python linter and code formatter written in Rust. source
- Security
- Ruff’s rules include a Bandit-derived group for detecting common security issues, including possible vulnerabilities in Python code. source
- Speed
- The maker describes Ruff as 10–100x faster than existing linters and formatters such as Flake8 and Black. source
- Support
- The editor setup documentation says setup instructions are provided on a best-effort basis and directs users to open an issue for assistance. source
Checked against the maker's pages on 29 Sept 2026.