# sbdchd/squawk

🐘 Linter for Postgres migrations & SQL

Repository: https://github.com/sbdchd/squawk
Canonical: https://ross.abutalabs.com/products/squawk
Homepage: https://squawkhq.com
Language: Rust
License: Apache-2.0
License Family: permissive
Topics: rust, postgres, sql, linter, postgresql
Last push: 2026-09-02T23:56:25+00:00

## Health v2 (maintenance only)
Score: 96/100 (v2, computed 2026-09-03T02:39:23.370411+00:00)
- activity 100, release rhythm 88, longevity 100
- inputs: {"age_days": 2279, "days_push": 0, "days_rel": 1, "gap_med": 6, "n_releases_24m": 82}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1166, forks 70 (observed 2026-09-03T02:15:17.669158+00:00)

## What it is
Squawk is a linter for Postgres migrations and SQL that catches statements which could cause downtime, such as blocking locks or breaking schema changes. It ships as a CLI (npm, pip, binaries, Docker), a WASM playground, a VSCode extension with a language server, and GitHub Action/App integrations.

## Use cases
- lint postgres migration files before deploying
- prevent downtime from ALTER TABLE statements that take exclusive locks
- check SQL for unsafe index creation without CONCURRENTLY
- enforce best practices like timestamptz and identity columns in schema
- add migration linting to pull requests via GitHub Actions
- lint SQL files in CI to catch risky schema changes

## When to choose
- your team runs Postgres with SQL migration files and wants to avoid migration-caused outages
- you want automated review comments on schema changes in pull requests
- you need editor feedback on SQL migrations via VSCode or a language server

## When to avoid
- you use a non-Postgres database whose locking behavior differs
- your migrations are generated by an ORM and you cannot act on raw SQL warnings
- you need a full SQL formatter or query optimizer rather than a safety linter

## Facets
- artifact type: cli-tool
- maturity: active
- function: linter, developer-tools, cli, ci-cd
- domain: databases, developer-tools, backend, testing
- platform: cli, windows, browser, editor-plugin, rust
- tags: postgres, sql, migrations, database-migrations, schema-safety, language-server, github-action, wasm, linux, macos, docker

## Member repositories
- sbdchd/squawk (main) score 96

## Provenance
- Observed fields: from GitHub, fetched 2026-09-03T02:15:17.669158+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-30T06:31:58.650199+00:00, confidence not recorded.
  - readme: https://github.com/sbdchd/squawk (fetched 2026-09-03T02:15:17.669158+00:00, sha 9407052ee513)
  - homepage: https://squawkhq.com (fetched 2026-08-29T12:36:54.728657+00:00, sha 7b6745813c83)
  - site_page: https://squawkhq.com/docs (fetched 2026-08-29T12:36:54.737607+00:00, sha 365e46927019)
  - site_page: https://squawkhq.com/docs/rules (fetched 2026-08-29T12:36:54.739443+00:00, sha 5749e3861768)
  - site_page: https://squawkhq.com/docs/github_app (fetched 2026-08-29T12:36:54.741162+00:00, sha dcf10cc2d000)
  - site_page: https://squawkhq.com/docs/ban-char-field (fetched 2026-08-29T12:36:54.743065+00:00, sha a8ff1cc5562f)
  - site_page: https://squawkhq.com/docs/prefer-bigint-over-int (fetched 2026-08-29T12:36:54.744733+00:00, sha f99d98f89348)
  - site_page: https://squawkhq.com/docs/prefer-bigint-over-smallint (fetched 2026-08-29T12:36:54.746408+00:00, sha 70fada2eeb32)
  - site_page: https://squawkhq.com/docs/prefer-identity (fetched 2026-08-29T12:36:54.748105+00:00, sha 404287e6d0bd)
  - site_page: https://squawkhq.com/docs/prefer-timestamptz (fetched 2026-08-29T12:36:54.749994+00:00, sha 0f74b4f68b19)
- Data as of 2026-08-30T08:39:29.467469+00:00.
