sql-watch is a command-line utility for rapid SQL development that automatically applies idempotent SQL scripts to a PostgreSQL database on file change. It is NOT a migration tool—no up/rollback patterns. Designed for TDD/BDD workflows, it watches file changes and re-runs SQL scripts atomically. Version 0.1.0 is the latest stable release with a low cadence (no recent updates). Key differentiator: it focuses on development speed with automatic execution, unlike traditional migration tools. Supports ESM and TypeScript.
npm install sql-watchNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows initialization, single-run, and watch modes for rapid SQL development with PostgreSQL.
Use traditional migration tools if you need rollback support.
Set PGDATABASE, PGUSER, PGPORT, PGPASSWORD, PGHOST, NODE_ENV in .env or export.
Use --bypass for CI/CD.
Update to latest version or refer to updated docs.
Start PostgreSQL or check PGHOST and PGPORT in environment.
Run 'npm install -g sql-watch' or use 'npx sql-watch'.
Run 'npm install pg' as peer dependency.