sabiql
Fast, safe-by-design, Vim-first DB TUI with ER diagrams.
Concept
Vim-first · Safe by design · Oil-and-vinegar UI · Fast and lightweight
sabiql brings database browsing, querying, and editing into the terminal while using the native CLI for each database. PostgreSQL connections can reuse existing libpq connection settings such as .pgpass, pg_service.conf, and SSL settings.
Like oil.nvim, sabiql keeps its interface out of your way. Following oil.nvim's "oil and vinegar" philosophy, UI elements appear only when needed. Vim-native keybindings such as j/k, dd, and / keep navigation and editing familiar.
Safety follows a plan-before-apply flow familiar from Terraform: inline edits and row deletions show the SQL and its risk level before you confirm the change. Read-only mode (Ctrl+R) also blocks writes at the database client level.
Features
- Browse and inspect — Find tables with fuzzy search, inspect columns, constraints, indexes, foreign keys, triggers, and DDL
- Run SQL — Write ad-hoc queries with completion for tables, columns, and keywords, then recall them from query history
- Edit with previews — Update cells or delete rows only after reviewing the SQL and its risk level
- Browse in read-only mode (
Ctrl+R) — Block writes while investigating data - Analyze queries — View and compare PostgreSQL or MySQL execution plans, or inspect SQLite query plans
- Work with data — Copy cell values, export CSV, and inspect or edit PostgreSQL and MySQL JSON documents
- Visualize relationships — Generate PostgreSQL and MySQL ER diagrams with Graphviz and open them in your browser
Press ? inside sabiql to see all commands and keybindings.
Installation
# macOS / Linux
# Cargo (crates.io)
# Nix
# Run once with Nix, without installing
# Windows x86_64 (experimental)
# Download sabiql-x86_64-pc-windows-msvc.zip from GitHub Releases,
# extract sabiql.exe, and add its directory to PATH.
# Arch Linux (AUR)
# Void Linux (Unofficial Repo)
|
# FreeBSD (ports)
&&
# Install script
|
Database Setup
sabiql uses the CLI for the database you want to open:
- To use PostgreSQL: install
psql - To use MySQL: install the Oracle MySQL
mysqlCLI 8.4.x. Oracle MySQL servers 5.7, 8.0, and 8.4 can be connected to; 8.4 is the continuously validated server version and older or newer Oracle server versions are not fully guaranteed. - To use SQLite: macOS includes
sqlite3by default. Check that it is version 3.41.1 or later; additional installation is usually unnecessary. On Linux and other platforms, installsqlite3version 3.41.1 or later.
Graphviz is required only for PostgreSQL and MySQL ER diagrams. The Homebrew Core formula installs it automatically; other installation methods may require installing it separately.
Windows support is experimental.
See MySQL support and limitations and SQLite support and limitations for supported versions and database-specific limitations.
Quick Start
Launch sabiql and enter your connection details:
You can also open an existing SQLite database directly:
Use Ctrl+R before browsing data when you want to block writes. Press ? for help, or open Settings with , to change the theme and keymap.
Roadmap
- Connection management UI
- ER diagram generation
- Read-only mode (
Ctrl+R) - SQL modal with DML/DDL safety guardrails
- Query history persistence & fuzzy search
- CSV export & clipboard yank
- EXPLAIN workflow (plan tree view & comparison)
- JSON/JSONB support (tree view, editing, validation)
- Theme switching (Sabiql Dark / Light)
- SQLite support
- MySQL support
- Neovim integration (
sabiql.nvim) - Connection auto-detection (environment variables, URI)
- Google Cloud SQL / AlloyDB support
Have a feature request? Open an issue. Feedback is welcome!
License
MIT — see LICENSE.