8000 GitHub - danvergara/dblab: The database client every command line junkie deserves. · GitHub
[go: up one dir, main page]

Skip to content
danvergaraPublic

About

The database client every command line junkie deserves.

Topics

Resources

Code of conduct

Contributing

Stars

3.3k stars

Watchers

12 watching

Forks

Repository files navigation

dblab

integration tests unit tests Release

dblab logo

Interactive client for PostgreSQL, MySQL, SQLite3, Oracle and SQL Server.


Documentation: https://dblab.app


Table of contents

Overview

dblab is a fast and lightweight interactive terminal-based UI application for PostgreSQL, MySQL, and SQLite3, written in Go and works on macOS, Linux, and Windows machines. The main idea behind using Go for backend development is to utilize the ability of the compiler to produce zero-dependency binaries for multiple platforms. dblab was created as an attempt to build a very simple and portable application to work with local or remote PostgreSQL/MySQL/SQLite3/Oracle/SQL Server databases.

Features

  • Cross-platform support for macOS/Linux/Windows (32/64-bit)
  • Simple installation (distributed as a single binary)
  • Zero dependencies.
  • Vim-style query editor backed by a real modal-editing engine (goeditor): normal/insert modes, word and line motions, undo/redo, visual mode selection, and in-buffer search, on top of the line-oriented editing commands.
  • Multi-query execution: write multiple SQL statements separated by ; and run them concurrently with results displayed in separate tabs.
  • Single-query execution: press ctrl+r to execute only the query on the current cursor line, without running other statements in the editor.
  • Cell inspection with text and JSON panels: append | text or | json to a single-column query to inspect large text values or formatted/highlighted JSON documents in a dedicated scrollable text panel instead of a table cell.
  • Connection profiles with secure credential storage in the OS keyring.
  • Query history: executed queries are persisted across sessions and can be browsed/re-used via a filterable list.
  • Read-only mode: use --readonly to prevent accidental writes by forcing the database session into read-only mode (supported for PostgreSQL, MySQL, SQLite, Oracle, and SQL Server).
  • Schema switching: press ctrl+s to pick the active schema from a filterable list without restarting the app (PostgreSQL and Oracle, when no schema was pinned at startup); the active schema is always shown in the status bar.
  • Built-in help modal: press ? to display a help overlay showing all available key bindings; press Esc to dismiss it.
  • Full-screen mode: press alt+f to expand the focused query editor or result set panel to fill the terminal; press Esc to exit.
  • Per-panel key bindings: the query editor, the sidebar tree, the result set panel and the panel navigation each have their own section in .dblab.yaml, so every panel can be rebound independently.
  • Customizable themes: choose from cyberpunk (default), catppuccin, tokyonight, gruvbox, nord, dracula, monokai, and onedark using the --theme flag or the configuration file.

Installation

Homebrew

It works with Linux, too.

brew install --cask danvergara/tools/dblab

Or

brew tap danvergara/tools
brew install --cask dblab

Binary Release (Linux/macOS/Windows)

You can manually download a binary release from the release page.

Automated installation/update

Don't forget to always verify what you're piping into bash

Install the binary using our bash script:

curl https://raw.githubusercontent.com/danvergara/dblab/master/scripts/install_update_linux.sh | bash

Help