---
name: "ledger2beancount"
section: "5"
platform: "linux"
package: "ledger2beancount"
version: "2.7-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/ledger2beancount/5"
---

# ledger2beancount(5)

configuration file for ledger2beancount(1)

## NAME

ledger2beancount - configuration file for [**ledger2beancount**(1)](/ledger2beancount/1.md)

## INPUT OPTIONS

The following options may be needed for **ledger2beancount** to interpret your **ledger** files correctly.

**date\_format** \<string\>

The date format used in your **ledger** file (default: **%Y-%m-%d**).

**date\_format\_no\_year** \<string\>

The date format for dates without the year when **ledger**'s **Y**/**year** directive is used (default: **%m-%d**).

**ledger\_indent** \<int\>

Sets the indentation level used in your ledger file (default: **4**).

**decimal\_comma** true\|false

Parses amounts with the decimal comma (e.g. **10,00 EUR**).  Set this option to **true** if you use option **--decimal-comma** in **ledger**.

**hledger** true\|false

Tells **ledger2beancount** whether to attempt to parse [**hledger**(1)](/hledger/1.md)-specific features.

## OTHER OPTIONS

**beancount\_indent** \<int\>

Sets the indentation level for the generated beancount file (default: **2**).

**operating\_currencies**

A list of frequently used currencies.  This is used by **fava**, the web UI for beancount.

**automatic\_declarations** true\|false

Emit account and commodity declarations. (Default: **true**)

Note: the declarations done in ledger via **account** and **commodity** declarations are always converted.  If this option is **true**, declarations are created for those which have not been explicitly declared in **ledger** but used.

**account\_open\_date** \<string\>

The date used to open accounts (default: **1970-01-01**).

**commodities\_date** \<string\>

The date used to create commodities (default: **1970-01-01**).

**beancount\_header** \<file\>

Specifies a file which serves as a beancount "header", i.e. it's put at the beginning of the converted beancount file.  You can use such a header to specify options for beancount, such as **option "title"**, define **plugin** directives or beancount **query** information.

**ignore\_marker** \<string\>

Specifies a marker that tells [**ledger2beancount**(1)](/ledger2beancount/1.md) to ignore a line if the marker is found.

**keep\_marker** \<string\>

Specifies a marker that tells [**ledger2beancount**(1)](/ledger2beancount/1.md) to take a line from the input that is commented out, uncomment it and display it in the output.

**convert\_virtual** true\|false

Specifies whether virtual postings should be converted.  If set to **true**, virtual postings in brackets will be made into real accounts.  (Virtual postings in parentheses are always ignored, regardless of this option.)

**account\_map**

Specifies a hash of account names to be mapped to other account names.

**account\_regex**

Specifies a hash of regular expressions to replace account names.

**commodity\_map**

Specifies a mapping of **ledger** commodities to beancount commodities.

**metadata\_map**

Specifies a mapping of **ledger** metadata keys to corresponding **beancount** keys.

**payee\_tag** and **payer\_tag**

Specify a metadata tag (after the mapping done by **metadata\_map**) used to set the payee.

**narration\_tag**

Specify a metadata tag (after the mapping done by **metadata\_map**) used to set the narration.

**payee\_split**

Specifies a list of regular expressions to split **ledger**'s payee field into payee and narration.  You have to use the named capture groups **payee** and **narration**.

**payee\_match**

Specifies a list of regular expressions and corresponding payees. The whole **ledger** payee becomes the narration and the matched payee from the regular expression becomes the payee.

**postdate\_tag** \<string\>

Specifies the metadata tag to be used to store posting dates. (Use the empty string if you don't want the metadata to be added to beancount.)

**auxdate\_tag** \<string\>

Specifies the metadata tag to be used to store auxiliary dates (also known as effective dates; or **date2** in **hledger**). (Use the empty string if you don't want the metadata to be added to beancount.)

**code\_tag** \<string\>

Specifies the metadata tag to be used to store transaction codes. (Use the empty string if you don't want the metadata to be added to beancount.)

**link\_match**

Specifies a list of regular expressions that will cause a tag to be rendered as a link.

**link\_tags**

Specifies a list of metadata tags whose values should be converted to **beancount** links instead of metadata. Tags are case insensitive and values must not contain whitespace.

**currency\_is\_commodity**

Specifies a list of commodities that should be treated as commodities rather than currencies even though they consist of 3 characters (which is usually a characteristic of a currency).  Expects beancount commodities (i.e. after transformation and mapping).

**commodity\_is\_currency**

Specifies a list of commodities that should be treated as currencies (in the sense that cost is not retained). Expects beancount commodities (i.e. after transformation and mapping).

**move\_posting\_tags**

Move posting-level tags to the transaction itself to work around the lack of posting-level tags in beancount.

## AUTHORS

Stefano Zacchiroli and Martin Michlmayr

## SEE ALSO

[**ledger2beancount**(1)](/ledger2beancount/1.md), [**ledger**(1)](/ledger/1.md), [**hledger**(1)](/hledger/1.md)

The full documentation for **ledger2beancount** can be found in its manual.
