# Install beanquery with Homebrew, apt, Nix

Customizable lightweight SQL query tool. Version 0.2.0 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:beanquery
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install beanquery
```

  Evidence: local Homebrew formula metadata

### Linux

- Debian apt (92%):

```sh
sudo apt install python3-beanquery
```

  Evidence: Debian stable package indexes: python3-beanquery from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- Nix (92%):

```sh
nix profile install nixpkgs#beanquery
```

  Evidence: nixpkgs package indexes: beanquery from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix

## Package facts

- **Package key:** brew:beanquery
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/beanquery>
- **Version:** 0.2.0
- **Source summary:** Customizable lightweight SQL query tool
- **Homepage:** <https://github.com/beancount/beanquery>
- **Repository:** <https://github.com/beancount/beanquery>
- **Upstream docs:** <https://github.com/beancount/beanquery#readme>
- **License:** GPL-2.0-only
- **Source archive:** <https://files.pythonhosted.org/packages/7c/90/801eec23a07072dcf8df061cb6f27be6045e08c12a90b287e872ce0a12d3/beanquery-0.2.0.tar.gz>
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- bean-query (cli)
- bean-query (alias)

## Dependencies

- python@3.14

## Build dependencies

- bison
- meson
- ninja

## 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: 0.2.0
- Local data: ok
- Upstream repository: https://github.com/beancount/beanquery
- info: No package-manager update timestamp was available.
- info: No cached GitHub release or tag data was available.
## Project history and usage

beanquery is a lightweight SQL-like query tool for tabular data, especially Beancount ledger data.

### Project history

Beancount's query-language documentation describes bean-query as a custom SQL-like client created because plain SQLite export was awkward for Beancount's inventory and lot-aware accounting model.

The current beanquery repository presents it as a standalone, customizable, extensible SQL query tool that works on tabular data including Beancount ledgers.

### Adoption history

beanquery is mainly adopted as part of the Beancount ecosystem. The supplied package metadata shows it packaged for Homebrew, Debian as python3-beanquery, and Nix.

### How it is used

The Beancount docs show bean-query running interactively on a ledger file or receiving a query directly on the command line, for example to produce balances, journals, and custom accounting reports.

### Why package nerds care

beanquery is the small-tool companion to Beancount: it turns ledger data into queryable tabular output without requiring users to flatten accounting inventories into a general SQL database first.

### Timeline

- 2014: Beancount documentation says about 70 percent of the planned query-language features were implemented and the first iteration was merged.
- 2021: The official GitHub repository for beanquery was created as a separate project.
- 2024: Beancount v3's README describes former v2 tools moving into independent GitHub projects, matching beanquery's standalone packaging role.

### Related projects

- Beancount is the primary related project. The tool also overlaps conceptually with SQL shells and Beancount's older SQLite-export experiments.

### Sources

- <https://beancount.github.io/docs/beancount_query_language/>
- <https://github.com/beancount/beancount#readme>
- <https://github.com/beancount/beanquery#readme>
- input.json source_facts.package-manager


## Security Notes

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

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

## Source Database Details

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

## Other Package-Manager Records

- Debian apt - python3-beanquery - 0.2.0-1: normalized package name match | Debian stable package indexes: python3-beanquery from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Customizable lightweight SQL query tool (Python 3) | https://github.com/beancount/beanquery
- Nix - beanquery: normalized package name match | nixpkgs package indexes: beanquery from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [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.
- [python@3.14](https://www.automicvault.com/pkg/brew/python-3-14/) - Runtime dependency declared by Homebrew.
- [bison](https://www.automicvault.com/pkg/brew/bison/) - Build dependency declared by Homebrew.
- [meson](https://www.automicvault.com/pkg/brew/meson/) - Build dependency declared by Homebrew.
- [ninja](https://www.automicvault.com/pkg/brew/ninja/) - Build dependency declared by Homebrew.
- [dsq](https://www.automicvault.com/pkg/brew/dsq/) - Shares av.db curated category or tags: cli, data, query-tools, sql.
- [octosql](https://www.automicvault.com/pkg/brew/octosql/) - Shares av.db curated category or tags: cli, data, query-tools, sql.
- [qo](https://www.automicvault.com/pkg/brew/qo/) - Shares av.db curated category or tags: cli, data, query-tools, sql.
- [qp](https://www.automicvault.com/pkg/brew/qp/) - Shares av.db curated category or tags: cli, data, query-tools.
- [steampipe](https://www.automicvault.com/pkg/brew/steampipe/) - Shares av.db curated category or tags: cli, data, query, sql.
- [anyquery](https://www.automicvault.com/pkg/brew/anyquery/) - Shares av.db curated category or tags: cli, data, sql.
- [apache-drill](https://www.automicvault.com/pkg/brew/apache-drill/) - Shares av.db curated category or tags: cli, data, sql.
- [apgdiff](https://www.automicvault.com/pkg/brew/apgdiff/) - Shares av.db curated category or tags: cli, data, sql.

## Combined YAML source

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


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- 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
