beancount-cli: a modern, agent-friendly CLI

133 views
Skip to first unread message

Roman Medvedev

unread,
Feb 27, 2026, 8:40:00 AM (8 days ago) Feb 27
to Beancount
Hi everyone,

Just wanted to share a project I've been working on: beancount-cli.

It's a modern CLI built on Beancount v3 and Pydantic. Beyond the standard ledger tasks, I've been focusing on making it "agent-friendly"—meaning it plays really well with AI assistants and automated workflows through descriptive help strings and built-in JSON schema discovery.

Try it instantly without installing: uvx --from beancount-cli bean check main.beancount

usage: bean [-h] [--file LEDGER_FILE] [--version] [--format {table,json,csv}] {check,tree,report,transaction,account,commodity,format,price} ...

Beancount CLI tool for managing ledgers.

positional arguments:
  {check,tree,report,transaction,account,commodity,format,price}
    check               Validate the ledger file
    tree                Visualize the tree of included files
    report              Generate simple reports.
    transaction         Manage transactions.
    account             Manage accounts.
    commodity           Manage commodities.
    format              Format ledger file(s)
    price               Fetch and update prices

options:
  -h, --help            show this help message and exit
  --file, -f LEDGER_FILE
                        Path to main.beancount file
  --version             Show version
  --format {table,json,csv}
                        Global output format

Environment Variables:
  BEANCOUNT_FILE    Default ledger file to use if --file (-f) is not specified.
 
Global Flags:
  --format json     Best for single-item structural responses or piping into `jq`.
  --format csv      Highly recommended for AI Agents querying lists (3-5x token savings).
  --format table    Default terminal formatting for human-readable outputs.

Repo: https://github.com/romamo/beancount-cli

Feedback or PRs are very welcome.

Cheers, Roman

Klaus A

unread,
Feb 28, 2026, 4:08:29 AM (7 days ago) Feb 28
to Beancount
Hi Roman,

perjantai 27. helmikuuta 2026 klo 15.40.00 UTC+2 mste...@gmail.com kirjoitti:

Repo: https://github.com/romamo/beancount-cli

Feedback or PRs are very welcome.

thanks for starting this, looks promising. I already opened first tiny PR (validation fix)
and I'm working on next (adding tab completion). I like the fact that with this kind of
tool it is easier to keep things coherent and document enough into the tool itself
to make it useful.

Do you have some sort of roadmap for the tool, are you actively working on
adding new things? Are you also open for architectural changes, would you e.g.
consider replacing argparse with Typer/Click if that would seem like good option
to organise the CLI?

thanks,
klaus
 
Message has been deleted

Roman Medvedev

unread,
Mar 2, 2026, 9:06:28 PM (4 days ago) Mar 2
to Beancount
Thank you, Klaus. Merged your PRs.

I build an AI portfolio manager and an AI accountant agent. They will be open-sourced soon.

Typer and Click were removed from the release because argparse integrated with pydantic provides a more flexible and strictly typed way to define the interface at the same time.
I'll refactor and reorganize cli too.

Martin Blais

unread,
Mar 5, 2026, 8:34:07 PM (2 days ago) Mar 5
to bean...@googlegroups.com
Thank you for sharing, will add to contrib resources.
Consider writing a skill specifically for your tool.

--
You received this message because you are subscribed to the Google Groups "Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beancount+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/beancount/b4231877-b9f6-4086-a2f3-f8b6dc7854c9n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages