Open source · MIT · Built for PostgreSQL

A Postgres client built around
problems I kept having.

I wrote PgClient for myself. Each slide is one thing that annoyed me enough to fix.

Also for Intel Mac · Windows · Linux · all downloads
Not yet signed by Apple. If macOS blocks the first launch, open System Settings → Privacy & Security and click Open Anyway.

PgClient connected to a shop database tagged prod, so the tab and Run button are red: the tables panel, a live bar of connections, cache hit rate and transactions per second, and fifty orders with readable dates
↓ scroll, or use the ← → keys
Problem 01 / 06

“I keep entering and re-entering the same connection details and passwords, in every client, on every machine.”

Everything is a config file.

Your servers live in one JSON file, the way kubectl reads ~/.kube/config. Passwords come from ~/.pgpass, the way psql reads it. Nothing to type.

  • Plug and play. Drop the file in place and your servers are in the picker.
  • Edit it anywhere. The file is read again whenever the window regains focus.
  • No secrets in it. A server with no password takes the matching ~/.pgpass line.
  • Keep it in your dotfiles. It has a JSON schema, and $PGCLIENT_CONFIG can point elsewhere.
~/.pgclient/servers.json
{
  "version": 1,
  "servers": [
    { "name": "shop", "host": "localhost", "port": 5439, "user": "demo", "database": "shop", "environment": "local" },
    { "name": "shop", "host": "localhost", "port": 5439, "user": "demo", "database": "shop", "environment": "dev" },
    { "name": "shop", "host": "localhost", "port": 5439, "user": "demo", "database": "shop", "environment": "staging" },
    { "name": "shop", "host": "localhost", "port": 5439, "user": "demo", "database": "shop", "environment": "prod" }
  ]
}
~/.pgpass
# host:port:database:user:password
localhost:5439:shop:demo:demo-not-secret
The server picker listing four servers read from the file: shop local, dev, staging and prod
The picker, filled from the file. No form, no password prompt.
Problem 02 / 06

“Two windows, the same table names, and one of them is production. I only noticed after pressing Run.”

Prod is red.

Tag a server with an environment and the whole window takes its colour: the Run button, the active tab, the server box, even the SQL highlighting. You know where you are before you press anything.

local · teal dev · blue staging · indigo, the default prod · red
The same query on the local server, with a teal Run button and teal highlighting
shop - local. The same query, the same database name.
The same query on the prod server, with a red Run button, red server box and red highlighting
shop - prod. Red everywhere, so you cannot miss it.

The same name can be listed once per environment, so shop in prod reads shop - prod.

Problem 03 / 06

“To follow a foreign key I have to write the next query, and the one after that, and lose track of where I started.”

Follow the keys. See the graph.

Two ways to walk from a row to the rows around it, and neither means writing a join.

A table of orders where right-clicking a cell opens a menu of related tables; each pick opens a new tab with the related rows, from an order to its customer, the customer's orders, the order's items and then a product
In the table: right-click. Right-click a cell in a column that links somewhere. Pick what it points to, or what points at it, and the related rows open in a new tab as a query, ready to run. Your trail stays in the tab strip.
A graph that starts as one order card and grows as links are opened one at a time: its customer, its items, the products of those items and its shipment
In the graph: open links, card by card. Click the links icon on a card and pick one relation, or Open all. The related rows appear beside it, joined by the key. Click a card to read its whole row.

Click an animation to open it full size. The data is invented.

Problem 04 / 06

“A few hours in, the connection dies. The port-forward lost its login, and I have to find the terminal and open it again.”

The tunnel opens itself.

Give a server a tunnel command. PgClient runs it when you connect, if the port is not already answering, and brings it back when it drops. It can be any command you would have typed: kubectl port-forward, a gcloud IAP tunnel, an aws ssm session.

  • Every query checks it. A tunnel that has died is started again by the next one.
  • A forward that outlived its login still answers but lets nothing through. That is detected, and the tunnel is restarted once.
  • Found from the Dock. The app asks your login shell for its PATH, so kubectl, gcloud and aws are found.
  • Honest when it fails. You see what the command said, not a bare timeout.
  • Yours stay yours. Something already answering on the port is left alone, and every tunnel the app started is stopped when it quits.
  • Safe to paste. Tunnels are read only from the servers file, so an import can never make the app run a command.
