Skip to content
← All projects
Product · 2026 Data & Postgres

pgquire A Postgres Workbench in One HTML File

A single-file Postgres workbench that runs a real PostgreSQL (PGlite) entirely in your browser. Add its small Go server and the same page works against your real Postgres servers, with read-only guard rails and an optional AI clerk.

Live ↗ Source ↗

pgquire

pgquire (“inquire into Postgres”) is a Postgres workbench with a ledger-inspired interface, shipped as one self-contained HTML file with no build step. On its own it runs a real PostgreSQL via PGlite inside the browser tab. Nothing leaves your machine unless you ask for it. Run it through its small Go server and the same page also connects to remote Postgres databases, which sit in the database switcher next to the in-browser ones.

Key Features

  • Browse and edit: a schema-grouped index, a grid with paging, sorting, SQL filters and in-place edits (with undo), row details that follow foreign keys both ways, and a structure view with the table’s CREATE statement
  • Query: a SQL editor that keeps every statement’s result, CSV export, .sql files and pg_dump scripts run in chunks with progress, transactions that stay open across runs, saved queries and a journal of everything run
  • Design: visual table creation, CSV import with inferred types, a whole-schema ERD exportable as SVG, PNG, Mermaid or DBML, and 33 extensions (vectors, PostGIS, fuzzy search…) loaded on demand
  • The Clerk (optional AI): any OpenAI-compatible endpoint reads the schema, runs queries and writes SQL, and every change waits for your approval. The API key lives only in the tab’s memory
  • Move data: many databases per browser, SQL dumps, exact clones, .pgquire session files, and share-as-link with the data in the URL fragment, optionally encrypted
  • Command palette: Ctrl K jumps to a table, database or command, runs SQL, or asks the Clerk

pgquire table view with the Clerk panel open

Remote Postgres, Carefully

The optional Go server embeds the same page and holds the credentials. Passwords never reach the browser.

  • Listens on 127.0.0.1 only, behind a per-run token
  • Production connections get a red marker, start read-only and confirm before any write
  • Read-only is checked against what the login can actually do. If it can write, pgquire offers to create a true read-only login (pg_read_all_data, or per-schema grants before PostgreSQL 14)
  • Statement and idle-transaction timeouts, stoppable queries, and results capped in the page while CSV export streams every row
  • Copy to a local database pulls a sample of chosen tables (and the tables they reference) into the browser for safe experimenting

Tech Stack

  • PGlite for PostgreSQL compiled to WebAssembly, persisted in IndexedDB
  • Vanilla JavaScript, HTML and CSS in a single file, with two themes (“Ledger” and “Prism”), each in day and night
  • Go server for remote connections, with go generate producing the GitHub Pages build from the server’s page
  • Release binaries for Linux, macOS and Windows (amd64 and arm64) built by GitHub Actions

Read next

Closest to this one
  1. 01AttenzoProduct · 2025
  2. 02AccuServeProduct · 2023
  3. 03postgres-pgbackrest-docker ↗Open source · 2022