CLI Installation

How to install the PostgresCompare command-line interface

The PostgresCompare command-line interface (pgc) is available for Windows, macOS, and Linux. The download is a single self-contained executable — no runtime or installer required.

Supported Platforms

Platform Architecture Binary
Linux x64 pgc
macOS ARM64 (Apple Silicon) pgc
macOS x64 (Intel) pgc
Windows x64 pgc.exe

Download

Download the pgc binary for your platform from the Downloads page.

Installation

macOS and Linux

  1. Make Executable: After downloading, give the binary execute permissions.
    chmod +x pgc
    
  2. Move to PATH: Move the binary to a location in your system’s PATH, such as /usr/local/bin.
    sudo mv pgc /usr/local/bin/pgc
    
  3. Verify:
    pgc --version
    

macOS Gatekeeper: On first run, macOS may block the binary because it was downloaded from the internet. Open System Settings → Privacy & Security and click Allow Anyway, or run xattr -d com.apple.quarantine pgc before moving it to your PATH.

Windows

  1. Move to a Folder: Move the downloaded pgc.exe to a folder of your choice, for example C:\Program Files\PostgresCompare\.

  2. Add to PATH: Add that folder to your system’s or user’s PATH environment variable so you can run pgc from any terminal.

    • Search for “Edit the system environment variables” in the Start Menu.
    • Click the Environment Variables… button.
    • In the System variables section, find and select the Path variable, then click Edit….
    • Click New and add the path to the folder where you placed pgc.exe.
    • Click OK on all dialogs to save.
  3. Verify: Open a new Command Prompt or PowerShell window and run:

    pgc --version
    

First Steps

Initialize a configuration file in your project:

pgc config init

This creates a pgc.yaml file with examples of all available settings.

Run your first comparison:

pgc diff postgres://localhost/db1 postgres://localhost/db2

Next Steps