PgClient on a prod server runs a query through a kubectl port-forward it opened itself; the forward is killed in a terminal, the query is run again and still returns its rows, and the terminal shows a new port-forward
Recorded, not staged. The forward is killed in the terminal. The next Run still returns its rows, through a new forward.
kubectl · inside a server entry
"tunnel": { "command": [
  "kubectl", "--context", "staging", "-n", "db",
  "port-forward", "svc/pg", "5433:5432"
] }
gcloud · inside a server entry
"tunnel": { "command": [
  "gcloud", "compute", "start-iap-tunnel", "db-vm", "5432",
  "--local-host-port=localhost:5433", "--zone", "europe-west1-b"
] }
aws · inside a server entry
"tunnel": { "command": [
  "aws", "ssm", "start-session", "--target", "i-0123456789abcdef0",
  "--document-name", "AWS-StartPortForwardingSessionToRemoteHost",
  "--parameters",
  "host=db.example.internal,portNumber=5432,localPortNumber=5433"
] }
MorningYou connectThe port is closed, so the tunnel command runs.
AfternoonThe login expiresThe forward dies, or answers and passes nothing.
Next queryIt is backThe tunnel is started again. You never left the editor.
Problem 05 / 06

“The result never fits its pane. I want to see all of it for a moment, and then have my editor back.”

Pinch to grow it.

Pinch out over a result, table or graph, and it grows from where it sits as your fingers spread, until it fills the window. Stop halfway and it stays that size. Pinch back, or press Esc, and it returns to its place.

A table of orders growing from the bottom pane until it fills the whole window, then shrinking back
Table. More rows come into view.
A graph of one order and its linked rows growing from the bottom pane until it fills the window, then shrinking back
Graph. Room to see every card at once.

The same pinch works on a trackpad in the app. These are the real screens, played back frame by frame from a pinch driven step by step. Click one to open it full size. The data is invented.

Problem 06 / 06

“2026-04-14 21:34:00+00. I read it, then do the time-zone sum in my head. Every time.”

Dates you can read.

One toggle turns date and timestamp columns into plain dates, in the time zone of your screen. Switch it off and you are back to what Postgres sent.

  • In your time zone. A timestamp with a zone is shown in the zone of your screen. This screen is set to New York, so 21:34+00 reads 5:34:00 PM EDT.
  • Honest about what it does not know. A timestamp without a zone is never shifted. NULL, infinity and anything that is not a date stay exactly as they are.
  • Display only. What you copy, export or edit is still the real value.
  • Remembered. The toggle stays where you left it between runs, and works in the table and the graph.
A table of shipments whose timestamps change from 2026-04-14 21:34:00+00 to Apr 14, 2026, 5:34:00 PM EDT when the Readable dates button is switched on; an empty delivery date stays NULL
Readable dates, off and on. The same rows; only how the dates are drawn changes.

It reads each column's type from the table a result came from, so it applies to results read from one table. A view or a join shows the raw value. The data is invented.

More to come

This is the start of the list.

PgClient also shows who is blocking whom, a live dashboard and cost-sized query plans. Each of those has a problem behind it, and each will get its own slide.

Compared

Where it fits among the Postgres clients you already know.

PgClient does one thing: PostgreSQL. That focus is the trade. Here is where each tool stands on the basics.

ClientLicenceDatabasesShapeA good fit when
PgClientOpen source, MITPostgreSQLSmall desktop app (Tauri and Rust)You live in Postgres and want sessions, locks, metrics and plans one click from the editor.
pgAdminOpen sourcePostgreSQLWeb-based, runs as a desktop or server appYou administer servers: roles, backups, maintenance.
DBeaverOpen source Community edition, paid editionsManyJava desktop appYou work across several database engines in one tool.
DataGripCommercial subscriptionManyJetBrains IDEYou want IDE-grade refactoring and live in other JetBrains tools.
TablePlusCommercial licence, limited free useManyNative appYou want a fast, polished native client for several engines.
PosticoCommercial licencePostgreSQLNative macOS appYou want a simple, Mac-only Postgres client.

Facts about other products are as we understand them at the time of writing and change between versions. Check each project before you decide.

Where the others are ahead

DBeaver, DataGrip and TablePlus handle other databases; PgClient never will. DataGrip has deeper refactoring and code analysis. pgAdmin covers server administration such as backup and restore, and PgClient does not. PgClient is young, and has not yet had years of use against odd corners of Postgres.

Where it is built differently

The tools you need during an incident are in the same window as the editor: who is blocking whom, cache hit ratio, a cost-sized plan, and a colour that tells you it is production. The core is a plain Rust crate that knows nothing of windows, so another shell can drive it.

Get started

Build it from source (2 minutes).

Just want to use it? Download a release instead. macOS first. Windows and Linux builds are produced by the release workflow, but passwords are kept in the macOS Keychain only for now.

# a throwaway Postgres to try it against (user, password and database: pgclient)
docker compose -f compose.test.yaml up -d --wait

# build and run the desktop app
npm install && npm --prefix web install
npm run tauri dev

# or install it into /Applications
./install.sh

Add localhost:5435, user pgclient, password pgclient as a server, or list yours in ~/.pgclient/servers.json. The screenshots on this page are the real app running against a generated demo database; all the data is invented.