Installing Harlequin
Installing Harlequin
Harlequin is a Python program, and there are many ways to install and run it. We strongly recommend using uv:
Install uv. From a POSIX shell, run:
$Â curl -LsSf https://astral.sh/uv/install.sh | sh
Or using Windows Powershell:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Install Harlequin as a tool using
uv
:$Â uv tool install harlequin
This command will install Harlequin into an isolated environment and add it to your PATH so you can easily run the executable.
Other Installation Methods
Alternatively, if you know what you’re doing, after installing Python 3.9 or above, install Harlequin using pip
, pipx
, poetry
, or any other program that can install Python packages from PyPI:
$Â pip install harlequin
There is also a Homebrew formula for Harlequin, although this is maintained by the community and is not as rigorously tested as the Python installations. Note that the formula includes several Harlequin adapter packages (Postgres, MySQL, and ODBC) and their dependencies, which is convenient but increases the application size.
$Â brew install harlequin
Installing Database Adapters
Harlequin can connect to dozens of databases using adapter plug-ins. Adapters are distributed as their own Python packages that need to be installed into the same environment as Harlequin.
For a list of known adapters provided either by the Harlequin maintainers or the broader community, see the adapters page.
The adapter docs also include installation instructions. Some adapters can be installed as Harlequin extras, like postgres
. If you used uv
to install Harlequin:
$Â uv tool install 'harlequin[postgres]'
You can install multiple extras:
$Â uv tool install 'harlequin[postgres,mysql,s3]'
% uv tool install 'harlequin[postgres,mysql,s3]'
Some adapters are not available as extras, and have to be installed manually. You may also wish to do this to control the version of the adapter that Harlequin uses. You can add adapters to your installation using uv’s --with
option:
$Â uv tool install harlequin --with harlequin-odbc