A fast, driver-less TUI to browse, query, and edit PostgreSQL databases — no drivers, no setup, just psql.
Vim-first · Safe by design · Oil-and-vinegar UI · Fast and lightweight
sabiql wraps your existing psql CLI. No Rust database drivers, no connection pools, no extra dependencies. Point it at your database and get a full-featured TUI. Your psql config, .pgpass, SSL setup all just work.
Inspired by oil.nvim's "oil and vinegar" philosophy: UI elements appear only when needed, never occupying your screen permanently. Vim-native keybindings (j/k, dd, /) let you navigate and edit without leaving your muscle memory.
Destructive operations are guarded. Inline edits and row deletions always show a preview modal before touching your data.
Built in Rust for minimal memory footprint and near-zero idle CPU. A full-featured alternative to GUI tools like DBeaver or DataGrip, without ever leaving the terminal.
- SQL Modal (
s) — Ad-hoc queries with auto-completion for tables, columns, and keywords; browse past results withCtrl+H - ER Diagram (
e) — Generate relationship diagrams via Graphviz, opened instantly in your browser - Inspector Pane (
2) — Column details, types, constraints, and indexes for any table
- Inline Cell Editing (
ein Result) — Edit cells in-place with a guarded UPDATE preview before committing - Row Deletion (
ddin Result) — DELETE with mandatory preview; risk level color-coded (yellow/orange/red) - Yank (
y) — Copy any cell value to clipboard - CSV Export (
Ctrl+E) — Export query results to a CSV file
- Fuzzy Search (
/) — Incremental table filtering - Focus Mode (
f) — Expand any pane to full screen - Command Palette (
Ctrl+K) — Searchable command list
# macOS / Linux
brew install riii111/sabiql/sabiql
# Cargo (crates.io)
cargo install sabiql
# Arch Linux (AUR)
paru -S sabiql # or yay -S sabiql
# FreeBSD (ports)
cd /usr/ports/databases/sabiql/ && make install clean
# Install script
curl -fsSL https://raw.githubusercontent.com/riii111/sabiql/main/install.sh | shsabiqlOn first run, enter your connection details — saved to ~/.config/sabiql/connections.toml. Press ? for help.
psqlCLI (PostgreSQL client)- Graphviz (optional, for ER diagrams):
brew install graphviz
| Variable | Description |
|---|---|
SABIQL_BROWSER |
Browser for ER diagrams (e.g., Arc, Firefox). macOS uses open -a; falls back to OS default. |
- Connection UI
- Focused ER diagrams
- Expanded viewport / horizontal scrolling
- Google Cloud SQL / AlloyDB support
- MySQL support
MIT — see LICENSE.

