# Ruff

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

Repository: https://github.com/astral-sh/ruff
Canonical: https://ross.abutalabs.com/products/ruff
Homepage: https://docs.astral.sh/ruff
Language: Rust
License: MIT
License Family: permissive
Topics: linter, pep8, python, python3, rust, rustpython, static-analysis, static-code-analysis, style-guide, styleguide, ruff
Last push: 2026-08-26T23:55:02+00:00
Link (homepage): https://docs.astral.sh/ruff
Link (site_page): https://docs.astral.sh/ruff/installation/
Link (site_page): https://docs.astral.sh/ruff/editors/features/
Link (site_page): https://docs.astral.sh/ruff/integrations/
Link (site_page): https://docs.astral.sh/ruff/faq/

## Health v2 (maintenance only)
Score: 95/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 99, release rhythm 86, longevity 100
- inputs: {"age_days": 1485, "days_push": 7, "days_rel": 13, "gap_med": 7, "n_releases_24m": 102}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 49343, forks 2363 (observed 2026-08-28T04:12:11.593494+00:00)

## What it is
Ruff is an extremely fast Python linter and code formatter written in Rust, offering over 900 built-in rules and drop-in parity with tools like Flake8, Black, isort, and pyupgrade. It ships as a CLI with built-in caching, auto-fix support, a Language Server for editor integration, and pre-commit/CI integrations.

## Use cases
- lint python code for style and errors
- format python code like black
- replace flake8 with a faster linter
- sort and organize python imports
- auto-fix unused imports and lint violations
- enforce code style in CI pipelines
- lint python in vscode in real time
- set up pre-commit hooks for python linting

## When to choose
- you need a fast, single-tool replacement for flake8, black, isort, and pyupgrade
- you want linting and formatting with auto-fix in one tool
- you work on large codebases or monorepos where lint speed matters
- you want editor diagnostics via LSP or VS Code extension

## When to avoid
- you rely on flake8 plugins not yet reimplemented in ruff
- you need linting for languages other than python
- you require exact byte-for-byte black output on non-black-formatted code

## Facets
- artifact type: cli-tool
- maturity: stable
- function: linter, formatter, static-site-generator, developer-tools
- domain: developer-tools, testing
- platform: python, rust, windows, cli, editor-plugin
- tags: flake8-replacement, black-replacement, isort, pyupgrade, pep8, code-style, language-server-protocol, vscode-extension, pre-commit, ci-cd, python, command-line, linux, macos, docker

## Member repositories
- astral-sh/ruff (main) score 95
- astral-sh/ruff-pre-commit (plugin) score 95
- astral-sh/ruff-vscode (plugin) score 99
- astral-sh/ruff-lsp (plugin) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:12:11.593494+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T16:20:13.656162+00:00, confidence not recorded.
  - readme: https://github.com/astral-sh/ruff (fetched 2026-08-28T04:12:11.593494+00:00, sha 09d7e29687cb)
  - homepage: https://docs.astral.sh/ruff (fetched 2026-08-28T18:13:55.184869+00:00, sha 52e584d776a2)
  - site_page: https://docs.astral.sh/ruff/installation/ (fetched 2026-08-28T18:13:55.193934+00:00, sha d36470f3caee)
  - site_page: https://docs.astral.sh/ruff/editors/features/ (fetched 2026-08-28T18:13:55.195601+00:00, sha 8cb287137383)
  - site_page: https://docs.astral.sh/ruff/integrations/ (fetched 2026-08-28T18:13:55.197290+00:00, sha ffa59bbe3311)
  - site_page: https://docs.astral.sh/ruff/faq/ (fetched 2026-08-28T18:13:55.199129+00:00, sha 698789f7f264)
  - site_page: https://docs.astral.sh/ruff/editors/ (fetched 2026-08-28T18:13:55.201196+00:00, sha 3f0aa84e1d56)
  - registry_pypi: https://pypi.org/pypi/ruff-lsp/json (fetched 2026-08-28T18:13:55.205737+00:00, sha 4d9109d7a55f)
  - registry_crates: https://crates.io/api/v1/crates/ruff (fetched 2026-08-28T18:13:55.202995+00:00, sha 1d2310b0f5e8)
- Data as of 2026-08-30T08:39:29.467469+00:00.
