Coder Social home page Coder Social logo

harlequin's Introduction

Harlequin

PyPI

PyPI - Python Version Runs on Linux | MacOS | Windows

The SQL IDE for Your Terminal.

Harlequin

Installing Harlequin

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

pipx install harlequin

Using Harlequin with DuckDB

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. For a list of known adapters provided either by the Harlequin maintainers or the broader community, see the adapters page in the docs.

Getting Help

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

harlequin --help

To view a list of all key bindings (keyboard shortcuts) within the app, press F1. You can also view this list outside the app in the docs.

COLOR, KEY BINDING, OR COPY-PASTE PROBLEMS? See Troubleshooting in the docs.

More info at harlequin.sh

Visit harlequin.sh for an overview of features and full documentation.

Contributing

Thanks for your interest in Harlequin! Harlequin is primarily maintained by Ted Conbeer, but he welcomes all contributions and is looking for additional maintainers!

Providing Feedback

We'd love to hear from you! Open an Issue to request new features, report bugs, or say hello.

Setting up Your Dev Environment and Running Tests

  1. Install Poetry v1.2 or higher if you don't have it already. You may also need or want pyenv, make, and gcc.
  2. Fork this repo, and then clone the fork into a directory (let's call it harlequin), then cd harlequin.
  3. Use poetry install --sync to install the project (editable) and its dependencies (including all test and dev dependencies) into a new virtual env.
  4. Use poetry shell to spawn a subshell.
  5. Type make to run all tests and linters, or run pytest, black ., ruff . --fix, and mypy individually.

Opening PRs

  1. PRs 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.
  2. 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 the tests directory 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.
  3. Open a PR from your fork to the main branch of tconbeer/harlequin. In the PR description, link to the open issue, and then write a few sentences about why you wrote the code you did: explain your design, etc.
  4. 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.

harlequin's People

Contributors

tconbeer avatar dependabot[bot] avatar github-actions[bot] avatar dljsjr avatar aaronsteers avatar code-master-ajay avatar mause avatar zqianem avatar joshtemple avatar tylerhillery avatar vyshnav-vinod avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.