pgBrain

pgBrain

Pro PostgreSQL for macOS

macOSv0.9.3free && open-source26 downloads
pgBrain hero

DataGrip-class PostgreSQL workflows in a shell that actually feels like a Mac. Windows per connection, an editable grid, a notebook scratchpad, and a full DBA toolkit — native SwiftUI + AppKit, no Electron, no subscription, no telemetry.

Highlights

The day-to-day, done right

🗺️

PostGIS, Mapped

Spatial databases are auto-detected. Geometry reads as WKT everywhere, and any result with a geometry column gets a Map view that plots points, lines, and polygons on a real map.

🏗️

Build Tables & Indexes

Visual CREATE TABLE and CREATE INDEX — pick columns, types, keys, methods, partial predicates, with a live SQL preview. No hand-writing DDL.

🌳

JSON, Two Ways

Edit JSON/JSONB as text with prettify/validate, or flip to a collapsible, type-coloured tree to read deep nested values at a glance.

🧮

Column Profiler

Right-click any column for row, null, and distinct counts — with a populated bar — plus min, max, and avg. Scoped to your active filter.

🗑️

Safe Row Deletes

Right-click a row or a whole selection to delete by primary key, behind a confirmation. No primary key? pgBrain refuses rather than guess.

📑

Copy As…

Lift any result block or table page to the clipboard as a Markdown table, JSON, TSV, or CSV — paste straight into a doc, a spreadsheet, or a PR.

🔔

Live Feedback

Every export, import, copy, and edit flashes a toast with the row count. Failures show the server's message instead of failing silently.

📝

Notebook Scratchpad

SQL and results in one flowing document. ⌘⏎ runs the statement under your caret and inlines the result. Pivot or chart any result in place.

📋

Editable Data Grid

Edit any cell on a table with a primary key, Apply as one transaction. Or flip to a single-row form view. Filter, sort, paginate, distinct-values, FK ⌘-click navigation.

🗺️

ERD & Schema Tools

Relationship diagrams, a structure pane with constraints, indexes, triggers and partitions, plus editors for functions, views, columns, schemas, and databases.

🧰

Full DBA Toolkit

Live activity, locks, index usage, pg_stat_statements, size dashboard, roles & grants, replication, LISTEN/NOTIFY, VACUUM/ANALYZE/REINDEX, and psql \\d commands.

🛑

Production Guardrails

Flag a connection as PROD → red chrome everywhere. Unscoped DELETE/UPDATE/TRUNCATE/DDL prompts before it runs. Cancellation actually stops the server-side query.

🍎

Properly Native

SwiftUI chrome, AppKit grid. Respects your trackpad, dark mode, and battery. SSH tunnels, Keychain-stored passwords, signed + notarized, Sparkle auto-update.

Who It's For

Anyone who lives in Postgres on a Mac

👩‍💻

Backend Developers

Live in the notebook, edit rows inline, jump foreign keys, and keep prod safely red while you ship.

🛠️

DBAs

Activity, locks, slow queries, sizes, roles, replication, maintenance — the whole panel set, one keystroke away.

📊

Data People

Explore, pivot, and chart results without leaving the app; export CSV/JSON/SQL at any size with flat memory.

Under the Hood

Pure Swift, no wrappers

Language   Swift 6, strict concurrency
UI   SwiftUI chrome + AppKit grid
Driver   PostgresNIO (pure Swift, async)
Transport   SSH tunnels + streaming COPY
Spatial   PostGIS-aware + MapKit maps
Secrets   macOS Keychain
Updates   Sparkle, signed + notarized

Requirements

💻

macOS 15+

Sequoia or later

🦾

Apple Silicon

arm64 Mac

🐘

Any Postgres

Local, RDS, or via SSH

// screenshots