Get Started with Modular Postgres

Set up your environment and start using pgpm in three easy steps.

1

Install pgpm

Install the pgpm CLI globally to start managing your PostgreSQL packages.

npm install -g pgpm
Browse all packages

One simple npm command gets you started with the full power of pgpm.

2

Setup Your Environment

Get 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.

Launch a local Postgres instance or connect to your existing database.

3

Try Your First Package

Install the faker package to add fake data generation functions directly in PostgreSQL.

# 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 Arbor

Create a workspace, install a package, and deploy—all in minutes.

Explore the Modular Postgres Package Ecosystem

Discover a growing collection of modular Postgres packages ready to enhance your database functionality.

From authentication and security to data generation and utilities, find the modules you need to accelerate your development.