harlequin
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.
Installation
# via UV
uv tool install harlequin
# via Pip
pip install harlequin
# via Homebrew
brew install harlequin
Alternatives & related tools
Azure CLI
Microsoft's cross-platform command-line interface for managing Azure resources with az group/subgroup/command syntax, JMESPath queries, and tab completion.
GDB dashboard
A standalone .gdbinit written in Python that shows a modular dashboard of program state in GDB each time the debugged program stops.
textual-astview
TUI tool for exploring Python Abstract Syntax Trees (AST) with interactive tree view and source highlighting
peplum
Terminal-based browser and search interface for Python Enhancement Proposals (PEPs)
AWS CLI
Official command line interface for Amazon Web Services, with profile-based credentials, configurable output, and shell tab completion.
add a badge to your README
Maintain harlequin? Show that it's featured on trmn. The badge links back to this page.
[](https://www.trmn.sh/tools/harlequin?utm_source=badge)<a href="https://www.trmn.sh/tools/harlequin?utm_source=badge"><img src="https://www.trmn.sh/badge/harlequin.svg" alt="Featured on trmn" height="20"></a>