Terminal-based SQL IDE with database adapter support for DuckDB, SQLite, PostgreSQL, MySQL and dozens of other databases
Harlequin is a terminal-based SQL IDE that provides an interactive interface for querying databases. It runs entirely in the terminal and supports dozens of different databases through adapter plug-ins, including built-in support for DuckDB and SQLite. Users can open databases by specifying connection strings, execute SQL queries, browse data catalogs, and export data.
The tool uses a modular adapter system where each database type is supported through separate Python packages. Popular adapters include PostgreSQL, MySQL/MariaDB, S3, and ODBC connections. Adapters can be installed as extras during installation or separately afterward. Each adapter defines its own connection options and capabilities that appear in the help system.
Harlequin supports extensive customization through configuration files, allowing users to set themes, customize key bindings, configure file pickers for local and remote files, and define connection profiles. The tool includes Django integration through the django-harlequin package, which enables launching Harlequin with Django's database configuration. It runs on Linux, macOS, and Windows and requires Python 3.9 or above.
# via UV
uv tool install harlequin
# via Pip
pip install harlequin
# via Homebrew
brew install harlequin