---
name: "bean-format"
section: "1"
platform: "linux"
package: "beancount"
version: "2.3.5-2"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/bean-format"
---

# bean-format(1)

pretty print and align a Beancount ledger

## NAME

bean-format - pretty print and align a Beancount ledger

## DESCRIPTION

usage: bean-format \[-h\] \[--version\] \[-o OUTPUT\] \[-w PREFIX\_WIDTH\]

-

  \[-W NUM\_WIDTH\] \[-c CURRENCY\_COLUMN\] \[filename\]

Align a beancount/ledger input file's numbers. This reformats at beancount or ledger input file so that the amounts in the postings are all aligned to the same column. The currency should match. Note: this does not parse the Beancount ledger. It simply uses regular expressions and text manipulations to do its work.

### positional arguments:

- filename

  Beancount filename

### options:

- **-h**, **--help**

  show this help message and exit

- **--version**, **-V**

  show program's version number and exit

- **-o** OUTPUT, **--output** OUTPUT

  Output file (stdout if not specified)

- **-w** PREFIX\_WIDTH, **--prefix-width** PREFIX\_WIDTH

  Use this prefix width instead of determining an optimal value automatically

- **-W** NUM\_WIDTH, **--num-width** NUM\_WIDTH

  Use this width to render numbers instead of determining an optimal value

- **-c** CURRENCY\_COLUMN, **--currency-column** CURRENCY\_COLUMN

  Align currencies in this column.
