dblab
The database client every command line junkie deserves.
What is dblab?
The database client every command line junkie deserves.
Overview of dblab
What it is
dblab is an interactive terminal-based UI application for PostgreSQL, MySQL, SQLite3, Oracle, and SQL Server. It is written in Go and distributed as a single zero-dependency binary for macOS, Linux, and Windows. The project aims to provide a simple and portable tool for working with local or remote databases.
Key features
- Cross-platform support for macOS, Linux, and Windows (32/64-bit).
- Vim-style query editor with normal/insert modes, word and line motions, undo/redo, visual mode selection, and in-buffer search.
- Multi-query execution: write multiple SQL statements separated by
;and run them concurrently with results in separate tabs. - Single-query execution: press ctrl+r to execute only the query on the current cursor line.
- Cell inspection with text and JSON panels by appending
| textor| jsonto a single-column query. - Connection profiles with secure credential storage in the OS keyring.
- Query history persisted across sessions with a filterable list.
- Read-only mode via
--readonlyflag to prevent accidental writes. - Schema switching for PostgreSQL and Oracle using ctrl+s.
- Built-in help modal (press ?) and full-screen mode (alt+f).
- Customizable themes: cyberpunk (default), catppuccin, tokyonight, gruvbox, nord, dracula, monokai, and onedark.
Use cases
- Database administrators and developers who prefer a terminal-based workflow.
- Managing multiple database connections (PostgreSQL, MySQL, SQLite3, Oracle, SQL Server) from a single TUI.
- Running and inspecting SQL queries interactively with Vim-style editing.
- Browsing table schemas and data without leaving the terminal.
- Working with remote databases via SSH tunnel or SSL.
Getting started
Install via Homebrew (Linux and macOS): brew install --cask danvergara/tools/dblab Or manually download a binary from the release page. For automated installation on Linux: sh curl https://raw.githubusercontent.com/danvergara/dblab/master/scripts/install_update_linux.sh | bash Start the app with connection flags: sh dblab --host localhost --user myuser --db users --pass password --ssl disable --port 5432 --driver postgres --limit 50
License and pricing
This project is licensed under the MIT license. It is open source and free to use.
Based on the project's public README and repository metadata.