SQLFluff
$ sqlfluff Community Low RiskModular SQL linter and formatter supporting over 25 dialects including Postgres, BigQuery, Snowflake, DuckDB, and Jinja/dbt templated models. Offers sqlfluff lint --format json for structured diagnostics and sqlfluff fix --force for non-interactive formatting.
brew install sqlfluff Parses and formats local .sql and dbt models offline; CLI execution is direct and deterministic.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Supports lint --format json, --nocolor, --nofail, and --dialect, though sqlfluff fix prompts interactively unless --force is passed.
sqlfluff lint --format jsonoutputs structured violation arrayssqlfluff fixprompts[Y/n]when unfixable violations exist unless--forceis supplied
Strictly local file operations; lint is read-only and fix checks before prompting unless --force is set.
- Read-only
lintsubcommand and explicitfixsubcommand
Available via Homebrew, PyPI, and uvx, though dbt-templated projects require sqlfluff-templater-dbt and dbt dependencies.
- Easy
brew/pip/uvxinstall; dbt projects need extra templater packages
Unmatched SQL dialect coverage and Jinja/dbt awareness across modern data stacks.
- Supports 25+ SQL dialects plus Jinja/dbt templates
Well-maintained community standard (sqlfluff/sqlfluff) under MIT license.
- Active
sqlfluff/sqlfluffrepository
Comprehensive rule catalog, CLI reference, and dialect docs at docs.sqlfluff.com.
- Official docs at docs.sqlfluff.com
Security, Auth & Guardrails
Offline local SQL parser/linter; no credentials stored unless optional dbt adapters read local profiles.
MIT open-source Python package; completely free.
# SQLFluff (sqlfluff) Agent Rules - Always run `sqlfluff lint --format json --nocolor` first; pass `--dialect` if `.sqlfluff` is absent. - Pass `--force` (`-f`) on `sqlfluff fix` so it does not hang waiting on an interactive `[Y/n]` prompt.
Agent-Ready Command Recipes
Safe Read-Only Queries
sqlfluff lint --dialect postgres --format json --nocolor models/
Emits JSON violation arrays per SQL file without editing files.
Controlled Writes & Previews
sqlfluff fix --dialect postgres --force models/orders.sql
Applies SQLFluff fixes to the target file without blocking on confirmation prompts (--force).
Strengths for Agents
- + Native
lint --format json --nocolorreturns exact line, position, and rule code metadata. - + Handles 25+ SQL dialects and Jinja/dbt templating natively.
Caveats & Pitfalls
- ! Omitting
--forceonsqlfluff fixcan trigger an interactive confirmation prompt and hang headless agents. - ! Requires
--dialect(or.sqlfluffconfig) before linting will run.