squawk
Squawk is a linter for PostgreSQL migrations and SQL that prevents downtime-causing schema changes and enforces best practices. It runs as a CLI tool, integrates with GitHub Actions, VSCode, and pre-commit workflows, and provides detailed warnings with remediation suggestions.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | sbdchd/squawk |
| Owner | sbdchd |
| Primary language | PLpgSQL |
| License | Apache-2.0 — OSI-approved |
| Stars | 1.1k |
| Forks | 66 |
| Open issues | 44 |
| Latest release | v2.59.0 (2026-06-27) |
| Last updated | 2026-07-07 |
| Source | https://github.com/sbdchd/squawk |
What squawk is
Squawk parses SQL and migration files using a Rust-based parser, applies configurable linting rules (e.g., concurrent index creation, IDENTITY columns over SERIAL), and outputs results in multiple formats (TTY, JSON, GitLab). It supports Postgres version targeting and can assume transactions wrap migrations.
Get the squawk source
Clone the repository and explore it locally.
git clone https://github.com/sbdchd/squawk.gitcd squawk# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Install via npm, pip, or Docker; no database connection required—runs statically on SQL files.
- Configure rule inclusion/exclusion globally (.squawk.toml) or per-file (squawk-ignore comments).
- Integrate into CI/CD pipelines via GitHub Action, pre-commit hooks, or direct CLI invocation in build scripts.
- Review rule documentation at squawkhq.com/docs/rules to understand which warnings apply to your migration workflow (some are warnings, not hard errors).
- Consider --assume-in-transaction flag if your migration tool wraps all files in transactions, as some rules adapt behavior based on this context.
When to avoid it — and what to weigh
- Non-PostgreSQL databases — Squawk is PostgreSQL-specific; it will not help with MySQL, SQLite, or other SQL dialects.
- Real-time query performance analysis — Squawk lints schema structure and migration patterns, not query execution plans or runtime performance tuning. Use EXPLAIN ANALYZE or query profilers separately.
- Programmatic rule customization — Squawk rules are fixed; there is no public API to define custom linting logic. Configuration is limited to including/excluding predefined rules.
- Proprietary or closed-source requirement — Squawk is Apache 2.0 licensed open-source; if your compliance mandates all software to remain proprietary, this is not suitable.
License & commercial use
Apache License 2.0 (Apache-2.0) permits commercial use, modification, and distribution provided original license and copyright notice are included.
Apache 2.0 is a permissive OSI-approved license that allows commercial use without royalty or proprietary requirement, provided you include the Apache 2.0 license text in distributions. No vendor lock-in or commercial support agreement required.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Strong |
| License clarity | Clear |
| Deployment complexity | Low |
| DEV.co fit | Good |
| Assessment confidence | High |
Squawk is a static analysis tool on text files; it does not connect to live databases or execute SQL. Primary considerations: (1) GitHub token secrets if using upload-to-github integration—manage via Actions secrets, (2) input validation of SQL syntax—malformed SQL may cause parsing errors (not exploitable, but behavior should be tested), (3) no authentication/authorization enforced in the tool itself; relies on file system and CI/CD access controls.
Alternatives to consider
sqlfluff
Multi-dialect SQL linter with broader language support (Postgres, MySQL, T-SQL, etc.) and customizable rules via Python plugins; heavier than Squawk but more flexible.
pganalyze schema advisor / Stripe pg-schema-diff
Postgres-specific schema comparison tools; pg-schema-diff focuses on detecting safe vs. unsafe migrations at the diff level rather than linting raw SQL.
strong_migrations (Rails) / django-pg-zero-downtime-migrations
Framework-specific migration linters (Ruby/Django); tighter integration with ORM migration tools but limited to those ecosystems.
Build on squawk with DEV.co software developers
Integrate Squawk into your PostgreSQL workflow today. Start with the CLI or web playground—no database connection required.
Talk to DEV.coRelated on DEV.co
Explore the category and the services that help you build with it.
squawk FAQ
Does Squawk require a Postgres database to run?
Can I disable specific rules per migration file?
Does Squawk work with non-Postgres SQL?
How do I integrate Squawk into my GitHub CI/CD?
Work with a software development agency
Need help beyond evaluating squawk? DEV.co is a software development agency offering software development services and web development for teams of every size. Our software developers and web developers build custom software, web applications, APIs, and open-source databases integrations — and maintain them long-term.
Ready to prevent migration disasters?
Integrate Squawk into your PostgreSQL workflow today. Start with the CLI or web playground—no database connection required.