Getting Started

Installing Harlequin

After installing Python 3.8 or above, install Harlequin using pip or pipx with:

$ pipx install harlequin

You may want to install Harlequin with one or more extras, which provide additional features like additional database support or remote file viewing. That would look like this:

$ pipx install harlequin[postgres,s3]

Using Harlequin with DuckDB

Harlequin defaults to using its DuckDB database adapter.

From any shell, to open one or more DuckDB database files:

$ harlequin "path/to/duck.db" "another_duck.db"

To open an in-memory DuckDB session, run Harlequin with no arguments:

$ harlequin

If you want to control the version of DuckDB that Harlequin uses, see the Troubleshooting page.

Using Harlequin with SQLite and Other Adapters

Harlequin also ships with a SQLite3 adapter. You can open one or more SQLite database files with:

$ harlequin -a sqlite "path/to/sqlite.db" "another_sqlite.db"

Like DuckDB, you can also open an in-memory database by omitting the paths:

$ harlequin -a sqlite

Other adapters can be installed using pip install <adapter package> or pipx inject harlequin <adapter package>, depending on how you installed Harlequin. Several adapters are under active development; for a list of known adapters provided either by the Harlequin maintainers or the broader community, see the adapters page.

Using Harlequin with Django

django-harlequin provides a command to launch Harlequin using Django’s database configuration, like:

$ ./manage.py harlequin

Getting Help

To view these docs from within the app, press F1.

To view all command-line options for Harlequin and all installed adapters, after installation, simply type:

$ harlequin --help

See the Troubleshooting guide for help with key bindings, appearance issues, copy-paste, etc.

GitHub Issues are the best place to report bugs.

GitHub Discussions are a good place to ask questions, request features, and more.