# rainfrog

> Terminal database client with vim-like keybindings and a query editor, supporting Postgres, MySQL, SQLite, Redshift, DuckDB, and Oracle.

Stars: 5.4k · Language: Rust · License: MIT · Categories: Data

- Repository: https://github.com/achristmascarl/rainfrog
- Website: https://crates.io/crates/rainfrog
- Page: https://www.trmn.sh/tools/rainfrog

## Install

- Homebrew: `brew install rainfrog`
- Cargo: `cargo install rainfrog --locked`
- Pacman (Arch Linux): `pacman -S rainfrog`

## Overview

rainfrog is a terminal-based database client written in Rust and built on Ratatui. It lets you browse schemas and tables, run SQL queries, and inspect results from a TUI. Supported drivers are Postgres (tier 1), MySQL, SQLite, Redshift and DuckDB (tier 2), and Oracle (tier 3, which needs Oracle Client libraries installed via ODPI-C). The Postgres and MySQL drivers can also be tried against other databases that speak the same wire protocol, though the README says this is not well tested.

The interface uses vim-like keybindings and optional mouse support. The query editor has keyword highlighting, session history, and saved favorites. You can copy data, filter tables, switch between schemas, and open shortcuts for table metadata and properties. Results can be exported. Settings, connections, and keybindings are customized through a rainfrog_config.toml file, and `rainfrog edit` opens that config.

You can connect with individual flags (`--driver`, `--username`, `--host`, `--port`, `--database`), with a full `--url`, or through a `DATABASE_URL` environment variable or `.env` file. Any missing options are prompted for. `--ssl-required` forces TLS on Postgres, MySQL, and Oracle connections. A Docker image is available for Postgres and MySQL, and SQLite works with a mounted volume. Binaries target macOS, Linux, Windows, and Android via Termux. Icons need a Nerd Font.

It suits developers and DBAs who want to query and explore databases without leaving the terminal. The README warns that the project is under active development and that breaking changes are expected. It advises against using it with write access on a production database.

### Installation

```bash
# via Homebrew
brew install rainfrog
```

```bash
# via Cargo
cargo install rainfrog --locked
```

```bash
# via Pacman (Arch Linux)
pacman -S rainfrog
```

## Alternatives

- [jless](https://www.trmn.sh/tools/jless.md): Command-line JSON viewer with syntax highlighting, collapsible sections, and vim-inspired navigation commands (Rust, 5.5k stars)
- [jnv](https://www.trmn.sh/tools/jnv.md): Interactive terminal JSON viewer and jq filter editor with auto-completion, using the built-in jaq engine; reads files or stdin. (Rust, 6.1k stars)
- [xan](https://www.trmn.sh/tools/xan.md): Rust command line tool for processing large CSV files: preview, filter, sort, join, aggregate, and plot, with its own expression language and multithreading. (Rust, 4.6k stars)
- [qsv](https://www.trmn.sh/tools/qsv.md): Rust CLI toolkit of composable commands for querying, transforming, validating, joining, and describing CSV, Excel, and other tabular data. (Rust, 3.8k stars)
- [angle-grinder](https://www.trmn.sh/tools/angle-grinder.md): Command-line log analysis tool that parses, filters, and aggregates log data with a pipeline query language and a live-updating terminal UI. (Rust, 3.8k stars)

---

Canonical: https://www.trmn.sh/tools/rainfrog
