Package: harlequin
HarlequinThe SQL IDE for Your Terminal.Installing HarlequinAfter installing Python 3.8 or above, install Harlequin usingpiporpipxwith:pipxinstallharlequinUsing Harlequin with DuckDBFrom 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:harlequinIf you want to control the version of DuckDB that Harlequin uses, see theTroubleshootingpage.Using Harlequin with SQLite and Other AdaptersHarlequin also ships with a SQLite3 adapter. You can open one or more SQLite database files with:harlequin-asqlite"path/to/sqlite.db""another_sqlite.db"Like DuckDB, you can also open an in-memory database by omitting the paths:harlequin-asqliteOther adapters can be installed usingpip install <adapter package>orpipx inject harlequin <adapter package>, depending on how you installed Harlequin. For a list of known adapters provided either by the Harlequin maintainers or the broader community, see theadapterspage in the docs.Getting HelpTo view all command-line options for Harlequin and all installed adapters, after installation, simply type:harlequin--helpTo view a list of all key bindings (keyboard shortcuts) within the app, press F1. You can also view this list outside the appin the docs.COLOR, KEY BINDING, OR COPY-PASTE PROBLEMS? SeeTroubleshootingin the docs.More info atharlequin.shVisitharlequin.shfor an overview of features and full documentation.ContributingThanks for your interest in Harlequin! Harlequin is primarily maintained byTed Conbeer, but he welcomes all contributions and is looking for additional maintainers!Providing FeedbackWe'd love to hear from you!Open an Issueto request new features, report bugs, or say hello.Setting up Your Dev Environment and Running TestsInstall Poetry v1.2 or higher if you don't have it already. You may also need or want pyenv, make, and gcc.Fork this repo, and then clone the fork into a directory (let's call itharlequin), thencd harlequin.Usepoetry install --syncto install the project (editable) and its dependencies (including all test and dev dependencies) into a new virtual env.Usepoetry shellto spawn a subshell.Typemaketo run all tests and linters, or runpytest,black .,ruff . --fix, andmypyindividually.Opening PRsPRs should be motivated by an open issue. If there isn't already an issue describing the feature or bug,open one. Do this before you write code, so you don't waste time on something that won't get merged.Ideally new features and bug fixes would be tested, to prevent future regressions. Textual provides a test harness that we use to test features of Harlequin. You can find some examples in thetestsdirectory of this project. Please include a test in your PR, but if you can't figure it out, open a PR to ask for help.Open a PR from your fork to themainbranch oftconbeer/harlequin. In the PR description, link to the open issue, and then write a few sentences aboutwhyyou wrote the code you did: explain your design, etc.Ted may ask you to make changes, or he may make them for you. Don't take this the wrong way -- he values your contributions, but he knows this isn't your job, either, so if it's faster for him, he may push a commit to your branch or create a new branch from your commits.