A command-line tool to manage Postgres migrations. Current stable version is 3.1.0, released as part of a monorepo with active development. It provides a simple CLI for creating, running, and reverting database migrations. Differentiators include minimal configuration, support for both SQL and JavaScript/TypeScript migration files, and integration with the pg npm package. Alternative tools like node-pg-migrate or knex have different APIs.
npm install pgmcliNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initialize migration tool, create a new migration file, apply all pending migrations, and check status.
Ensure Node.js >=18 and use ESM-compatible require/import.
Replace 'rollback' with 'migrate down'.
Create a 'migrations' folder or specify path with --migrations-dir.
Run 'npm install pg --save' to install the required PostgreSQL client.
Run 'pgmcli init' to create the migrations directory and configuration.
Use 'npx pgmcli' or install globally with 'npm install -g pgmcli'.