How to Install psql on Mac
Ghazi
If you are searching for install psql mac or psql install mac, you probably want the PostgreSQL command-line client without spending the afternoon figuring out which installer also includes a server, service, or GUI.
psql is the official PostgreSQL terminal client. It lets you connect to a database, run SQL, inspect schemas, import data, and script database work. On macOS, the three common paths are Homebrew, Postgres.app, and the official PostgreSQL installer.
Option 1: Install psql with Homebrew
If you already use Homebrew, this is usually the fastest path. Install PostgreSQL client tools from the terminal:
brew install libpq
brew link --force libpqThen confirm that psql is available:
psql --versionThis is a good choice when you only need the client utilities and will connect to a PostgreSQL database running somewhere else, such as Docker, Neon, Supabase, RDS, Railway, or a remote server.
Option 2: Install Postgres.app
Postgres.app is a Mac-native PostgreSQL distribution. It gives you a local PostgreSQL server and includes command-line tools like psql. After installing it, add its binaries to your shell path so the terminal can find them.
export PATH="/Applications/Postgres.app/Contents/Versions/latest/bin:$PATH"Add that line to your shell profile if you want it to persist. For zsh, that is usually ~/.zshrc.
Option 3: Use the PostgreSQL installer
The official PostgreSQL installer for macOS includes the server, pgAdmin, Stack Builder, and command-line tools. This is useful if you want the full packaged distribution and do not mind a heavier install.
How to connect with psql
Once installed, connect with a connection string:
psql "postgresql://user:password@localhost:5432/database"Or connect with flags:
psql -h localhost -p 5432 -U user -d databaseWhen to add a GUI
psql is excellent for quick terminal work, scripting, and debugging. A GUI helps when you want to browse tables, inspect query results visually, edit rows, sort/filter data, or keep saved queries organized.
PostgresGUI pairs well with psql: keep the terminal for automation and use a native Mac Postgres client when you want a cleaner view of your database.