Use Claude to clean Beancount accounts and prep VAT figures

A poster used Claude Code to organize a Beancount ledger and build a script that prints quarterly Swiss VAT return values.

Done with Claude Codeยท Intermediateยท Jul 2025

What they did
They kept the company books in Beancount and pointed Claude Code at the plain-text ledger, while being careful not to let it rewrite the books on its own. For a Swiss quarterly VAT filing, they first had it suggest chart-of-accounts cleanup, then asked it to write Beancount queries, and finally had it generate a small script that outputs the numbers needed for the return. They later used the same CLI to create Swiss QR-bill invoices and record them in the ledger, while leaving harder tasks like receipt reading and account guessing to the agent.
How it went
This turned VAT prep into a repeatable script-driven process and also opened the door to invoicing, statement importers, and possibly year-end reports. The poster still keeps the actual arithmetic and statutory output in deterministic CLI code, rather than letting the model do the calculations.
Tips
Keep sensitive financial data and trust boundaries in mind when using hosted AI tools. A good pattern is to let the agent propose and orchestrate, but require a script to do the final numbers.

Try it yourself with Claude Code

I keep my books in Beancount at [path]. First, review my chart of accounts and suggest specific merges, splits, and renames for [problem areas], but do not change any files yet. Then write a small script that uses Beancount queries to compute the figures I need for [VAT return period] and prints each box value with the transactions that support it. Stop and ask for my approval before editing the ledger, creating files, sending anything, or making any irreversible change. After that, help me extend the same setup to [invoicing / statement import / reports] if it fits the ledger structure.

Fill in the [brackets]. Agents can make mistakes, so review anything before it is sent, paid or deleted.

Read the original on reddit.com โ†—

Get 3 agent uses like this every morning

With the day's top AI news. Free, and one click to unsubscribe.