# sqlfluff/sqlfluff

A modular SQL linter and auto-formatter with support for multiple dialects and templated code.

Repository: https://github.com/sqlfluff/sqlfluff
Canonical: https://ross.abutalabs.com/products/sqlfluff
Homepage: https://www.sqlfluff.com
Language: Python
License: MIT
License Family: permissive
Topics: sql-linter, pypi, hacktoberfest, sql
Last push: 2026-08-26T00:37:46+00:00

## Health v2 (maintenance only)
Score: 98/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 96, longevity 100
- inputs: {"age_days": 2862, "days_push": 8, "days_rel": 26, "gap_med": 21.5, "n_releases_24m": 23}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 9860, forks 1118 (observed 2026-08-28T04:10:37.529706+00:00)

## What it is
SQLFluff is a dialect-flexible, configurable SQL linter and auto-formatter for Python. It supports many SQL dialects (BigQuery, Snowflake, Postgres, etc.), Jinja templating and dbt, and can auto-fix most linting errors.

## Use cases
- lint sql files for style and syntax errors
- auto-format sql queries consistently across a team
- lint dbt models with jinja templating
- enforce sql style rules in ci pipelines
- check sql syntax for a specific dialect like snowflake or bigquery without a database
- fix sql indentation and keyword casing automatically

## When to choose
- you need a configurable SQL linter supporting many dialects and templated code
- your team wants automated SQL formatting and style enforcement in CI
- you work with dbt or Jinja-templated SQL in ELT workflows

## When to avoid
- you need a full SQL parser or query engine rather than a linter
- you need runtime SQL validation against a live database
- your SQL dialect is unsupported or heavily non-standard

## Facets
- artifact type: cli-tool
- maturity: stable
- function: linter, formatter, parser, cli
- domain: developer-tools, databases
- platform: python, cli, cross-platform
- tags: sql, sql-linter, sql-formatter, dbt, jinja-templating, sql-dialects, auto-fix, elt, data-engineering, command-line, docker

## Member repositories
- sqlfluff/sqlfluff (main) score 98

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:37.529706+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-29T17:20:53.132962+00:00, confidence not recorded.
  - readme: https://github.com/sqlfluff/sqlfluff (fetched 2026-08-28T04:10:37.529706+00:00, sha bb200052bff3)
  - homepage: https://www.sqlfluff.com (fetched 2026-08-29T08:20:17.862245+00:00, sha 6daa0c40bdc5)
  - site_page: https://docs.sqlfluff.com (fetched 2026-08-29T08:20:17.871619+00:00, sha 20bcf27f4a3a)
  - registry_pypi: https://pypi.org/pypi/sqlfluff/json (fetched 2026-08-29T08:20:17.873927+00:00, sha 4adfb6508157)
- Data as of 2026-08-30T08:39:29.467469+00:00.
