lazysql vs SQLly: a terminal SQL client next to a desktop workbench

An honest look at lazysql, the MIT-licensed Go terminal UI inspired by lazygit, next to SQLly: engines, footprint, SSH, editing, safety, and who should pick which.

By

lazysql is a terminal UI for SQL databases, written in Go and openly modeled on lazygit. Its author wrote it because he lives in the terminal and wanted a SQL client that did too. It has about 4,400 stars on GitHub, 50 releases since May 2023, and it shipped v0.7.0 on October 12, 2026. People keep asking how it compares with SQLly, so here it is.

We build SQLly, so take the bias into account. We read lazysql’s README, its telemetry doc, its release notes, the driver list in its repository, and the sizes of its release files. We did not install it or benchmark it. The honest framing is terminal versus desktop: the two tools are good at different things, and for a lot of people lazysql is the right pick.

Terminal versus desktop

lazysql draws its UI as text with tview and tcell. That means it runs anywhere a terminal does: in a tmux pane, inside an SSH session on a production box, on a machine with no display at all. Every action has a vim-style key, and every key can be remapped in the config file.

SQLly is a desktop app. Its UI is one Rust codebase drawn on the GPU through Metal, Direct3D or Vulkan, on macOS, Windows and Linux. It needs a screen. sqlly-cli runs from a shell for MCP and scripting, but there is no SQLly terminal UI, and we don’t plan to pretend there is. To reach a remote database, SQLly opens an SSH tunnel or uses its bridge and relay from your own machine.

The size difference follows from that. lazysql’s v0.7.0 tarball for Apple Silicon is 8.6 MB, the Linux x86_64 one is 9.0 MB, and the Windows x86_64 zip is 9.2 MB. SQLly’s macOS dmg is 65.6 MB, the Windows x64 zip 60.9 MB, and the Linux x64 tarball 76.2 MB. lazysql also ships builds for Intel Macs and 32-bit x86; SQLly needs Apple Silicon on the Mac.

Installing lazysql is brew install lazysql, go install, a release binary, or the community AUR package. SQLly is a download from the download page or the Mac App Store.

Databases

EngineSQLlylazysql
PostgreSQL, MySQL, SQLite, SQL ServerYesYes
ClickHouseYesYes, native and HTTP
MariaDB, DuckDB, Oracle, libSQL/TursoYesNo
Redis and its forksYesNo
MongoDBNoListed as not yet supported

lazysql has five drivers in its repository, and its README says more engines are a work in progress. Its SQL Server driver handles Azure SQL Database and Kerberos sign-in on macOS and Linux. SQLly connects to 30 engines once you count the documented wire-compatible services; the engine list says which tools work on which.

Configuration you can put in a repo

This is one of lazysql’s nicer ideas. Connections live in a TOML file, and a .lazysql.toml next to your project’s .git folder overrides the global one, so a project can carry its own connections and keybindings. Credentials can come from environment variables with ${env:DB_PASSWORD}. A connection can list commands to run first, such as ssh -L to a bastion or kubectl port-forward, and lazysql waits for the port to open before it connects. There is no built-in SSH client; it drives the one you already have.

The trade-off is where passwords sit. If you don’t use environment variables, the password is in the connection URL in the config file. SQLly keeps settings in plain files too, but passwords go in the OS keychain, and it can import connections from DataGrip, DBeaver, pgAdmin, TablePlus and others.

Browsing and editing data

lazysql’s core loop is quick: open a table from the tree, type a WHERE clause to filter it, sort with J and K, edit a cell inline or in $EDITOR, and save the pending changes with Ctrl+S. You can insert, duplicate and delete rows, hide columns per table, open a cell or row in a JSON viewer, and copy rows as SQL, Markdown, JSON or CSV.

Its foreign-key jump is something SQLly doesn’t have in that form. Press Enter on an underlined key and the referenced row opens in a new tab, already filtered; press f to go the other way and pick a table that references the current row. It works on PostgreSQL, SQLite and SQL Server, for single-column keys. SQLly’s Relationship Graph maps the keys and IntelliSense writes JOIN ON clauses from them, but there’s no one-key jump from a cell to the row it points at.

SQLly’s row editor is generated from the table’s own metadata, and SQLly has designers for creating and altering tables. lazysql has no table or column designer; you write the DDL yourself, and column and index creation is on its roadmap.

Writing SQL and reading results

lazysql’s editor opens with Ctrl+E, runs with Ctrl+R, highlights syntax, completes table and column names, keeps a query history, and hands off to your own editor for anything long. Results stream in and stop at 1,000 rows by default, a limit you can change in the config. Table views page 300 rows at a time. CSV export can stream a whole table or a read-only query to a file.

SQLly spends most of its effort here. IntelliSense tracks aliases and scope, writes JOIN ON from real foreign keys, pulls a column’s actual values into a WHERE clause, and flags a GROUP BY mistake while you type. Results stream and spill to disk past 50,000 rows or 64 MiB, so there’s no row cap to choose. And because SQLly has pixels to work with, the grid does things a terminal can’t: pivots, charts, conditional formatting, computed columns, result diffs and Excel export with live formulas.

Safety

lazysql has a real read-only mode. Set ReadOnly = true on a connection or start with --read-only, and INSERT, UPDATE, DELETE, DROP and similar statements are blocked; a September release closed a hole where a CTE could slip a write past it. Row edits are shown as a preview before they run. Beyond that, we couldn’t find other guardrails documented.

SQLly’s guardrails go further: SELECT-only connections that also block file-reading and shell-escape tricks, a hard stop on UPDATE or DELETE without WHERE, automatic rollback, tenant checks, an optional AI review before a data change, and production connections painted red. You set them on a client, project or environment, and every connection underneath inherits them.

What SQLly has that a TUI doesn’t try to

lazysql is a client, not a DBA console, and it doesn’t claim otherwise. SQLly has an Activity Monitor, query plans on nine engines (still in progress), schema and data compare, Query Store, SQL Agent, an index analyzer, a test data generator, and backup and restore as scripts you read first. It also has AI help with local models or opt-in cloud providers, and a read-only MCP server for agents. lazysql has none of those.

What they cost

lazysql is MIT-licensed, free, and needs no account. Official release builds ask once whether to send anonymous aggregate usage counts, with sending on by default; you can decline, pass --no-telemetry or set DO_NOT_TRACK=1, and builds from source send nothing. SQLly has a free tier for hobbyists (two saved servers), a one-time $100 SQLly 1.x license, and a $200 Lifetime license; see pricing. SQLly isn’t open source. Lifetime licenses carry a source-escrow promise if SQLly is ever discontinued.

Which one to pick

Pick lazysql if:

  • You work on servers over SSH and want the client running next to the database.
  • Your day is tmux, vim and lazygit, and you don’t want to leave the terminal.
  • You want a 9 MB binary from brew or go install, or you’re on an Intel Mac.
  • You want connection config checked into a project, with bastion commands and env-var credentials.
  • You need open source, or free at any company size.

Pick SQLly if:

  • You need MariaDB, DuckDB, Oracle, libSQL or Redis.
  • You write a lot of SQL and want completions that know your data.
  • You analyze results: pivots, charts, diffs, Excel, or more rows than you’d want to cap.
  • You read plans, compare schemas, or watch server activity.
  • You want guardrails beyond a read-only switch.

Plenty of people will use both: lazysql on the box, SQLly on the laptop. The side-by-side table is at SQLly vs lazysql, and SQLly’s download is free.