A terminal SQL client for Postgres, MySQL and SQLite.
- Table / column autocomplete in the query pad
- Run the statement under the cursor
- Syntax highlighting
- Filter tables, columns and result sets
- View a snapshot of any table with a single keypress
- Browse tables, views, columns, indexes and constraints
- Switch between configured connections without restarting
- Switch databases on the current connection (Postgres / MySQL)
- Postgres schema support — switch schemas on the fly
- Inspect a full result row in a popup, with long values wrapped across lines
- Save and reload a query pad per connection, or open it in
$EDITOR - Export results to JSON or CSV
- Configurable key bindings and themes
- Passwords stored in the OS keychain
https://github.com/wheelibin/qrypad/releases
go install github.com/wheelibin/qrypad@latest
qrypad
qrypad --connection <connection name>
--connection must match an entry in the config file. If omitted, you will be prompted to choose a connection on startup.
If the connection requires a password you will be prompted on first use; it is then stored in the OS keychain.
You can also switch connections from inside the app with Ctrl+K.
Config is read from ~/.config/qrypad/config.toml.
# query timeout (seconds)
queryTimeout = 60
# max rows fetched when viewing table data (does not apply to ad-hoc queries)
tableDataRowLimit = 100
[theme]
name = "catppuccin"
[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 panels?— show helpCtrl+D— switch databaseCtrl+K— switch connectionCtrl+P— update stored passwordCtrl+B— toggle the left (tables / info) panelR— refresh schema/— filter tables (escto cancel)
Enter— fetch first N rows (tableDataRowLimit)]/[— switch tabsy— copy the selected table name
]/[— switch tabsy— copy the selected column / index name/— filter columns (escto cancel)
F5— run the statement at the cursorCtrl+Space— autocomplete table / columnCtrl+S— save the query pad (per connection)Ctrl+R— reload the saved query pad from diskCtrl+E— open the query pad in$EDITORCtrl+Z— undoCtrl+Y— redo
Enter— open the selected row in a popupy— copy the selected value
y— copy the selected row as JSON/— filter results (escto cancel)
Any of the keys below can be overridden in the config file.
[keys]
AutoComplete = ""
CopyValue = ""
ExecuteQuery = ""
Help = ""
NextPanel = ""
NextTab = ""
OpenInEditor = ""
PrevPanel = ""
PrevTab = ""
Redo = ""
RefreshSchema = ""
ReloadQuery = ""
SaveQuery = ""
SwitchConnection = ""
SwitchDatabase = ""
ToggleLeftPanel = ""
Undo = ""
UpdatePassword = ""
ViewData = ""
ViewDataDesc = ""kanagawa(default)catppuccinrose-pine
Set the active theme in the config:
[theme]
name = "catppuccin"Override individual colours on top of an existing theme:
[theme]
name = "catppuccin"
borderActive = { fg = "#ff00ff" }Or define a new theme from scratch by giving it a new name and setting 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 = "" }
syntaxKeyword = { fg = "" }
syntaxString = { fg = "" }
syntaxNumber = { fg = "" }
syntaxComment = { fg = "" }
syntaxOperator = { fg = "" }
syntaxName = { fg = "" }
syntaxLiteral = { fg = "" }
syntaxPunctuation = { fg = "" }The syntax* keys control SQL syntax highlighting colours. If omitted, they fall back to colours derived from the UI theme.
See CONTRIBUTING.md.

