Harlequin and SQLly: a terminal SQL IDE and a desktop workbench

Harlequin is a free, MIT-licensed SQL IDE that runs in your terminal; SQLly is a GPU-drawn desktop workbench. Adapters, SSH, results, agents and price, compared.

By

Harlequin calls itself “the SQL IDE for your terminal”, and that is an accurate description. It’s a Python app built on Textual, MIT-licensed, with about 6,500 stars on GitHub and a release every week or two (2.17.0 shipped on 26 October 2026). You type harlequin in a shell and get a data catalog, a tabbed SQL editor and a results table without leaving the terminal.

We build SQLly, so take the bias into account. We read Harlequin’s README, its docs, its changelog and its package metadata on PyPI; we did not benchmark it. SQLly is a desktop app and Harlequin is a terminal app, so this is mostly a post about which kind of tool fits which job. For several jobs Harlequin is the right answer, and we say which.

Terminal vs desktop

This is the difference that decides most cases, so it goes first.

  • Harlequin runs where a terminal runs. SSH into a server, start it, and you have a catalog and an editor on that machine. It sits in a tmux pane next to your shell. It works with the mouse, but everything has a key, and the default keymap (named vscode) can be replaced with your own from a TOML file.
  • SQLly needs a display. It’s one Rust codebase drawn on the GPU through Metal, Direct3D or Vulkan, on macOS, Windows and Linux. sqlly-cli runs queries and serves MCP from the command line, but there is no terminal UI. To reach a database behind a server, SQLly tunnels to it over SSH from your desktop.

The terminal buys you portability, a tiny footprint and a keyboard-only flow. The Harlequin wheel is about 356 KB (its dependencies, DuckDB among them, add more), and it runs anywhere Python 3.10 to 3.14 does, Intel Macs included. A window buys you room: a grid you can pivot and chart, panels side by side, and tools that need more than 80 columns to be useful. SQLly’s macOS download is 65.6 MB, and it runs on Apple Silicon only.

Installing

Harlequin recommends uv tool install harlequin; pip, pipx and a community-maintained Homebrew formula also work. Adapters are separate Python packages, installed as extras: uv tool install 'harlequin[postgres,mysql]'. That’s easy if Python is already part of your day, and one more toolchain to manage if it isn’t. SQLly is a download: a dmg, a zip or a tarball, or the Mac App Store.

Databases

Harlequin’s adapter list is where it covers ground SQLly doesn’t. Its docs split adapters into two groups. Core adapters come from the maintainer, Ted Conbeer: DuckDB and SQLite (both included), Postgres, Redshift, Snowflake, MySQL/MariaDB and ODBC. Community adapters come from other people: BigQuery, Trino, Databricks, ADBC, chDB, RisingWave, Wherobots, Cassandra, NebulaGraph, Exasol and H2.

EngineSQLlyHarlequin
DuckDB, SQLiteYes (DuckDB bundled)Yes, included
PostgreSQL, MySQL, MariaDBYesYes, core adapters
SQL Server, OracleYes, native driversThrough the ODBC adapter and the vendor’s ODBC driver
ClickHouseYesEmbedded chDB (community)
Redis, libSQL/TursoYesNo adapter we could find
Snowflake, RedshiftNo (Snowflake planned)Yes, core adapters
BigQuery, Trino, DatabricksNo (BigQuery and Trino planned)Yes, community adapters
Cassandra, NebulaGraph, Exasol, H2NoYes, community adapters

If your data lives in a warehouse, Harlequin connects today and SQLly does not. If you work in SQL Server, Oracle, ClickHouse or Redis, SQLly connects without a driver manager or an ODBC package, and its engine list shows which tools work on each one. Community adapters are maintained by their authors, so check each one’s repository before you depend on it.

Writing SQL

Harlequin’s editor has tabs, syntax highlighting, completions with exact and fuzzy matches, find and go-to-line, open and save for .sql files, and F4 to format with sqlfmt. The catalog has an Interactions menu that drops a describe or the object’s DDL into a new tab. F8 opens a searchable query history.

SQLly spends more of its effort here. IntelliSense tracks aliases and scope, writes a JOIN ON clause from real foreign keys, pulls a column’s actual values into a WHERE clause, understands plain-language dates, and flags a GROUP BY mistake as you type. A 0.5 MB script costs about 5 ms per keystroke. The editor also has parameters, templates, multi-cursor editing, split views, folding and AI ghost text from a local model or a provider you choose.

Results

Harlequin’s results viewer is an Arrow-backed table that shows up to 100,000 rows by default, a cap you can change. You can copy a selection as tab-separated values, jump to a column by name, and export the result to CSV, Parquet, JSON, ORC or Feather. For DuckDB and Parquet work that export list is a real advantage: SQLly’s export dialog has no Parquet option.

SQLly’s grid spills to disk past 50,000 rows or 64 MiB, so fifty million rows use about the memory of fifty. On top of it are pivots, charts, conditional formatting, computed columns, result diffs, a row editor and Excel export with live formulas. A one-line comment saves the layout with the query. We couldn’t find grid editing, pivots or charts in Harlequin’s docs.

Agents and scripts

Harlequin ships a second command, hsql, for headless use. It reads the same adapters and config profiles, prints tables like psql, can list and search the catalog without SQL, and reads the shared query history. Its safety options are sensible: a 500-row default limit that says so when it truncates, --read-only, which asks the database to refuse writes, and --timeout. Both refuse to start if the adapter can’t enforce them rather than running unbounded. The repository also publishes a Claude Code skill for hsql. We found no MCP server.

SQLly’s sqlly-cli mcp takes the MCP route. An agent can list connections, read schemas and run one SELECT at a time inside a transaction the database keeps read-only and then rolls back. A write comes back to the app as a proposal showing the exact SQL, which you run or decline, and production connections are refused. Both projects land in the same place on the main point: an agent should read by default, and the database should enforce it.

Safety and admin work

Beyond read-only mode, row limits and timeouts, Harlequin offers commit and rollback buttons on adapters that support a manual transaction mode. That’s the extent of what we found documented. It is an editor and a viewer, and it doesn’t try to be a DBA tool.

SQLly’s guardrails stop UPDATE or DELETE without WHERE, roll back automatically, check tenants, and paint production red, inherited from client to project to environment. Its tools include an activity monitor with blocking chains, Query Insights, SQL Agent, schema and data compare, an index analyzer, a test data generator and cross-engine data transfer.

What they cost

Harlequin is free and MIT-licensed at any company size, and the author takes GitHub Sponsors. SQLly has a free tier for hobbyists (two saved servers, a reminder to pay about every five hours, not for organizations over 100 employees), a one-time $100 SQLly 1.x license, and a $200 Lifetime license; see pricing. SQLly is not open source; Lifetime licenses carry a source-escrow promise if SQLly is ever discontinued.

Which one to pick

Pick Harlequin if:

  • You work over SSH or in tmux, or you just don’t want to leave the terminal.
  • You query Snowflake, BigQuery, Redshift, Trino or Databricks.
  • Your work is DuckDB and Parquet, and you want Parquet, ORC or Feather out the other end.
  • You want something free, open source and small that scripts and agents can drive through hsql.

Pick SQLly if:

  • You work in SQL Server, Oracle, ClickHouse or Redis and want native drivers.
  • You analyze results: pivots, charts, diffs, Excel, or results in the millions of rows.
  • You write a lot of SQL and want completions that know your data.
  • You want guardrails on your own queries and DBA tools in the same window.

Plenty of people will reasonably use both. The side-by-side table is at SQLly vs Harlequin, and SQLly’s download is free.