lazysql

Cross-platform TUI database management tool for MySQL, PostgreSQL, SQLite, and MSSQL with SQL editor and table operations.

install

Lazysql is a terminal user interface (TUI) database management tool written in Go that provides a visual interface for managing multiple database connections. It supports MySQL, PostgreSQL, SQLite, and MSSQL databases, allowing users to browse database schemas, view table data, and execute SQL queries without leaving the terminal.

The tool features a built-in SQL editor (accessible with Ctrl+E), table filtering with WHERE clauses, and basic CRUD operations including row insertion and column editing. Users can manage multiple database connections simultaneously through tabs, with support for read-only mode to prevent accidental data modifications. The interface supports Vim keybindings and includes functionality for exporting query results or table data to CSV format.

Lazysql is configured through TOML files and supports advanced connection scenarios including SSH tunneling and custom pre-connection commands. It can automatically handle port forwarding and environment variable substitution in connection strings, making it suitable for connecting to remote databases through bastions or Kubernetes port-forwarding. The tool stores connection configurations persistently and allows switching between saved connections at startup.

Installation

# via Homebrew
brew install lazysql
# via Go
go install github.com/jorgerojas26/lazysql@latest
# via AUR
paru -S lazysql

Alternatives & related tools

add a badge to your README

Maintain lazysql? Show that it's featured on trmn. The badge links back to this page.

Featured on trmn
Markdown
[![Featured on trmn](https://www.trmn.sh/badge/lazysql.svg)](https://www.trmn.sh/tools/lazysql?utm_source=badge)
HTML
<a href="https://www.trmn.sh/tools/lazysql?utm_source=badge"><img src="https://www.trmn.sh/badge/lazysql.svg" alt="Featured on trmn" height="20"></a>