Harlequin: The SQL IDE for Your Terminal
Harlequin is an innovative SQL Integrated Development Environment (IDE) designed for users who prefer working within their terminal. It provides an efficient way to manage and interact with SQL databases directly from the command line, supporting various systems including Linux, MacOS, and Windows.
Installation
To get started with Harlequin, you need to have Python 3.8 or later installed on your system. Once Python is set up, installing Harlequin is straightforward using pipx
:
pipx install harlequin
This will download and install Harlequin, allowing you to tap into its functionalities quickly.
Using Harlequin with DuckDB
Harlequin seamlessly integrates with DuckDB databases. To use Harlequin, open your terminal and run the following command to access one or more DuckDB databases:
harlequin "path/to/duck.db" "another_duck.db"
If you want to use an in-memory session without any specific database file, simply run Harlequin with no additional arguments:
harlequin
If you're dealing with a version mismatch with DuckDB, the troubleshooting page on Harlequin's website offers detailed guidance.
Working with SQLite and Other Database Adapters
In addition to DuckDB, Harlequin comes equipped with a SQLite3 adapter, making it versatile for handling different types of database files. To open SQLite databases, use:
harlequin -a sqlite "path/to/sqlite.db" "another_sqlite.db"
Likewise, you can start an in-memory session:
harlequin -a sqlite
Harlequin’s adaptability extends beyond these databases, allowing users to install other database adapters. This can be done through commands like pip install <adapter package>
or pipx inject harlequin <adapter package>
. For a comprehensive list of supported adapters, including those developed by the community, refer to the adapters section on Harlequin’s documentation.
Getting Help and Support
Navigating through Harlequin's features is made easier with built-in help options. To explore all available command-line options and adapters, simply type:
harlequin --help
Additionally, a list of key bindings, which are keyboard shortcuts available within the application, can be accessed by pressing F1, or reviewed in the documentation online.
For issues related to color display, key bindings, or copy-pasting, the troubleshooting section on Harlequin’s website provides solutions.
Learn More and Get Involved
To explore all features and access detailed documentation, visit harlequin.sh. If you're passionate about the project and would like to support its continued development, consider sponsoring Harlequin's author.
Harlequin is open to contributions from the community. Maintained primarily by Ted Conbeer, the project encourages new contributors to check the CONTRIBUTING.md
file for guidance on how to get involved.
Harlequin is a powerful tool that enhances productivity for those who prefer to work in a terminal environment. Its support for multiple databases and ease of use make it a valuable resource for database professionals and enthusiasts alike.