# Install beanquery with Homebrew, Nix, apt

Customizable lightweight SQL query tool. Version 0.2.0 via Homebrew; verified 2026-07-13. Also installable with debian: sudo apt install python3-beanquery.

## Install

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

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install beanquery
```

  Evidence: local Homebrew formula metadata

### Linux

- 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

- 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

## Package facts

- **Package key:** brew:beanquery
- **Package manager:** Homebrew
- **Version:** 0.2.0
- **Source summary:** Customizable lightweight SQL query tool
- **Homepage:** <https://github.com/beancount/beanquery>
- **Last updated:** 2026-07-13T12:20:50Z
- **Generated:** 2026-08-03T19:37:03+00:00

## Executables

- bean-query (alias)

## Install behavior

- Bottle: not available

## Freshness

- Page generated: 2026-08-03
- Package-manager version: 0.2.0
## 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

## 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


## Combined YAML source

View the package source record on GitHub. [combined/beanquery.yml](https://github.com/mxcl/pkgdb/blob/main/combined/beanquery.yml)


## Sources

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
