A terminal-based database management tool, focused on database operations across multiple database engines.
Runtime dependencies (required for all users):
The pre-built binary requires these system libraries to run:
libncursesw6- Terminal UI librarylibpq5- PostgreSQL client library
Install on your system:
Ubuntu/Debian:
sudo apt install libncursesw6 libpq5Fedora/RHEL/CentOS:
sudo dnf install ncurses-libs postgresql-libsArch Linux:
sudo pacman -S ncurses postgresql-libsmacOS:
brew install ncurses postgresqlBuild dependencies (only if building from source):
- Zig 0.15.2 or later
- Development headers:
libncursesw5-devandlibpq-dev(Ubuntu/Debian)
On Ubuntu/Debian (for building):
sudo apt install libncursesw5-dev libpq-devDirect install from GitHub (fastest):
curl -sSL https://raw.githubusercontent.com/sajonaro/dbc/master/install-binary.sh | bashWith custom installation prefix:
curl -sSL https://raw.githubusercontent.com/sajonaro/dbc/master/install-binary.sh | PREFIX=/usr/local bashSpecific version:
curl -sSL https://raw.githubusercontent.com/sajonaro/dbc/master/install-binary.sh | VERSION=v0.1.0 bashSupported platforms:
- Linux x86_64
Using install script:
curl -sSL https://raw.githubusercontent.com/sajonaro/dbc/master/install.sh | bashOr clone and build:
git clone https://github.com/sajonaro/dbc.git && cd dbc && ./install.shgit clone https://github.com/sajonaro/dbc.git && cd dbc && zig build -Doptimize=ReleaseSafe --prefix ~/.local && echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc && source ~/.bashrczig fetch --save git+https://github.com/sajonaro/dbc.gitAfter installation, you can use dbc in the following ways:
# Start dbc with an empty editor
dbc
# Load a SQL file into the editor
dbc query.sql
# Display help message
dbc --help
dbc -h
dbc ?- No arguments: Starts dbc with an empty editor
- FILE: Opens the specified SQL file in the editor panel
- --help, -h, ?: Displays usage information and exits
# Start dbc and begin writing queries
dbc
# Open an existing query file
dbc /path/to/my-query.sql
# Get help
dbc --help- ARCHITECTURE.md - Architecture documentation, design principles, and key bindings
- STRUCTURE.md - Project structure and file organization
zig buildzig build runzig build test- PostgreSQL (via libpq)
- SQLite (via sqlite3)
- MSSQL (via ODBC)
- MariaDB (via mariadb client library)
- ncurses (for TUI)
- libpq (PostgreSQL)
- sqlite3
- ODBC drivers (for MSSQL)
- MariaDB client library