Gem

Harlequin

A SQL IDE in your terminal for DuckDB, SQLite, Postgres, MySQL and more.

Would you recommend Harlequin?

No votes yet. Tried it? Be the first to say.

One vote per person. No account needed.

Overview

Harlequin gives you a full SQL workbench in the terminal: a data catalog to browse schemas and columns, a multi-tab query editor with autocomplete, and a results viewer that handles large result sets. DuckDB is built in, so you can query CSV, Parquet and JSON files straight from disk with no setup, and adapter plug-ins add Postgres, MySQL/MariaDB, ODBC and many community-maintained databases. It ships with a companion CLI, hsql, for scripts and agents, which can run read-only and with timeouts.

Instead of
psql and the sqlite3 shell for exploring data, or opening a heavy GUI like DBeaver for a quick look
Reach for it when
You want to poke at a database or a pile of CSV/Parquet files from the terminal, including over SSH on a server.

Try it in a few minutes

Terminal
uv tool install harlequin   # add adapters: uv tool install 'harlequin[postgres]'
harlequin   # in-memory DuckDB; try: select * from 'data.csv'
harlequin -a sqlite app.db

Related tools

Other tools that share topics with Harlequin.

pgcli

pgcli.com
Gem

pgcli is an interactive PostgreSQL shell with SQL completion and syntax highlighting.

Instead of Interactive psql sessions and desktop database browsers.

jless

jless.io
Gem

A terminal JSON viewer: collapse and expand nodes, move with vim keys, search with regex.

Instead of `cat response.json | jq . | less`, and opening a 40 MB JSON file in your editor just to look at it

sqlite-utils

sqlite-utils.datasette.io
Gem

A Python library and CLI for building and querying SQLite databases from files or pipelines.

Instead of One-off CSV loaders and scratch database scripts.