ScriptsJul 13, 2026·2 min read

Rainfrog — Database Management TUI for the Terminal

A terminal-based database management tool written in Rust that provides an interactive interface for querying PostgreSQL, MySQL, and SQLite databases without leaving the command line.

Agent ready

Ready-to-run agent install

This asset can be installed after the agent chooses its runtime, checks the plan, and runs the matching command.

Native · 98/100Policy: allow
Agent surface
Any MCP/CLI agent
Kind
Skill
Install
Single
Trust
Trust: Established
Entrypoint
Rainfrog
Direct install command
npx -y tokrepo@latest install cabd22d3-7e73-11f1-9bc6-00163e2b0d79 --target codex

Run after dry-run confirms the install plan.

Introduction

Rainfrog is a terminal user interface (TUI) for managing databases, built in Rust with the ratatui framework. It provides an interactive, keyboard-driven experience for browsing schemas, running queries, and inspecting results directly in the terminal, aimed at developers who prefer staying in their CLI workflow.

What Rainfrog Does

  • Connects to PostgreSQL, MySQL, and SQLite databases
  • Displays database schemas with tables, columns, types, and relationships
  • Runs SQL queries with syntax highlighting and result pagination
  • Supports Vim-style keybindings for navigation and editing
  • Exports query results for further processing

Architecture Overview

Rainfrog is a single Rust binary built on ratatui for the terminal UI and sqlx for async database connections. The application uses a component-based architecture where each panel (schema browser, query editor, results table) is an independent widget. Connection pooling and async queries ensure the UI stays responsive even on large result sets.

Self-Hosting & Configuration

  • Install via cargo install rainfrog, Homebrew, or download a prebuilt binary
  • Pass connection URL with --url or configure in ~/.config/rainfrog/config.toml
  • Supports connection strings for PostgreSQL, MySQL, and SQLite file paths
  • Customize keybindings and color theme in the config file
  • Query history is persisted locally between sessions

Key Features

  • Vim keybindings: navigate and edit queries without leaving the keyboard
  • Schema browser: explore tables, columns, and types in a tree view
  • Multi-database: supports PostgreSQL, MySQL, and SQLite from one tool
  • Fast and lightweight: single binary under 10 MB, starts instantly
  • Query history: recall and re-run previous queries

Comparison with Similar Tools

  • pgcli — PostgreSQL CLI with auto-completion; text-only, no TUI panels
  • DBeaver — full GUI database tool; requires a desktop environment
  • lazysql — Go-based database TUI; similar concept, different stack
  • usql — universal SQL CLI client; no interactive TUI
  • DataGrip — JetBrains commercial IDE; full-featured but heavyweight

FAQ

Q: Does Rainfrog support SSH tunneling? A: Not natively. Use an SSH tunnel (ssh -L) and connect to the forwarded local port.

Q: Can I use Rainfrog with a remote database? A: Yes. Provide the remote connection URL, and Rainfrog connects over the network.

Q: Is there auto-completion for SQL? A: Rainfrog provides basic keyword highlighting. Full auto-completion is a planned feature.

Q: How does Rainfrog handle large result sets? A: Results are paginated in the TUI. You can scroll through rows without loading everything into memory at once.

Sources

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets