# 使用 Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, zypper 安装 ledger

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

## 安装

```sh
sudo av install brew:ledger
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install ledger
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install ledger
```

  证据: MacPorts ports tree: finance/ledger/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add ledger
```

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

- Debian apt (92%):

```sh
sudo apt install ledger
```

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

- dnf (92%):

```sh
sudo dnf install ledger
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#ledger
```

  证据: nixpkgs package indexes: pkgs/by-name/le/ledger/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S ledger
```

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

- zypper (92%):

```sh
sudo zypper install ledger
```

  证据: openSUSE Tumbleweed package metadata: ledger from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

## 软件包事实

- **软件包键:** brew:ledger
- **软件包管理器:** Homebrew
- **版本:** 3.4.1
- **来源摘要:** Command-line, double-entry accounting tool
- **主页:** <https://ledger-cli.org/>
- **仓库:** <https://github.com/ledger/ledger>
- **最后更新:** 2026-06-22T14:05:09-07:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- ledger (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 3.4.1
## 项目历史与用法

Ledger is a command-line, double-entry accounting system built around plain-text journals. Users write transactions in Ledger's text format and run reports from the Unix shell without a separate database.

### 项目历史

The official Ledger site says Ledger began in 2003, was written by John Wiegley, and is released under the BSD license. Its design centers on text files, double-entry accounting, and report generation rather than a graphical accounting database.

The GitHub repository continues that positioning: Ledger reads text files, generates reports, and stores no other database state. The project accumulated a long 3.x release history, with signed tags and release maintenance visible through the ledger/ledger repository.

### 采用历史

Ledger became one of the foundational tools in the plain-text accounting community. Package-manager coverage across Homebrew, Debian, Ubuntu, Fedora, Arch, MacPorts, Nix, Alpine, and openSUSE reflects adoption by Unix users who prefer version-controlled finance data and scriptable reports.

### 使用方式

The basic workflow is to keep a journal file of dated transactions, then run commands such as balance, register, equity, prices, and other reports. The documentation emphasizes that Ledger has no graphical interface and returns accounting to text journals and shell output.

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

Ledger is package-nerd significant because it helped define plain-text accounting as a durable command-line category. It also inspired ports and related tools, including editor modes, hledger, Beancount, and ecosystem utilities that treat financial records as auditable text.

### 时间线

- 2003: Ledger began, according to the official project site.
- 2003-2009: Ledger 2.6 documentation carries John Wiegley's copyright range.
- 2020-05-01: v3.2.0 tag published.
- 2023-02-08: v3.3.0 tag published.
- 2023-03-30: v3.3.2 release published.

### Related projects

- Related projects include ledger-mode for Emacs, vim-ledger, hledger, Beancount, Fava, plain-text-accounting workflows, and shell/reporting tools that consume Ledger journals.

### 来源

- <https://formulae.brew.sh/formula/ledger>
- <https://github.com/ledger/ledger>
- <https://github.com/ledger/ledger-mode>
- <https://github.com/ledger/ledger/releases>
- <https://github.com/ledger/ledger/tags>
- <https://ledger-cli.org/>
- <https://ledger-cli.org/2.6/doc/ledger.html>
- <https://ledger-cli.org/doc/ledger3.html>


## 安全说明

narrow executable package without higher-risk signals.

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


## 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: $XDG_CONFIG_HOME, ~/.config/ledger/ledgerrc, ~/.ledgerrc, ./.ledgerrc
## 其他软件包管理器记录

- Debian apt - ledger - 3.3.2-1+b4: normalized package name match | Debian stable package indexes: ledger from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | command-line double-entry accounting program | http://ledger-cli.org
- Debian apt - python3-ledger - 3.3.2-1+b4: normalized package name match | Debian stable package indexes: python3-ledger from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | command-line double-entry accounting program (python3 extension) | http://ledger-cli.org
- Nix - ledger: normalized package name match | nixpkgs package indexes: pkgs/by-name/le/ledger/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - ledger - 3.3.2-1build4: normalized package name match | Ubuntu 24.04 LTS package indexes: ledger from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | command-line double-entry accounting program | http://ledger-cli.org
- Ubuntu apt - python3-ledger - 3.3.2-1build4: normalized package name match | Ubuntu 24.04 LTS package indexes: python3-ledger from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | command-line double-entry accounting program (python3 extension) | http://ledger-cli.org
- apk - ledger - 3.4.1-r0: normalized package name match | Alpine Linux edge package indexes: ledger from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Double-entry accounting system with a command-line reporting interface | https://www.ledger-cli.org/
- apk - ledger-doc - 3.4.1-r0: normalized package name match | Alpine Linux edge package indexes: ledger-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Double-entry accounting system with a command-line reporting interface (documentation) | https://www.ledger-cli.org/
- dnf - ledger - 3.4.1-4.fc45: normalized package name match | Fedora Rawhide package metadata: ledger from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | A powerful command-line double-entry accounting system | https://ledger-cli.org/
- dnf - ledger-devel - 3.4.1-4.fc45: normalized package name match | Fedora Rawhide package metadata: ledger-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Libraries and header files for ledger development | https://ledger-cli.org/
- dnf - python3-ledger - 3.4.1-4.fc45: normalized package name match | Fedora Rawhide package metadata: python3-ledger from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Python library for ledger | https://ledger-cli.org/
- pacman - ledger - 3.4.1-5: normalized package name match | Arch Linux sync databases: ledger from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Double-entry accounting system with a command-line reporting interface | https://ledger-cli.org
- zypper - ledger - 3.3.2-4.7: normalized package name match | openSUSE Tumbleweed package metadata: ledger from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Double-entry accounting system with a command-line reporting interface | https://github.com/ledger/ledger
- MacPorts - ledger: normalized package name match | MacPorts ports tree: finance/ledger/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

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


## 来源

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