brew install libpq
brew link --force libpq
psql --version
libpq includes psql and other PostgreSQL client utilities. The brew link --force step symlinks the binaries into your PATH so psql is available from any terminal.
If you don’t have Homebrew installed yet:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"