quarylabs/sqruff

Fast SQL formatter/linter

Rust

1,409

4,480 commits

updated Oct 11, 2026

See the code

README

sqruff

CodSpeed Badge

sqruff is a SQL linter and formatter written in Rust.

  • Linting: advanced, configurable SQL linting
  • Formatting: automated, configurable formatting
  • Speed: fast and efficient
  • Portability: easy to integrate into dev workflows

Try it in the browser: https://playground.quary.dev

Table of contents

  1. Quickstart
  2. Editor integrations
  3. Documentation

Quickstart

Install (macOS)

brew install sqruff

For other platforms (pip, cargo, binary downloads), see the installation guide.

Lint a project

sqruff lint . --dialect postgres

Configure a project

Create a .sqruff file in your project root:

[sqruff]
dialect = postgres

Then run without the --dialect flag:

sqruff lint .

Editor integrations

sqruff ships an LSP server (sqruff lsp) usable from any editor. This repo maintains two integrations:

Documentation

Full documentation: playground.quary.dev/docs

Key entry points:

ansi
bigquery
clickhouse
linter
rust
snowflake
sql

quarylabs/sqruff

Fast SQL formatter/linter

Rust

1,409

4,480 commits

updated Oct 11, 2026

See the code

README

sqruff

CodSpeed Badge

sqruff is a SQL linter and formatter written in Rust.

  • Linting: advanced, configurable SQL linting
  • Formatting: automated, configurable formatting
  • Speed: fast and efficient
  • Portability: easy to integrate into dev workflows

Try it in the browser: https://playground.quary.dev

Table of contents

  1. Quickstart
  2. Editor integrations
  3. Documentation

Quickstart

Install (macOS)

brew install sqruff

For other platforms (pip, cargo, binary downloads), see the installation guide.

Lint a project

sqruff lint . --dialect postgres

Configure a project

Create a .sqruff file in your project root:

[sqruff]
dialect = postgres

Then run without the --dialect flag:

sqruff lint .

Editor integrations

sqruff ships an LSP server (sqruff lsp) usable from any editor. This repo maintains two integrations:

Documentation

Full documentation: playground.quary.dev/docs

Key entry points:

ansi
bigquery
clickhouse
linter
rust
snowflake
sql

Project health

crates.io

Latest release

0.41.0 · Oct 6, 2026

Releases this year

17

Significant stargazers

(top 24 of 52)

Aarni Koskela

535 followers · starred Nov 2025

Wilfred Hughes

1,249 followers · starred Aug 2026

Lukas Wirth

678 followers · starred Jan 2025

TATSUNO “Taz” Yasuhiro

142 followers · starred Jul 2025