sqlfluff
The SQL Linter for Humans
Decision gist · record as of 2026-08-14
Yes. SQLFluff is actively maintained, has no known vulnerabilities, installs with low friction, and carries a permissive MIT License. It fills a clear need for SQL code quality in modern data workflows. Install it if you work with SQL across multiple dialects, use dbt, or want to enforce team SQL style standards.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Optional Rust-backed parser available via extra install.
- Low friction install with 12 lightweight runtime dependencies.
License · maintenance · safety
permissive license (permissive) — MIT License (permissive) allows commercial and private use with minimal restrictions; you must include the license notice and copyright statement.
last release 2026-08-07 (7 days) · last repo commit 2026-08-14 · 9,853 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 11,521,310 downloads/mo, #1,387 on PyPI
Alternatives
Verify before relying
pip install sqlfluff
echo "SELECT a FROM tbl;" > test.sql
sqlfluff lint test.sql --dialect ansi
sqlfluff fix test.sql --dialect ansi- Completeness of dialect support coverage (documentation notes 'perhaps not in full')
- Performance characteristics on large SQL files or projects
- Integration maturity with dbt workflows beyond basic support
- Build requirements for optional Rust-backed parser on unsupported platforms
What it is and what it does
SQLFluff is a dialect-flexible SQL linter designed to catch formatting, spacing, and style violations in SQL code. It works as a command-line tool that analyzes SQL files, reports issues with line and position information, and can automatically fix most violations. The tool is built to handle real-world SQL workflows, including templated SQL with Jinja and dbt projects.
It supports a wide range of SQL dialects—from ANSI SQL to vendor-specific variants like BigQuery, Snowflake, PostgreSQL, MySQL, and many others—making it useful across different database platforms and cloud data warehouses. The linter can be configured per project and integrates into development workflows via CLI, VS Code extension, or Docker, allowing teams to enforce consistent SQL style without manual review.
Use it for
- Enforce consistent SQL formatting and style across a team's data pipeline or dbt project
- Automatically fix common SQL formatting issues like spacing and indentation in bulk
- Lint SQL code in CI/CD pipelines to catch style violations before deployment
- Validate SQL syntax and style for a specific database dialect (e.g., BigQuery, Snowflake)
- Integrate SQL quality checks into VS Code or other editors during development
- Standardize templated SQL with Jinja and dbt formatting in ELT applications
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
SQLFluff is actively maintained, has no known vulnerabilities, installs with low friction, and carries a permissive MIT License. It fills a clear need for SQL code quality in modern data workflows. Install it if you work with SQL across multiple dialects, use dbt, or want to enforce team SQL style standards.
Install
sqlfluff on PyPI
Before you install
Low friction install with 12 lightweight runtime dependencies. Active maintenance with releases monthly; last release 7 days ago. Repository shows strong community engagement with 9853 stars.
Requires Python 3.10 or later. Optional Rust-backed parser available via extra install.
License in practice
MIT License (permissive) allows commercial and private use with minimal restrictions; you must include the license notice and copyright statement.
Quickstart
pip install sqlfluff
echo "SELECT a FROM tbl;" > test.sql
sqlfluff lint test.sql --dialect ansi
sqlfluff fix test.sql --dialect ansi
Verify before relying
- Completeness of dialect support coverage (documentation notes 'perhaps not in full')
- Performance characteristics on large SQL files or projects
- Integration maturity with dbt workflows beyond basic support
- Build requirements for optional Rust-backed parser on unsupported platforms
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 12 packagesplatformdirschardetclickcoloramadiff-coverJinja2pathspecpyyamlregextblibtomlitqdm |
| Maintenance | Actively maintained 7 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 11,521,310 / month, #1,387 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: POSIXOperating System :: UnixProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonProgramming Language :: SQLTopic :: Software Development :: Quality AssuranceTopic :: Utilities |
Evidence: sqlfluff-4.3.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “sql style guide enforcement”
- sqlfluffSQLFluff is a SQL linter and auto-fixer that checks SQL code for…
- valeVale is a command-line tool for enforcing editorial style guides on…
- hackingHacking is a set of flake8 plugins that enforce the OpenStack Style…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
See also collate-sqlfluff · shandy-sqlfmt · sqlfluff-templater-dbt · sqlfluffrs · sqlglot · sqlglotrs · collate-sqllineage · jinjasql2 · jinjasql · sqlglotc