Skip to content

Installation

Shell (macOS/Linux):

curl -fsSL https://pgmt.dev/install.sh | sh

npm:

npm install -g @pgmt/pgmt

Cargo (builds from source):

cargo install pgmt

Verify it worked:

pgmt --version

Windows: binaries are published via npm and the install script, but not yet tested on Windows. If you try it, let us know how it goes.

  • PostgreSQL 13+ — a development database you can connect to.
  • Docker — pgmt validates every change against a disposable shadow database it runs in Docker. If you can’t run Docker, point databases.shadow.url at a dedicated empty database instead — pgmt resets it on every run, so never use a database with data you care about.

Same commands as installing: re-run the install script, npm update -g @pgmt/pgmt, or cargo install pgmt.

Don’t cargo install in CI — that compiles pgmt from source and adds minutes to every run. Use the GitHub Action or the install script, which fetch a prebuilt binary:

# GitHub Actions
- name: Install pgmt
uses: gdpotter/pgmt@v0
# Anywhere else (GitLab CI, etc.)
- curl -fsSL https://pgmt.dev/install.sh | sh

See the CI/CD guide for full pipeline examples.