Home

Awesome

🐸 rainfrog

a database management tui for postgres

rainfrog demo

[!WARNING] rainfrog is currently in alpha.

the goal for rainfrog is to provide a lightweight, terminal-based alternative to pgadmin/dbeaver.

features

why "rainfrog"?

frogs find refuge in elephant tracks

disclaimer

this software is currently under active development; expect breaking changes, and use at your own risk. it is not recommended to use this tool with write access on a production database.

installation

cargo

after installing rust (recommended to do so via rustup):

cargo install rainfrog

aur

arch linux users can install from the AUR with an AUR helper:

paru -S rainfrog

termux

if you are using termux, you'll need to install rust via their package manager:

pkg install rust

and then make sure to install with termux features (and disable default features):

cargo install rainfrog --features termux --no-default-features

install script

there is a simple install script that assists in downloading and unpacking a binary from the release page to ~/.local/bin/, which you might want to add to your PATH variable if it isn't already there. you'll need to select which binary is appropriate for your system (if you're not sure, you can find out by installing rust and running rustc -vV to see the "host" target), and the script also needs jq and fzf installed to run.

curl -LSsf https://raw.githubusercontent.com/achristmascarl/rainfrog/main/install.sh | bash

release page binaries

  1. manually download and unpack the appropriate binary for your os from the latest release (if you're not sure which binary to pick, you can find out by installing rust and running rustc -vV to see the "host" target)
  2. move the binary to a folder in your PATH environment variable

usage

[!NOTE] connection_url must include your credentials for accessing the database (ex. postgres://username:password@localhost:5432/postgres)

rainfrog --url $(connection_url)

keybindings

general

keybindingdescription
Ctrl+cquit program
Alt+1, Ctrl+nchange focus to menu
Alt+2, Ctrl+bchange focus to query editor
Alt+3, Ctrl+hchange focus to query history
Alt+4, Ctrl+gchange focus to results
Tabcycle focus forwards
Shift+Tabcycle focus backwards
qabort current query

menu (list of schemas and tables)

keybindingdescription
j, move selection down by 1
k, move selection up by 1
gjump to top of current list
Gjump to bottom of current list
h, focus on schemas (if more than 1)
l, focus on tables
/filter tables
Escclear search
Backspacefocus on tables
Enter when searchingfocus on tables
Enter with selected schemafocus on tables
Enter with selected tablepreview table (100 rows)
Rreload schemas and tables

query editor

keybindings may not behave exactly like vim. the full list of active vim keybindings in rainfrog can be found at vim.rs.

keybindingdescription
Alt+Enter, F5execute query
j, move cursor down 1 line
k, move cursor up 1 line
h, move cursor left 1 char
l, move cursor right 1 char
wmove cursor to next start of word
emove cursor to next end of word
bmove cursor to prev start of word
0move cursor to beginning of line
$move cursor to end of line
ggjump to top of editor
Gjump to bottom of current list
Escreturn to normal mode
ienter insert (edit) mode
Ienter insert mode at beginning of line
Aenter insert mode at end of line
oinsert new line below and insert
venter visual (select) mode
Venter visual mode and select line
rbegin replace operation
ybegin yank (copy) operation
xbegin cut operation
ppaste from clipboard
uundo
Ctrl+rredo
Ctrl+escroll down
Ctrl+yscroll up

query history

keybindingdescription
j, move selection down by 1
k, move selection up by 1
gjump to top of list
Gjump to bottom of list
ycopy selected query
Iedit selected query in editor
Ddelete all history

results

keybindingdescription
j, scroll down by 1 row
k, scroll up by 1 row
h, scroll left by 1 cell
l, scroll right by 1 cell
bscroll right by 1 cell
e, wscroll left by 1 column
gjump to top of table
Gjump to bottom of table
0jump to first column
$jump to last column
vselect individual field
Vselect row
Enterchange selection mode inwards
Backspacechange selection mode outwards
ycopy selection
Escstop selecting

roadmap

<details> <summary><b>v0.1.0 (alpha)</b></summary> </details> <details> <summary><b>v0.2.0 (beta)</b></summary> </details> <details> <summary><b>backburner</b></summary> </details>

known issues and limitations

acknowledgements