7,363 open-source and SaaS tools, with GitHub stats refreshed every day.

Harlequin

Open source

Harlequin is a terminal-based SQL IDE written in Python that connects to DuckDB, SQLite, Postgres, MySQL and other databases through adapters.

Open-source alternative to

harlequin.sh
Harlequin homepage screenshot
GitHub stars
6.4k
Last commit
yesterday
Repository age
3 years
Version
v2.16.1
Licence
MIT
Self-hosted
Yes

About Harlequin

Harlequin is a SQL IDE that runs entirely in your terminal. It is a Python application built on the Textual framework, giving developers a keyboard-driven way to write queries, browse a database and view results without leaving the command line. It also ships hsql, a companion client aimed at AI coding agents.

Database support comes from adapters. Topics on the repository list DuckDB, SQLite, PostgreSQL, MySQL, MariaDB, SQL Server, ODBC, Redshift and Snowflake. Installation is recommended with uv as an isolated tool, though pip, pipx and poetry also work on Python 3.9 or newer. Detailed guides live on the project website, since the README covers only a subset.

Harlequin is MIT-licensed, runs locally on your own machine and has no hosted version. It suits developers and analysts who work over SSH or simply prefer terminal tools to graphical database clients.

Key features

  • Full-screen SQL editor in the terminal
  • Adapters for DuckDB, SQLite and Postgres
  • Support for MySQL, SQL Server and Snowflake
  • Query result viewing and browsing
  • hsql client for AI agents
  • Install with uv, pip or pipx

Good fit for

  • →Querying databases over SSH
  • →Exploring DuckDB and SQLite files
  • →Giving coding agents a SQL client
Tags
sql
tui
terminal
database-client
python
duckdb
postgres
cli

Harlequin: questions and answers

What is Harlequin used for?
Harlequin is a terminal-based SQL IDE written in Python that connects to DuckDB, SQLite, Postgres, MySQL and other databases through adapters. It is a good fit for querying databases over SSH, exploring DuckDB and SQLite files, and giving coding agents a SQL client.
Is Harlequin open source?
Yes. Harlequin is open source under the MIT licence. Its source code is on GitHub at tconbeer/harlequin and is written mainly in Python.
Is Harlequin free?
Yes. Harlequin is open source, so the software itself is free to use.
What is Harlequin an alternative to?
Harlequin is an open-source alternative to DataGrip. Other open-source alternatives to DataGrip include Chat2DB, Dbx and Sequel Ace.
Is Harlequin actively maintained?
Yes. The most recent commit to Harlequin was on 2 October 2026, and the latest release is v2.16.1, published on 2 October 2026. The project has 6.4k stars on GitHub.

Open-source alternatives to Harlequin

See all

SaaS alternatives to Harlequin

See all