- 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
- 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
- Switch databases on the current connection
- Securely store passwords in the OS keychain
go install github.com/wheelibin/qrypad@latest
https://github.com/wheelibin/qrypad/releases
qrypad [connection name]
[connection name]must match an entry in the config file (see below)- Passwords will be prompted once, then stored securely
Config is read from ~/.config/qrypad/config.toml
# 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"Default Key Bindings
Tab/Shift+Tab- switch panelsF1- show helpF2- switch databaseF3- update stored password/- filter tables (escto cancel)Ctrl+T- toggle left-side (tables/info)
Enter- fetch first 100 rows]/[- switch tabsc- copy selected table name
]/[- switch tabsc- copy selected column/index name/- filter columns (escto cancel)
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
enter- show full row data in popupc- copy selected value
c- copy selected row as JSON/- filter results (escto cancel)
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 = ""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"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 = "" }