capysquash-cli Installation
Install the free, open-source capysquash-cli command-line tool
capysquash-cli INSTALLATION
Install the free, open-source command-line tool for PostgreSQL migration optimization
capysquash-cli is powered by pgsquash-engine and provides full migration optimization capabilities from your terminal.
New to CAPYSQUASH? The CLI is perfect for local development and CI/CD. For team collaboration and visual workflows, check out the CAPYSQUASH Platform.
QUICK INSTALL
Homebrew (Recommended):
brew install capysquash/tap/capysquash-cliGo Install:
go install github.com/CAPYSQUASH/capysquash-cli/cmd/capysquash@latestVerify:
capysquash --version
# capysquash-cli version 0.9.7Using WSL (Recommended):
# Install Go first if not already installed
go install github.com/CAPYSQUASH/capysquash-cli/cmd/capysquash@latestUsing Scoop:
scoop bucket add capysquash https://github.com/CAPYSQUASH/scoop-bucket
scoop install capysquash-cliVerify:
capysquash --versionPull the image:
docker pull capysquash/capysquash-cli:latestRun analysis:
docker run -v $(pwd)/migrations:/migrations \
capysquash/capysquash-cli analyze /migrationsWHAT YOU NEED
REQUIREMENTS
- ☑ Go 1.25.3 or later
- ☑ SQL migration files (any format)
- ☑ Docker (optional, for validation)
💡 Coming Soon: Package managers (APT, Scoop) and NPM packages are planned for v1.0 release.
DOCKER INSTALLATION (for validation)
The pgsquash-engine uses Docker for schema validation. Install Docker if you want to use the capysquash validate command:
macOS
brew install --cask dockerOr download Docker Desktop
Linux
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.shVerify Docker
docker --version
docker psPLATFORM-SPECIFIC NOTES
macOS
Security warning: On first run, macOS may block the binary.
Solution:
# Remove quarantine attribute
xattr -d com.apple.quarantine /usr/local/bin/capysquash
# Or allow in System Preferences
# System Preferences → Security & Privacy → AllowWindows
Using WSL (recommended):
Install via Go in WSL:
go install github.com/CAPYSQUASH/capysquash-cli/cmd/pgsquash@latestUPDATING
Homebrew
brew upgrade capysquashGo Install
# Update to latest version
go install github.com/CAPYSQUASH/capysquash-cli/cmd/pgsquash@latest
# Check current version
capysquash --versionUNINSTALLING
Homebrew
brew uninstall capysquash
brew untap CAPYSQUASH/tapGo Install
# Remove binary
rm $(which capysquash)
# Remove config (optional)
rm ~/.capysquash.config.jsonTROUBLESHOOTING
Command not found
# Check if Go bin is in PATH
echo $PATH | grep go/bin
# Add Go bin to PATH (add to ~/.zshrc or ~/.bashrc)
export PATH=$PATH:$(go env GOPATH)/bin
# Reload shell
source ~/.zshrcPermission denied
# Make executable
chmod +x $(which capysquash)Docker not found
# Install Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
# Validation is optional - you can skip it
capysquash squash migrations/*.sql --output clean/NEXT STEPS
How is this guide?