PgDesigner

PgDesigner CLI for CI/CD

Single binary, zero dependencies. Lint, diff, generate, and seed — all from your terminal or CI pipeline.

Six commands, one binary

pgdesigner schema.pgd                           # open in browser UI
pgdesigner generate -o schema.sql schema.pgd    # DDL to file
pgdesigner diff old.pgd new.pgd                 # ALTER SQL to stdout
pgdesigner lint -f json schema.pgd              # lint with JSON output
pgdesigner testdata -seed 42 schema.pgd         # reproducible test data
pgdesigner convert schema.pdd -o project.pgd    # import from other formats

Every command accepts .pgd, .pdd, .dbs, .dm2, .sql, or a PostgreSQL connection string as input.

Plug into your CI pipeline

Lint on every PR

- name: Validate schema
  run: pgdesigner lint -s error schema.pgd

Exit code 1 if errors found → blocks the merge.

Generate migration on schema change

- name: Generate migration
  run: |
    pgdesigner diff -f sql old.pgd new.pgd > migration.sql
    cat migration.sql

Seed test database

- name: Seed test data
  run: |
    pgdesigner generate schema.pgd | psql $DATABASE_URL
    pgdesigner testdata -seed 42 -rows 100 schema.pgd | psql $DATABASE_URL

Command reference

CommandFlagsDescription
generate-oFull DDL to stdout or file
diff-f sql|jsonCompare two schemas → ALTER SQL or JSON
lint-f text|json, -s, -fixValidate schema, auto-fix issues
testdata-seed, -rows, -tables, -oGenerate realistic INSERT statements
convert-oImport from .pdd/.dbs/.dm2/.sql/DSN

Exit codes

CodeMeaning
0Success (no lint errors, no diff changes)
1Lint errors found or diff has changes
2File not found or parse error

Cross-platform, zero dependencies

Single statically-linked binary. No runtime dependencies — no Go, no Node, no Python. Works on:

  • macOS — amd64 + arm64, signed and notarized
  • Linux — amd64 + arm64
  • Windows — amd64
curl -L https://github.com/vmkteam/pgdesigner/releases/latest/download/pgdesigner-linux-amd64.tar.gz | tar xz
./pgdesigner lint schema.pgd