Minimal CLI tool to execute a SQL file against PostgreSQL using pg-promise, designed for npx invocations with zero configuration. v1.2.0 (stable), maintained by GasBuddy. Unlike heavier migration tools, it focuses on one-off SQL execution with environment variable config. Low dependency footprint, TypeScript types included, Node >=18 required.
npm install run-pg-sqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to execute a SQL file using DATABASE_URL environment variable and npx.
Upgrade Node to 18 or later.
Use npx @gasbuddy/run-pg-sql to auto-fetch dependencies.
Set DATABASE_URL environment variable to valid PostgreSQL connection string.