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
- Make Executable:
After downloading, give the binary execute permissions.
chmod +x pgc - 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 - 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 pgcbefore moving it to your PATH.
Windows
-
Move to a Folder: Move the downloaded
pgc.exeto a folder of your choice, for exampleC:\Program Files\PostgresCompare\. -
Add to PATH: Add that folder to your system’s or user’s
PATHenvironment variable so you can runpgcfrom 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
Pathvariable, then click Edit…. - Click New and add the path to the folder where you placed
pgc.exe. - Click OK on all dialogs to save.
-
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
- CLI Commands — Full command reference
- Data Sources — All supported data source types
- Configuration — Configure
pgc.yamlfor your project - Examples — CI/CD integration and workflow examples