pgpm
A Postgres Package Manager
Modular Postgres development with reusable packages, deterministic migrations, recursive dependency resolution, tag-aware versioning, and turnkey module-first workspaces.
npm to Postgrespgpm enables modular Postgres by converting your SQL migrations into versioned packages with dependency graphs, deterministic installs, and reproducible deployments across every environment.
Install packages like npm, write migrations in pure SQL, test end-to-end with TypeScript, and organize everything in intuitive Node-style workspaces for clean, maintainable development.
Install the pgpm CLI to start managing your PostgreSQL packages.
npm install -g pgpmGet up and running in seconds with simple commands.
pgpm docker start
eval "$(pgpm env)"Tip: Already running Postgres? Skip the Docker step and just export your PG* environment variables.
See the full workflow from workspace creation to package installation and deployment.
# 1. Create a workspace
pgpm init workspace
# 2. Create your first module
cd my-workspace
pgpm init
# 3. Install a package
cd packages/my-module
pgpm install @pgpm/faker
# 4. Deploy everything
pgpm deploy --createdb --database mydb1
psql -d mydb1 -c "SELECT faker.city('MI');"
> Ann Arborpgpm brings the power of package management to PostgreSQL, making it easy to share and reuse database modules across projects and teams.
With deterministic migrations and recursive dependency resolution, you can build complex database applications with confidence, knowing that your schema changes are reproducible and your dependencies are correctly resolved.
pgpm turns PostgreSQL migrations into a modular package system, giving you clean versioning, dependency graphs, and reproducible deployments.