Prisma4Postgres is a standalone Electron desktop app for exploring and managing PostgreSQL databases. No VS Code required, no CLI wrappers, no config files — just connect and explore.
| Platform | File |
|---|---|
| 🪟 Windows | .exe (NSIS installer) |
| 🐧 Linux (Debian/Ubuntu) | .deb |
| 🐧 Linux (Fedora/RHEL) | .rpm |
| 🐧 Linux (Arch/Manjaro) | AUR: prisma4postgres-bin |
- Tree view of all schemas, tables, views, and functions
- Folder icons matching OpenBase.Icons style — open/closed per node state
- Column details with PK / FK badges and data types
- Estimated row count badges (optional, configurable)
- Real-time filter/search across tables and columns
- Drag handle to resize the sidebar
- Double-click a connection to connect to the database
- Double-click a table to open its detail tab
- Create Table icon on each connected connection — opens the visual table creator pre-wired to that database
- Monaco editor with SQL syntax highlighting and live autocomplete
- Multi-tab queries — each tab shows an SQL file icon + name
Ctrl+EnterorF8to run (runs selection if text is selected)Ctrl+Tto open a new query tab from anywhere in the appShift+Alt+Fto format SQL (keywords uppercase, clause newlines)- Connection selector per tab
- Resizable split between editor and results (drag handle)
- Cancel button stops a running query via
pg_cancel_backend - Auto-reconnect on connection drop (retries once silently)
- Compact
sql>input bar — toggle with the⌘button in the toolbar - Enter executes immediately against the active connection
- ↑ / ↓ navigates a 20-entry command history
- Escape clears the field
- Visibility persisted across sessions
- Result grid with NULL highlighting
- Click any row to open a key:value detail panel on the right
- Copy results as CSV, JSON, or Markdown to clipboard (no dialog)
- Export results as CSV or JSON via save dialog
- One-click
EXPLAIN (ANALYZE, BUFFERS, FORMAT JSON)via Explain button - Expandable node tree with cost, actual time, and row counts
- Expensive nodes highlighted (Seq Scan, high relative cost)
- Toggle between tree view and raw JSON
- Full DDL viewer with Monaco read-only (
CREATE TABLEreconstructed frompg_catalog) - Indexes & constraints panel (size, type badges, definitions)
- FK Map — outgoing and incoming foreign keys, click to navigate tree
- Per-table tabs opened from the Explorer (icon or double-click)
- Columns with full type, nullable, default, PK / FK badges
- Constraints, indexes with size, and FK map sections
- Run SELECT — opens a pre-filled query in the editor
- Copy model — generates a Prisma
model {}block for the table and copies to clipboard
- GUI form to define a new table — no SQL required
- Column editor: name, type (20 PostgreSQL types), length, nullable, default, PK
- Live
CREATE TABLESQL preview as you type - Copy SQL copies the DDL to clipboard
- Execute runs against the selected database and refreshes the Explorer on success
- Accessible from the Create Table icon on any connected connection
- Activity tab shows live
pg_stat_activityfor the selected connection - Auto-refreshes every 5 seconds (toggle checkbox)
- Long-running queries highlighted (> 5s amber, > 30s red)
- Cancel individual queries per row via
pg_cancel_backend
- Last 50 queries, searchable, click to restore in editor
| Shortcut | Action |
|---|---|
Ctrl+Enter |
Run query (or selection) |
F8 |
Run query (or selection) |
Ctrl+T |
New query tab |
Shift+Alt+F |
Format SQL |
Ctrl+Z / Ctrl+Y |
Undo / Redo in editor |
- Click + in the Explorer sidebar header
- Fill in host, port, database, user, and optional password
- Click Test to verify connectivity, then Save
- Double-click a connection to connect, or click the plug icon
- Expand the tree: schema → Tables & Views → columns
- Double-click a table to open its detail tab
- Switch to the Query tab
- Select your connection from the dropdown
- Write SQL and press
F8(orCtrl+Enter) - Results appear in the bottom pane; drag the divider to resize
- Click any row to see its full key:value breakdown on the right
- Use the clipboard copy buttons (CSV / JSON / MD) or Export to save to file
Toggle the sql> bar with the ⌘ button in the query toolbar. Type a statement, press Enter to run. Use ↑ / ↓ to browse history.
Click the table icon (⊞) on any connected connection in the Explorer. Fill in the column form, check the live SQL preview, and click Execute.
With a SELECT query in the editor, click Explain to see the full query plan tree with cost and timing for each node.
Switch to the Activity tab, select a connection, and click Refresh (or enable auto-refresh). Long-running queries are highlighted; click Cancel to stop them.
Settings are stored in the app's user-data directory (userData/settings.json).
| Setting | Default | Description |
|---|---|---|
queryTimeout |
30000 |
Query timeout (ms) |
defaultPort |
5432 |
Pre-filled port for new connections |
defaultSsl |
false |
SSL enabled by default for new connections |
showRowCount |
false |
Show estimated row count badges in the Explorer |
Passwords are encrypted with electron.safeStorage and stored separately in userData/passwords.json.
- Left sidebar always visible, drag handle to resize (160–600 px, persisted)
- Right area holds Query, History, Activity tabs + dynamic table detail tabs
- Query/Results split resizable (default 50/50, persisted per session)
- Row detail panel slides in on the right when you click a result row
- Node.js 20+ (via nvm recommended)
- npm
git clone https://github.com/britors/Prisma4Postgres.git
cd Prisma4Postgres
npm installnpm run devnpm test46 unit tests covering PgConnection validation, PrismaParser, and ConnectionManager.
npm run packageProduces an AppImage (Linux), dmg (macOS), or NSIS installer (Windows) in dist/.
| Layer | Technology |
|---|---|
| Shell | Electron 29 |
| Language | TypeScript 5 |
| DB driver | node-postgres (pg) |
| SQL editor | Monaco Editor 0.45 (CDN) |
| Icons | OpenBase.Icons style (inline SVG) |
| Theme | OpenBase.Theme colors |
| Build | esbuild |
| Tests | Node built-in node:test + tsx |
See CONTRIBUTING.md for setup instructions, architecture overview, and coding guidelines.
Found a bug or have a feature request? Open an issue.
MIT © Rodrigo Brito
