
Ruff
A very fast Python linter and code formatter, written in Rust.
- Stars
- 50.4k
- Forks
- 2.6k
- Licence
- MIT
- Language
- Rust
- Last update
- 4 days ago
- Type
- CLI
What it is
Ruff checks Python code for style problems and likely bugs, and can automatically format code and fix some errors. It is a single command-line tool that aims to replace several older Python tools such as Flake8, Black, and isort. The README says it is much faster than those tools, and it is installed through pip, uv, or pipx.
- Check all Python files in a project with `ruff check`
- Format a project's code consistently with `ruff format`
- Automatically remove unused imports using the fix support
- Run Ruff as a pre-commit hook to catch problems before each commit
- Use Ruff inside VS Code or other supported editors
Great for
- Python developers who want one tool for linting and formatting
- Teams with large Python codebases where slow checks are a problem
- People running checks in a pre-commit hook or editor on save
- Projects that already use pyproject.toml for configuration
Not ideal for
- Non-Python projects, since it only handles Python code
- People who need to keep using specific Flake8 plugins not covered by its rules (the README says it re-implements many popular ones, not all)
- Users who want a tool with no configuration decisions to learn; it has over 900 rules to choose from
How to get it
- 1
Install with a package manager
You'll need: Python (version needed is not stated in the README excerpt)
Install with uv (recommended)
uv tool install ruff@latestInstall with pip
pip install ruffInstall with pipx
pipx install ruff - 2
Run it
- Install Ruff with one of the commands above
- Change into your Python project folder
- Run `ruff check` to lint all files in the folder
- Run `ruff format` to format the files
- 3
Get the most out of it
- Use `ruff check --fix` to apply automatic fixes where available
- Add the pre-commit hook from the ruff-pre-commit repository to run checks on every commit
- Install the VS Code extension or another editor integration listed in the docs
- Configure rules and settings in pyproject.toml, which the README says is supported
- Use the GitHub Action mentioned at the end of the README for CI checks
Downloads
Strengths
- The README reports speeds of 10-100x over Flake8 and Black, with testimonials citing larger gains
- Combines linting, formatting, and import sorting behind one interface
- Supports hierarchical configuration for monorepos
Trade-offs
- Speed figures and testimonials come from the project and its users, not independent benchmarks
- Rule coverage is broad but may not match every plugin or edge case of the tools it replaces
- Version is under 1.0 (0.17.3), so behavior may change between releases
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| ruff (this) | 50.4k | CLI | beginner | 4 days ago | Python developers who want one tool for linting and formatting |
| black | 42.1k | Dev tool | beginner | 4 days ago | Python developers who want formatting handled automatically |
| standard | 29.4k | Dev tool | beginner | 1.3 years ago | JavaScript projects where the team wants consistent style without debating rules |
| static-analysis | 14.9k | Curated list | beginner | 4 days ago | Developers looking for a linter or analyzer for a specific language |
| eslint | 27.6k | Dev tool | intermediate | 4 days ago | JavaScript developers who want automatic checks on their code |
| ast-grep | 16.4k | CLI | beginner | 4 days ago | Developers who want grep-like searching that understands code structure |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.