OS Manuals

/usr/bin/sqlfluff

SQLFluff is a dialect-flexible, configurable SQL linter and auto-formatter ("The SQL Linter for Humans"). It parses SQL across many dialects, reports style/layout/convention rule violations, and can automatically fix or reformat files, with support for templated SQL (Jinja, placeholders, dbt via plugin) and multiple report formats.

From sqlfluff 4.5.0-r0 (enterprise-packages), captured 2026-11-08 by running sqlfluff --help (exit 0). permalink

Usage: sqlfluff [OPTIONS] COMMAND [ARGS]...

  SQLFluff is a modular SQL linter for humans.

Options:
  --version   Show the version and exit.
  -h, --help  Show this message and exit.

Commands:
  dialects  Show the current dialects available.
  fix       Fix SQL files.
  format    Autoformat SQL files.
  lint      Lint SQL files via passing a list of files or using stdin.
  parse     Parse SQL files and just spit out the result.
  render    Render SQL files and just spit out the result.
  rules     Show the current rules in use.
  version   Show the version of sqlfluff.

  Examples:

  .. code-block:: sh

     sqlfluff lint --dialect postgres .

     sqlfluff lint --dialect mysql --rules ST05 my_query.sql

     sqlfluff fix --dialect sqlite --rules LT10,ST05 src/queries

     sqlfluff parse --dialect duckdb --templater jinja path/my_query.sql
Options (2)
OptionDescriptionSource
--versionShow the version and exit.help
-h, --helpShow this message and exit.help

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.