Scripts2026年7月13日·1 分钟阅读

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 就绪

Agent 可直接安装

这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
Rainfrog
直接安装命令
npx -y tokrepo@latest install cabd22d3-7e73-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run 确认安装计划,再运行此命令。

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

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产