
dblab
Interactive terminal-based database client for PostgreSQL, MySQL, SQLite3, Oracle, and SQL Server
dblab is a terminal-based interactive database client written in Go that supports PostgreSQL, MySQL, SQLite3, Oracle, and SQL Server. It provides a TUI interface for database operations and query execution across multiple database systems through a single binary application.
The tool features a Vim-style query editor with normal and insert modes, supporting line-oriented editing commands. It includes cross-platform support for macOS, Linux, and Windows, distributed as a zero-dependency binary. dblab supports both direct database connections and SSH tunneling for remote database access, with SSL connection options for PostgreSQL.
Connection methods include command-line flags for individual parameters or URL schemes for different database types. The tool supports Unix socket connections for MySQL/MariaDB and PostgreSQL, and includes configuration file support to avoid entering connection details repeatedly. Users can specify result set limits, database schemas, and various SSL parameters for secure connections.
Installation
# via Homebrew
brew install --cask danvergara/tools/dblab
# via Shell script
curl https://raw.githubusercontent.com/danvergara/dblab/master/scripts/install_update_linux.sh | bash


Alternatives & related tools
litecli
Command-line client for SQLite databases with auto-completion and syntax highlighting.
jqp
A terminal UI for running jq queries interactively against JSON or NDJSON input, using the gojq implementation, with themes and query history.
angle-grinder
Command-line log analysis tool that parses, filters, and aggregates log data with a pipeline query language and a live-updating terminal UI.
gojq
Pure Go implementation of jq command-line JSON processor with arbitrary-precision arithmetic and YAML support
qsv
Rust CLI toolkit of composable commands for querying, transforming, validating, joining, and describing CSV, Excel, and other tabular data.
add a badge to your README
Maintain dblab? Show that it's featured on trmn. The badge links back to this page.
[](https://www.trmn.sh/tools/dblab?utm_source=badge)<a href="https://www.trmn.sh/tools/dblab?utm_source=badge"><img src="https://www.trmn.sh/badge/dblab.svg" alt="Featured on trmn" height="20"></a>