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

# bean-doctor(1)

Beancount debugging tool

## NAME

bean-doctor - Beancount debugging tool

## DESCRIPTION

usage: bean-doctor \[-h\] \[--version\] command \[filename\] \[rest ...\]

Debugging tool for those finding bugs in Beancount.

This tool is able to dump lexer/parser state, and will provide other services in the name of debugging.

### positional arguments:

- command

  The command to run.

- filename

  Beancount input filename.

- rest

  All remaining arguments.

### options:

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

  show this help message and exit

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

  show program's version number and exit

### Available Commands:

- lex

  : Dump the lexer output for a Beancount syntax file.

- dump\_lexer

  : Dump the lexer output for a Beancount syntax file.

- parse

  : Run the parser in debug mode.

- roundtrip

  : Round-trip test on arbitrary Ledger.

- directories

  : Validate a directory hierarchy against a ledger's account names.

- list\_options

  : Print out a list of the available options.

- print\_options

  : Print out the actual options parsed from a file.

- deps

  : Report on the runtime dependencies.

- checkdeps

  : Report on the runtime dependencies.

- context

  : Describe the context that a particular transaction is applied to.

- linked

  : Print out a list of transactions linked to the one at the given line.

- missing\_open

  : Print out Open directives that are missing for the given input file.

- display\_context

  : Print out the precision inferred from the parsed numbers in the input file.

- validate\_html

  : Validate all the HTML files under a directory hierarchy.
