Harlequin CLI

Harlequin provides a terminal SQL editor, while its bundled hsql runs queries and explores database structure for agents.

  • 6,512 ★ on the repository
  • Last commit
  • MIT
CLI

Extended access

Why this level

  • SQL without read-only restrictions can modify data allowed by the connected account.
All reasons and checks

tconbeer/harlequin

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add cli/harlequin

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • SQL without read-only restrictions can modify data allowed by the connected account.

This is third-party code. Review the repository files before installing.

What it does

Harlequin edits and executes SQL in a terminal interface. DuckDB and SQLite adapters are included, with other databases available through separate packages. Users choose connections, browse catalogs and inspect query results. The bundled `hsql` command serves agents and scripts without an interactive screen, sharing the same adapters and profiles. It executes queries, lists schema objects and searches the catalog. Read-only mode and timeouts constrain work when supported by the selected adapter.

Who it is for. SQL analysts needing a manual editor and an agent-friendly command sharing connection profiles.

Good fit when

  • Open local DuckDB or SQLite in a terminal editor.
  • Let an agent inspect a schema without writing SQL.
  • Share a connection profile between manual work and scripts.
  • Apply read-only access and a time limit to an exploratory query.

Not a fit when

  • The adapter cannot enforce required read-only or timeout constraints.
  • You need centralized database-access approval management.
  • All external databases must work without extra adapters.

Example request

Inspect the database catalog with read-only hsql and find customer_id columns without fetching user rows.

Limitations

Extra adapters must be installed in the same environment as Harlequin; the main CLI does not include every database driver. Given a nonexistent DuckDB file path, the client can create a new database, so check connection strings. Not every adapter can enforce `--read-only` or a timeout; the client refuses to start the query if the adapter cannot enforce the requested protection. Queries without read-only mode use account permissions and can modify data, so prepare a dedicated agent profile.

How to disable. Exit Harlequin or hsql and remove unneeded profiles. Closing the client does not undo completed queries.

FAQ

Is hsql a separate installation?

No. It ships with Harlequin and shares adapters and configuration.

What opens without arguments?

An in-memory DuckDB session. Check paths before using database files.

How do I choose SQLite?

Use `--adapter sqlite` with a file or omit it for an in-memory session.

Can I inspect just the schema?

Yes. `hsql --catalog --path mydb.analytics` lists schema objects, while `hsql --catalog-search customer_id` searches the whole catalog. Substitute your own names.

How do I keep shared profiles free of passwords?

Use configuration environment-variable substitution and store real secrets separately.

Discussion

No questions or reviews yet.

CLI tools
Official

A desktop SQL workspace with a built-in MCP server: the agent reads the schema and runs queries in the same client you already use

MCP serverBroad access5.4KRepository stars

The SQL client combines terminal database browsing with batch queries for agents using named connections and JSON results.

CLIExtended access5KRepository stars
Editors’ pick

A token-lean MCP server for PostgreSQL, MySQL, MariaDB, SQL Server and SQLite with a read-only mode

MCP serverBroad access3.8KRepository stars

dblab is a terminal SQL client with saved connection profiles and optional password storage in the operating system keyring.

CLIExtended access3.2KRepository stars

The CLI runs SQL over CSV, JSON and other tabular files so agents can join exports and select output formats.

CLIExtended access2.2KRepository stars

The CLI imports CSV and JSON into SQLite, runs SQL and reshapes tables for agent-assisted local data preparation.

CLIExtended access2.2KRepository stars

README in short

Profiles support environment substitution. hsql can show, validate and describe configuration schemas.

README badge

Report a problem

Foxx AIHarlequin
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.