lazysql
Cross-platform TUI database management tool for MySQL, PostgreSQL, SQLite, and MSSQL with SQL editor and table operations.
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
gojq
Pure Go implementation of jq command-line JSON processor with arbitrary-precision arithmetic and YAML support
jqp
A terminal UI for running jq queries interactively against JSON or NDJSON input, using the gojq implementation, with themes and query history.
Skate
A local personal key-value store CLI for saving and retrieving text or binary data, with named databases and pipe-friendly output.
jid
Interactive JSON explorer that takes piped input and lets you drill down with dot-path or JMESPath queries, with tab completion and suggestions.
dasel
Command-line tool for querying, modifying, and transforming structured data files (JSON, YAML, TOML, XML, CSV)
add a badge to your README
Maintain lazysql? Show that it's featured on trmn. The badge links back to this page.
[](https://www.trmn.sh/tools/lazysql?utm_source=badge)<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>