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
Chat2DB
Database Tools
Chat2DB is a free, cross-platform, local-first database client and SQL workspace for devel
OSSvs DataGrip★ 28k
Dbx
Database Tools
25 MB lightweight cross-platform database client for 100+ databases, including MySQL, Post
Apache-2.0vs DataGrip★ 24k
Sequel Ace
Database Tools
MySQL/MariaDB database management for macOS
OSSvs TablePlus★ 7.5k
pgAdmin
Database Tools
pgAdmin is the most popular and feature rich Open Source administration and development pl
OSSvs Navicat★ 3.9k
WhoDB
Database Tools
Where data access meets operational intelligence
Apache-2.0vs TablePlus★ 5k
Outerbase Studio
Database Tools
A lightweight Database GUI in your browser. It supports connecting to Postgres, MySQL, and
AGPL-3.0vs TablePlus★ 6k
SaaS alternatives to Harlequin
See all
DataGrip
Database Tools
JetBrains IDE for SQL with code completion and multi-database support
SaaS
DBCode
Database Tools
VS Code extension for browsing and querying databases
SaaSNoSQLBooster
Database Tools
MongoDB GUI with a shell-style query editor, IntelliSense and SQL support
SaaS
Querious
Database Tools
MySQL and MariaDB database management app for macOS
SaaS
SQLPro Studio
Database Tools
Database client for macOS, iOS and Windows supporting Postgres, MySQL, SQL Server and Oracle
SaaSSQLyog
Database Tools
MySQL and MariaDB GUI client for Windows with schema and data sync tools
SaaS

