Skip to main content

A Text User Interface for DuckDB

Project description

harlequin

A Terminal-based SQL IDE for DuckDB.

harlequin TUI

(A Harlequin is also a pretty duck.)

harlequin duck

Installing Harlequin

Use pip or pipx:

pipx install harlequin

Tip:

You can run invoke directly with pipx run anywhere that pipx is installed. For example:

  • pipx run harlequin --help
  • pipx run harlequin ./my.duckdb

Using Harlequin

To open a DuckDB database file:

harlequin "path/to/duck.db"

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

harlequin

When Harlequin is open, you can view the schema of your DuckDB database in the left sidebar.

To run a query, enter your code in the main textarea, then press Ctrl+Enter. You should see the data appear in the pane below.

You can press Tab or use your mouse to change the focus between the panes.

When the focus is on the data pane, you can use your arrow keys or mouse to select different cells.

Press Ctrl+c to quit and return to your shell.

Running Harlequin in a Container

Without a database file:

docker run ghcr.io/tconbeer/harlequin:latest

Mounting a database file ./foo.db into the container's working directory, /data:

docker run -v $(pwd)/foo.db:/data/bar.db ghcr.io/tconbeer/harlequin:latest harlequin bar.db

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

harlequin-0.0.6.tar.gz (13.1 kB view hashes)

Uploaded Source

Built Distribution

harlequin-0.0.6-py3-none-any.whl (16.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page