pgbrowser

A k9s-style terminal UI for PostgreSQL. Split-panel browsing with live preview, detail tabs, and a built-in SQL query editor — right from your CLI.

pgbrowser
pgbrowser  davymca@localhost:5432/pgbrowser_test

┌─ Tables ────────────┐┌─ ecommerce.orders ────────────────────────┐
 TABLE            EST   Columns | Indexes | Data               
 customers         30    id          bigint    NOT NULL    
 orders            60    user_id     integer   NOT NULL    
 order_items      120    total       numeric   NOT NULL    
 products          50    status      varchar   NOT NULL    
 categories        12    created_at  timestamp NOT NULL    
 reviews           89  ├──────────────────────────────────────────┤
                       Query                                    
                       SELECT * FROM orders LIMIT 10            
                       ID  USER_ID  TOTAL   STATUS              
                        1       42  29.99   shipped             
                        2       17  149.00  pending             
                        3        8  74.50   delivered           
└──────────────────────┘└──────────────────────────────────────────┘

Databases > pgbrowser_test > ecommerce > Tables
<Tab> Panel  <Ctrl+E> Run  <[/]> Tab  </> Filter  <Esc> Back  <q> Quit

What you get

🗂

Split-panel layout

Left panel lists items, right panel shows a live preview that updates as you move the cursor. See table structures, indexes, and data without pressing Enter.

📝

Built-in SQL query editor

Write and execute SQL queries right inside pgbrowser. The query panel auto-fills with a useful default, and results appear inline. Press Ctrl+E to run.

🔍

Live fuzzy filtering

Press / and start typing to instantly narrow any list. Filtering applies to whichever panel has focus. Find that table among hundreds without scrolling.

📊

Table detail at a glance

Tab through Columns, Indexes, and Sample Data (first 50 rows) for any table. See types, nullability, defaults, and index definitions without writing SQL.

Fast row count estimates

Row counts use PostgreSQL planner statistics — no full table scans. Get instant estimates even on tables with billions of rows.

Keyboard-driven

Vim-style j/k navigation, Tab to cycle panels, command mode with :, and context-sensitive key hints. No mouse needed.

Built for people who live in the terminal

Whether you're debugging a production issue at 2am or onboarding onto a new codebase, pgbrowser gets you the answers you need without leaving your terminal.

Developers

  • Quickly inspect table structures while building features
  • Run ad-hoc queries in the built-in SQL editor without leaving the TUI
  • Browse unfamiliar databases when onboarding to a project
  • Verify schema changes after running migrations

Database Administrators

  • Audit schemas, indexes, and table structures across databases
  • Spot missing indexes with a quick browse through table details
  • Check row counts and data distribution without full scans
  • Run quick investigative queries with the built-in SQL panel

Platform Engineers

  • Inspect shared PostgreSQL clusters across multiple services
  • Verify database state during deployments and rollbacks
  • Quick sanity checks on schema consistency across environments
  • Single binary — no Python, no dependencies, just download and run

Get started in 30 seconds

Homebrew (macOS / Linux)

brew tap zagware/tap brew install pgbrowser

Recommended for most users. Auto-updates via brew upgrade.

Direct download

Visit github.com/zagware/pgbrowser-dist Download the latest release for your OS

Pre-built binaries for macOS (Intel + Apple Silicon), Linux, and Windows.

Connect and browse

pgbrowser --url "postgres://user@host/db"

Pass your connection string and start browsing immediately.

Key bindings

Key Action
j / k / arrowsMove up/down in lists
EnterDrill into selected item
EscGo back one level
TabCycle focus between panels
/Live fuzzy filter (focused panel)
:Command mode
[ / ]Switch tabs in table detail
Ctrl+EExecute SQL in query panel
qQuit

Try it out

pgbrowser is free to download. Grab the latest release and point it at any PostgreSQL database.

Download from GitHub