# Install harlequin with Homebrew, Nix

Easy, fast, and beautiful database client for the terminal. Version 2.5.2 via Homebrew; verified 2026-04-23.

## Install

```sh
sudo av install brew:harlequin
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install harlequin
```

  Evidence: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#harlequin
```

  Evidence: nixpkgs package indexes: pkgs/by-name/ha/harlequin/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## Package facts

- **Package key:** brew:harlequin
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/harlequin>
- **Version:** 2.5.2
- **Source summary:** Easy, fast, and beautiful database client for the terminal
- **Homepage:** <https://harlequin.sh>
- **Repository:** <https://github.com/tconbeer/harlequin>
- **Upstream docs:** <https://harlequin.sh/docs>
- **License:** MIT
- **Source archive:** <https://files.pythonhosted.org/packages/93/ce/cae8ff256fc7f4c67a89cadcefb09c230600cdea92306d4ac9354f0a1a77/harlequin-2.5.2.tar.gz>
- **Last updated:** 2026-04-23T18:52:53Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- harlequin (cli)
- harlequin (alias)

## Dependencies

- apache-arrow
- libpq
- libyaml
- numpy
- python@3.14
- unixodbc

## Build dependencies

- cmake
- ninja
- rust

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 2.5.2
- Package-manager updated: 2026-04-23
- Local data: ok
- Upstream repository: https://harlequin.sh
- info: Release/tag comparison is only available for GitHub repositories.
## Project history and usage

Harlequin is a terminal SQL IDE created by Ted Conbeer to bring editor-style database work into a TUI. It began in 2023 as a Python/Textual application centered on DuckDB, then grew into a plugin-oriented database client with adapters for SQLite, PostgreSQL, MySQL/MariaDB, ODBC, BigQuery, Trino, Databricks, ADBC, and other back ends.

### Project history

The public repository started in May 2023 with early commits for a working CLI, schema sidebar, query editor, and data viewer. The 0.0.x changelog shows a fast iteration cycle: query execution became asynchronous, SQL files could be opened and saved from the editor, DuckDB extension support landed, multiple editor buffers and multiple result tabs appeared, and database-file workflows gained read-only and export features.

Version 1.0.0, tagged in September 2023, marked the point where the core terminal database-client experience had settled enough for a named milestone. Subsequent development broadened Harlequin from a DuckDB-first SQL TUI into a general database client: the official docs describe adapter plug-ins as the generic interface to databases and list core and community adapters beyond the built-in DuckDB and SQLite support.

### Adoption history

Harlequin's adoption path follows the DuckDB and terminal-UI communities: it is installable with Python tooling, documented as having a Homebrew formula, and packaged in Homebrew and Nix in the supplied package-manager facts. Its README also notes that the Homebrew formula bundles several adapter packages, which made the formula attractive for users who wanted a single terminal SQL client with more than DuckDB support.

The project attracted package-manager attention because it sits at the intersection of several popular command-line trends: local analytical databases, terminal user interfaces, Python application packaging, and pluggable database adapters.

### How it is used

Harlequin is run as a command-line application, commonly with no arguments for an in-memory DuckDB session or with database paths/connection strings for concrete databases. Users can pass adapter options from the shell, keep profiles in TOML config files, edit and execute SQL in a terminal editor, browse catalogs, and export result data.

The adapter model is central to everyday use. The official adapter docs describe DuckDB as the default, SQLite as built in, and additional adapters as Python packages discovered at runtime, so package installs often matter as much as the core executable.

### Why package nerds care

Harlequin is interesting to package nerds because it packages a rich, stateful terminal application rather than a small single-purpose CLI. Formula maintainers have to care about Python runtime behavior, optional adapters, database client dependencies, and config discovery.

It also illustrates a newer class of Homebrew formula: a Python TUI that competes with native database CLIs by bundling editor, catalog, and result-viewer behavior into one command while still remaining scriptable enough to live in terminal workflows.

### Timeline

- 2023-05: Public repository history begins with a working CLI, schema sidebar, query editor, and data viewer.
- 2023-06: Early 0.0.x releases add multi-database catalog behavior, read-only database opening, MotherDuck support, and terminal key-binding improvements.
- 2023-09: Version 1.0.0 is tagged after rapid 0.0.x iteration.
- 2025-01: Version 2.0.0 is tagged, continuing the project after the initial SQL TUI became a broader adapter-based database client.
- 2026-03: Version 2.5.2 is tagged in the upstream repository.

### Related projects

- DuckDB is the default database target and part of Harlequin's early identity.
- Textual is the Python terminal UI framework behind Harlequin's interactive interface.
- Adapter packages such as harlequin-postgres, harlequin-mysql, and harlequin-odbc extend the core client to additional database systems.

### Sources

- Official Harlequin documentation for installation, configuration, database adapters, and DuckDB usage.
- Official Harlequin repository and release/changelog history.


## Security Notes

broad file, network, media, or database tool signal.

- **Geiger risk:** blue / medium
- broad file, network, media, or database tool signal


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: $PWD/harlequin.toml, $PWD/.harlequin.toml, $PWD/pyproject.toml, $XDG_CONFIG_HOME/harlequin/harlequin.toml, ~/.config/harlequin/harlequin.toml
## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** harlequin
- **Version Scheme:** 0
- **Revision:** 1
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## Other Package-Manager Records

- Nix - harlequin: normalized package name match | nixpkgs package indexes: pkgs/by-name/ha/harlequin/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## Related links

- [Secret-risk packages](https://www.automicvault.com/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [apache-arrow](https://www.automicvault.com/pkg/brew/apache-arrow/) - Runtime dependency declared by Homebrew.
- [libpq](https://www.automicvault.com/pkg/brew/libpq/) - Runtime dependency declared by Homebrew.
- [numpy](https://www.automicvault.com/pkg/brew/numpy/) - Runtime dependency declared by Homebrew.
- [python@3.14](https://www.automicvault.com/pkg/brew/python-3-14/) - Runtime dependency declared by Homebrew.
- [unixodbc](https://www.automicvault.com/pkg/brew/unixodbc/) - Runtime dependency declared by Homebrew.
- [cmake](https://www.automicvault.com/pkg/brew/cmake/) - Build dependency declared by Homebrew.
- [ninja](https://www.automicvault.com/pkg/brew/ninja/) - Build dependency declared by Homebrew.
- [rust](https://www.automicvault.com/pkg/brew/rust/) - Build dependency declared by Homebrew.
- [dblab](https://www.automicvault.com/pkg/brew/dblab/) - Shares av.db curated category or tags: cli, database, database-client, developer-tools, tui.
- [chdig](https://www.automicvault.com/pkg/brew/chdig/) - Shares av.db curated category or tags: cli, database, developer-tools, tui.
- [dbmate](https://www.automicvault.com/pkg/brew/dbmate/) - Shares av.db curated category or tags: cli, database, developer-tools, sql.
- [dbml-cli](https://www.automicvault.com/pkg/brew/dbml-cli/) - Shares av.db curated category or tags: cli, database, developer-tools, sql.
- [jet](https://www.automicvault.com/pkg/brew/jet/) - Shares av.db curated category or tags: cli, database, developer-tools, sql.
- [litecli](https://www.automicvault.com/pkg/brew/litecli/) - Shares av.db curated category or tags: cli, database, database-client, developer-tools.
- [mongosh](https://www.automicvault.com/pkg/brew/mongosh/) - Shares av.db curated category or tags: cli, database, database-client, developer-tools.
- [pg-schema-diff](https://www.automicvault.com/pkg/brew/pg-schema-diff/) - Shares av.db curated category or tags: cli, database, developer-tools, sql.
- [pgcli](https://www.automicvault.com/pkg/brew/pgcli/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, client, database, database-client, developer.
- [posting](https://www.automicvault.com/pkg/brew/posting/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, client, developer, developer-tools, libyaml.

## Combined YAML source

View the package source record on GitHub. [combined/harlequin.yml](https://github.com/automic-vault/db/blob/main/combined/harlequin.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
