achristmascarl / rainfrog
- ะฟััะฝะธัะฐ, 20 ัะตะฝััะฑัั 2024โฏะณ. ะฒ 00:00:02
๐ธ a database management tui for postgres
a database management tui for postgres
Warning
rainfrog is currently in beta.
the goal for rainfrog is to provide a lightweight, terminal-based alternative to pgadmin/dbeaver.
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.
after installing rust (recommended to do so via rustup):
cargo install rainfrog
arch linux users can install from the official repositories using pacman:
pacman -S rainfrog
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
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
rustc -vV
to see the "host" target)PATH
environment variableNote
connection_url
must include your credentials for accessing the database (ex. postgres://username:password@localhost:5432/postgres
)
rainfrog --url $(connection_url)
Note
For now we build the image locally until the image is available in Docker Hub
docker build . -t rainfrog
docker run -it --rm --name rainfrog \
-p <db_port>:<db_port> \
-e username="<username>" \
-e password="<password>" \
-e hostname="host.docker.internal" \
-e db_port="<db_port>" \
-e dbname="<dbname>" rainfrog
keybinding | description |
---|---|
Ctrl+c |
quit program |
Alt+1 , Ctrl+k |
change focus to menu |
Alt+2 , Ctrl+j |
change focus to query editor |
Alt+3 , Ctrl+h |
change focus to query history |
Alt+4 , Ctrl+g |
change focus to results |
Tab |
cycle focus forwards |
Shift+Tab |
cycle focus backwards |
q , Alt+q in query editor |
abort current query |
keybinding | description |
---|---|
j , โ |
move selection down by 1 |
k , โ |
move selection up by 1 |
g |
jump to top of current list |
G |
jump to bottom of current list |
h , โ |
focus on schemas (if more than 1) |
l , โ |
focus on tables |
/ |
filter tables |
Esc |
clear search |
Backspace |
focus on tables |
Enter when searching |
focus on tables |
Enter with selected schema |
focus on tables |
Enter with selected table |
preview table (100 rows) |
R |
reload schemas and tables |
Keybindings may not behave exactly like Vim. The full list of active Vim keybindings in Rainfrog can be found at vim.rs.
Keybinding | Description |
---|---|
Alt+Enter , F5 |
Execute 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 |
w |
Move cursor to next start of word |
e |
Move cursor to next end of word |
b |
Move cursor to previous start of word |
0 |
Move cursor to beginning of line |
$ |
Move cursor to end of line |
gg |
Jump to top of editor |
G |
Jump to bottom of current list |
Esc |
Return to normal mode |
i |
Enter insert (edit) mode |
I |
Enter insert mode at beginning of line |
A |
Enter insert mode at end of line |
o |
Insert new line below and enter insert |
v |
Enter visual (select) mode |
V |
Enter visual mode and select line |
r |
Begin replace operation |
y |
Begin yank (copy) operation |
x |
Begin cut operation |
p |
Paste from clipboard |
u |
Undo |
Ctrl+r |
Redo |
Ctrl+e |
Scroll down |
Ctrl+y |
Scroll up |
keybinding | description |
---|---|
j , โ |
move selection down by 1 |
k , โ |
move selection up by 1 |
g |
jump to top of list |
G |
jump to bottom of list |
y |
copy selected query |
I |
edit selected query in editor |
D |
delete all history |
keybinding | description |
---|---|
j , โ |
scroll down by 1 row |
k , โ |
scroll up by 1 row |
h , โ |
scroll left by 1 cell |
l , โ |
scroll right by 1 cell |
b |
scroll right by 1 cell |
e , w |
scroll left by 1 column |
{ , PageUp , Ctrl+b |
jump up one page |
} , PageDown , Ctrl+f |
jump down one page |
g |
jump to top of table |
G |
jump to bottom of table |
0 |
jump to first column |
$ |
jump to last column |
v |
select individual field |
V |
select row |
Enter |
change selection mode inwards |
Backspace |
change selection mode outwards |
y |
copy selection |
Esc |
stop selecting |
now that rainfrog is in beta, check out the issues tab for planned features
u16::MAX
(65,535). more details in
#60Table
widget
may be limited due to the same limitation mentioned above. Could be fixed by
ratatui/ratatui#1250"terminal.integrated.macOptionIsMeta": true
; in
kitty, it's macos_option_as_alt yes
in the config.)