Thanks to visit codestin.com
Credit goes to github.com

Skip to content

wheelibin/qrypad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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 panels
  • F1 - show help
  • F2 - switch database
  • F3 - update stored password
  • / - filter tables (esc to cancel)
  • Ctrl+T - toggle left-side (tables/info)

πŸ“‹ Tables Panel

  • Enter - fetch first 100 rows
  • ] / [ - switch tabs
  • c - copy selected table name

πŸ›  Table Info Panel

  • ] / [ - switch tabs
  • c - copy selected column/index name
  • / - filter columns (esc to cancel)

🧾 Queries Panel

  • F5 - run current query
  • Ctrl+S - save query pad (saved per connection)
  • Ctrl+R - reload saved query pad file
  • Ctrl+E - open query pad in external editor

πŸ“Š Results Panel

  • enter - show full row data in popup
    • c - copy selected value
  • c - copy selected row as JSON
  • / - filter results (esc to 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-wave
  • rose-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 = "" }

About

A simple terminal UI for quick, ad-hoc database exploration

Topics

Resources

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •