Cross-platform SQL editor and database manager for Linux, macOS, and Windows, supporting MySQL, PostgreSQL, SQLite, SQL Server and many more.
- Stars
- 3,247
- Forks
- 92
- Open issues
- 15
- Last commit
- 3 days ago
What is it?
dblab is an interactive terminal UI for browsing and querying PostgreSQL, MySQL, SQLite3, Oracle and SQL Server databases. It ships as a single Go binary with no runtime dependencies and runs on macOS, Linux and Windows. The sidebar shows the database catalog as a tree, and selecting a table loads its rows, columns, indexes and constraints into a result panel.
The query editor uses Vim-style normal and insert modes, and can run either the whole buffer or only the statement on the current line. Multiple semicolon-separated statements run concurrently, each with its own result tab. Queries are saved to a local history that can be searched and reloaded.
Connections can be made with flags, a connection URL, or a YAML config file, and can go through an SSH tunnel or a Unix socket. Profiles are saved with passwords kept in the OS keyring. A `--readonly` option forces a read-only session, and key bindings can be customized per panel.
Key features
- 01Browses database schemas, tables, columns, indexes and constraints in a sidebar tree
- 02Vim-style query editor with normal and insert modes, undo/redo and visual selection
- 03Runs multiple semicolon-separated queries concurrently, each in its own result tab
- 04Saves connection profiles with passwords stored in the OS keyring
- 05Supports read-only sessions, SSH tunnels, Unix sockets and SSL options for PostgreSQL
- 06Distributed as a single binary for macOS, Linux and Windows
Use cases
- Querying a local SQLite file or a development PostgreSQL instance from a terminal over SSH
- Browsing a production database safely with the read-only flag
- Keeping a searchable history of ad hoc SQL across sessions
- Switching between saved connections to several database servers
Quick start
- 1
Install via Homebrew
brew install --cask danvergara/tools/dblab - 2
Connect to a SQLite database file
dblab --db path/to/file.sqlite3 --driver sqlite
Things to know
- Oracle and SQL Server support is listed in the description, but the Overview mentions only PostgreSQL, MySQL and SQLite3.
In collections
Topics
FAQ
- What is dblab?
- A terminal UI database client for PostgreSQL, MySQL, SQLite3, Oracle and SQL Server, written in Go. dblab is an interactive terminal UI for browsing and querying PostgreSQL, MySQL, SQLite3, Oracle and SQL Server databases. It ships as a single Go binary with no runtime dependencies and runs on macOS, Linux and Windows. The sidebar shows the database catalog as a tree, and selecting a table loads its rows, columns, indexes and constraints into a result panel.
- Is dblab free to use? What license does it have?
- dblab is open source under the MIT license. Check the license terms before using it in commercial products.
- Is dblab still maintained?
- Actively maintained. The last commit to dblab was on Nov 4, 2026.
- What can I use dblab for?
- Querying a local SQLite file or a development PostgreSQL instance from a terminal over SSH Browsing a production database safely with the read-only flag Keeping a searchable history of ad hoc SQL across sessions Switching between saved connections to several database servers
- How do I install dblab?
- Install via Homebrew: brew install --cask danvergara/tools/dblab Connect to a SQLite database file: dblab --db path/to/file.sqlite3 --driver sqlite
- Where can I get dblab?
- The source code and installation instructions are on GitHub: https://github.com/danvergara/dblab
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A terminal (TUI) database client for PostgreSQL, MySQL, SQLite, DuckDB and more, with vim-style keybindings.
A terminal SQL IDE with a built-in DuckDB client and plug-in adapters for many databases, plus a headless companion CLI, hsql, for agents and scripts.
A keyboard-driven terminal UI for connecting to and querying many SQL databases, inspired by lazygit.
A free, open source native database client for macOS and iOS supporting SQL and NoSQL databases, with built-in AI chat and an MCP server.
AI-powered database client and MCP server for desktop and web, supporting Postgres, MySQL, MariaDB, SQL Server, ClickHouse and SQLite.