Installation
Shell (macOS/Linux):
curl -fsSL https://pgmt.dev/install.sh | shnpm:
npm install -g @pgmt/pgmtCargo (builds from source):
cargo install pgmtVerify it worked:
pgmt --versionWindows: 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.
Prerequisites
Section titled “Prerequisites”- 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.urlat a dedicated empty database instead — pgmt resets it on every run, so never use a database with data you care about.
Upgrading
Section titled “Upgrading”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 | shSee the CI/CD guide for full pipeline examples.