Features
๐ Quick Exploration
- Supports Postgres / MySQL / SQLite
- View a snapshot of the selected table with one keypress
- Automatically display columns and indexes for the current table
- Filter result sets interactively to refine your queries
โ๏ธ Query Editing
- Write and manage multiple queries in the query pad
- Run the current statement with a single keypress
- Save queries per connection for easy reuse
- Syntax-highlighted query pad for better readability
๐ Connection Management (Postgres / MySQL only)
- Switch databases on the current connection
- Securely store passwords in the OS keychain
Installation
Go Install
go install github.com/wheelibin/qrypad@latest
Binary Install
https://github.com/wheelibin/qrypad/releases
Usage
qrypad [connection name]
[connection name]must match an entry in the config file (see below)- Passwords will be prompted once, then stored securely
Config
Config is read from ~/.config/qrypad/config.toml
example config file
# the timeout for all queries queryTimeout = 60 # the max number of rows to fetch when viewing table data (does not apply to ad-hoc queries) tableDataRowLimit = 100 # color theme [theme] name = "catppuccin-mocha" [connections] [connections.animals] driver = "mysql" host = "localhost" port = 3306 user = "root" database = "animals.0" [connections.music] driver = "postgres" host = "localhost" port = 5432 user = "postgres" database = "music-store" [connections.orders] driver = "sqlite" database = "db/orders.db"
โจ๏ธ Key Bindings
Default Key Bindings
๐งญ General
Tab/Shift+Tab- switch panelsF1- show helpF2- switch databaseF3- update stored password/- filter tables (escto cancel)Ctrl+T- toggle left-side (tables/info)
๐ Tables Panel
Enter- fetch first 100 rows]/[- switch tabsc- copy selected table name
๐ Table Info Panel
]/[- switch tabsc- copy selected column/index name/- filter columns (escto cancel)
๐งพ Queries Panel
F5- run current queryCtrl+S- save query pad (saved per connection)Ctrl+R- reload saved query pad fileCtrl+E- open query pad in external editor
๐ Results Panel
enter- show full row data in popupc- copy selected value
c- copy selected row as JSON/- filter results (escto cancel)
Custom Key Bindings
You can override various key bindings using the following config key. The keys possible to override are shown below.
[keys] CopyValue = "y" ExecuteQuery = "" Help = "" NextPanel = "" NextTab = "" OpenInEditor = "" PrevPanel = "" PrevTab = "" ReloadQuery = "" SaveQuery = "" SwitchDatabase = "" ToggleLeftPanel = "" UpdatePassword = "" ViewData = "" ViewDataDesc = ""
๐ Themes
Built-in Themes
There are currently the following built-in themes:
catppuccin-mocha(the default)kanagawa-waverose-pine-moon
You can change the theme using the following config key
[theme] name = "kanagawa-wave"
Customising / Creating Themes
You can customise an existing theme by overriding individual colours.
[theme] name = "rose-pine-moon" borderActive = { fg = "#ff00ff" }
To create a new theme, simply give it a new name and set the colours.
[theme] name = "my-custom-theme" borderActive = { bg = "", fg = "#ff00ff" } currentStatement = { bg = "", fg = "" } databaseSwitcherPopup = { bg = "", fg = "" } error = { bg = "", fg = "" } helpPopup = { bg = "", fg = "" } helpKey = { bg = "", fg = "" } helpDesc = { bg = "", fg = "" } panelTitle = { bg = "", fg = "" } panelTitleActive = { bg = "", fg = "" } rowDetailsPopup = { bg = "", fg = "" } spinner = { bg = "", fg = "" } statusBar = { bg = "", fg = "" } tableBorder = { bg = "", fg = "" } tableHeader = { bg = "", fg = "" } text = { bg = "", fg = "" } titleBar = { bg = "", fg = "" } titleBarAlt = { bg = "", fg = "" }

