# 使用 Homebrew, apk, apt, dnf, Nix, pacman 安装 beancount

查看 beancount 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:beancount
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install beancount
```

  证据: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add beancount
```

  证据: Alpine Linux edge package indexes: beancount from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install beancount
```

  证据: Debian stable package indexes: beancount from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install beancount
```

  证据: Fedora Rawhide package metadata: beancount from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#beancount
```

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

- pacman (92%):

```sh
sudo pacman -S treeify
```

  证据: Arch Linux sync databases: treeify from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

## 软件包事实

- **软件包键:** brew:beancount
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/beancount>
- **版本:** 3.2.3
- **来源摘要:** Double-entry accounting tool that works on plain text files
- **主页:** <https://beancount.github.io/>
- **仓库:** <https://github.com/beancount/beancount>
- **上游文档:** <http://furius.ca/beancount/doc/index>
- **许可证:** GPL-2.0-only
- **源码归档:** <https://files.pythonhosted.org/packages/eb/21/ed48e671a5e474c620762a7ea9c6b7f402f847d74dd2b73ceb5d2dec79a3/beancount-3.2.3.tar.gz>
- **最后更新:** 2026-05-06T23:28:24Z
- **已生成:** 2026-07-08T18:08:21+00:00

## 可执行文件

- bean-check (cli)
- bean-doctor (cli)
- bean-example (cli)
- bean-format (cli)
- treeify (cli)
- bean-check (别名)
- bean-doctor (别名)
- bean-example (别名)
- bean-format (别名)
- treeify (别名)

## 依赖

- certifi
- python@3.14

## 构建依赖

- bison
- meson
- ninja

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-07-08
- 管理器版本: 3.2.3
- 管理器更新时间: 2026-05-06
- 本地数据: OK
- 上游仓库: https://beancount.github.io/
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

Beancount is Martin Blais's plain-text, double-entry accounting system: users keep financial records in text files, validate them, query them, and generate reports or web views from the same ledger data.

In package-manager culture it sits in the same command-line-accounting family as Ledger and hledger, but with a Python implementation, an explicit grammar, inventory-aware reporting, and a strong bias toward durable text data.

### 项目历史

The official history says John Wiegley's Ledger inspired the first Beancount. Blais first experimented with a Python interface to Ledger, then rewrote the idea in Python so one parsed transaction database could serve multiple reports and a web UI.

Beancount version 1 was used continuously by its author for personal, company, and joint-property finances from 2008 to 2012. In 2013, Blais redesigned the system around better inventory and capital-gains handling, a lex/yacc-parsed input language, and a cleaner internal model; this became Beancount version 2.

The README describes three generations: v1 as the original Ledger-like implementation, v2 as the 2013 rewrite and long-running stable branch, and v3 as the stable line since June 2024, trimmed down so several former v2 tools live as independent GitHub projects.

### 采用历史

Beancount grew out of real personal-accounting use rather than a vendor product. Its README notes use by many users, companies, and foundations since the project began around 2007, while the history page emphasizes several years of the author's own ledger data as design pressure.

The package is available through many Unix package systems in the supplied metadata, including Homebrew, Debian, Ubuntu, Fedora, Alpine, Nix, and related distributions, which is typical for command-line accounting tools that users want installed beside editors, shell scripts, and version control.

### 使用方式

Common command-line entry points include bean-check for validation, bean-format for formatting, bean-doctor for diagnostics, bean-example for sample data, and treeify. Users normally edit a ledger file directly, then run Beancount tools against that file.

The Beancount query language adds a SQL-like shell over parsed accounting entries. Its documentation explains that ordinary SQL export was not enough for inventory and lot-aware accounting, so Beancount provides accounting-specific query semantics.

### 为什么软件包爱好者会关心

Beancount matters to package nerds because it is finance software that behaves like source code: text files, reproducible command-line checks, scriptable reporting, and data that can be kept in Git for decades.

Its history captures a classic Unix-package story: a domain expert liked an existing text tool, rebuilt the model with stricter semantics, and then let the ecosystem split into small installable tools as the core matured.

### 时间线

- 2008: Official history records Beancount as begun, after Ledger inspired the first version.
- 2008-2012: The author used Beancount v1 continuously for personal, company, and joint-property finances.
- 2013: Beancount v2 was rewritten from scratch with a new grammar and cleaner inventory model.
- 2014: The official history and query-language documentation were published as part of a larger documentation effort.
- 2020-2024: The README describes v2 as the previous stable version in maintenance mode.
- 2024: Beancount v3 became the current stable version in June, with several former tools moved into independent projects.

### Related projects

- Ledger and hledger are the closest related command-line accounting projects; the Beancount docs explicitly compare them and credit Ledger as the original inspiration.
- beanquery is the SQL-like query tool associated with Beancount ledgers. LedgerHub is described in Beancount documentation as an import-automation design related to Beancount workflows.

### 来源

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


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 源数据库详情

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

## 其他软件包管理器记录

- Debian apt - beancount - 3.1.0-3: normalized package name match | Debian stable package indexes: beancount from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Double-entry accounting from text files | https://github.com/beancount/
- Debian apt - python3-beancount - 3.1.0-3: normalized package name match | Debian stable package indexes: python3-beancount from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Double-entry accounting from text files - Python module | https://github.com/beancount/
- Nix - beancount: normalized package name match | nixpkgs package indexes: beancount from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix
- Ubuntu apt - beancount - 2.3.6-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: beancount from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Double-entry accounting from text files | https://github.com/beancount/
- Ubuntu apt - python3-beancount - 2.3.6-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: python3-beancount from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Double-entry accounting from text files - Python module | https://github.com/beancount/
- apk - beancount - 2.3.6-r1: normalized package name match | Alpine Linux edge package indexes: beancount from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Double-Entry Accounting from Text Files | https://beancount.github.io/
- apk - beancount-pyc - 2.3.6-r1: normalized package name match | Alpine Linux edge package indexes: beancount-pyc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Precompiled Python bytecode for beancount | https://beancount.github.io/
- dnf - beancount - 3.1.0-7.fc45: normalized package name match | Fedora Rawhide package metadata: beancount from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Double-Entry Accounting from Text Files | https://beancount.github.io/docs/
- pacman - treeify - r7958.90292b20-3: installed executable or alias match | Arch Linux sync databases: treeify from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Display a list of files as a tree | https://github.com/grawity/code/blob/master/misc/treeify


## 相关链接

- [Source-control packages](https://www.automicvault.com/zh-hans/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/zh-hans/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/zh-hans/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Networking and protocol packages](https://www.automicvault.com/zh-hans/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [python@3.14](https://www.automicvault.com/zh-hans/pkg/brew/python-3-14/) - Runtime dependency declared by Homebrew.
- [bison](https://www.automicvault.com/zh-hans/pkg/brew/bison/) - Build dependency declared by Homebrew.
- [meson](https://www.automicvault.com/zh-hans/pkg/brew/meson/) - Build dependency declared by Homebrew.
- [ninja](https://www.automicvault.com/zh-hans/pkg/brew/ninja/) - Build dependency declared by Homebrew.
- [ledger](https://www.automicvault.com/zh-hans/pkg/brew/ledger/) - Shares av.db curated category or tags: accounting, cli, productivity.
- [fava](https://www.automicvault.com/zh-hans/pkg/brew/fava/) - Shares av.db curated category or tags: accounting, cli, finance, productivity.
- [hledger](https://www.automicvault.com/zh-hans/pkg/brew/hledger/) - Shares av.db curated category or tags: accounting, cli, finance, productivity.
- [rustledger](https://www.automicvault.com/zh-hans/pkg/brew/rustledger/) - Shares av.db curated category or tags: accounting, cli, finance, productivity.
- [bagels](https://www.automicvault.com/zh-hans/pkg/brew/bagels/) - Shares av.db curated category or tags: cli, finance, productivity.
- [homebank](https://www.automicvault.com/zh-hans/pkg/brew/homebank/) - Shares av.db curated category or tags: accounting, cli, finance, productivity.
- [invoice](https://www.automicvault.com/zh-hans/pkg/brew/invoice/) - Shares av.db curated category or tags: cli, finance, productivity.
- [klog](https://www.automicvault.com/zh-hans/pkg/brew/klog/) - Shares av.db curated category or tags: cli, plain-text, productivity.

## Combined YAML source

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


## 来源

- 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
