← Back to library

Log your spending from bank alerts on a home Pi

Fahad Hasin, a self-described non-techie in India wary of spending apps that read text messages, used Claude Code to build his own tracker. Every night a Raspberry Pi pulls bank alert emails, a local model categorizes them and updates a private ledger.

  • OutcomeSee all your spending across accounts, categorized with merchant details, without handing message access to a third-party app.
  • SetupAn afternoon+
  • LevelAdvanced
  • CreditFahad Hasin
View original
Works with
Claude CodeCustom agent

Published Oct 23, 2026Updated Oct 23, 2026AI dry run on sample input: passed Oct 23, 2026Source verified Oct 24, 2026

When should you use it?

  • You avoid finance apps that want your messages
  • Your bank sends an email per transaction
  • You have a small always-on computer

Not for: Anyone without bank alert emails; Shared mailboxes

What do you need, and what do you get?

You need

  • Mailbox with bank and merchant emails
  • Raspberry Pi or similar
  • Local language model

You get

  • Nightly categorized spending log
  • Combined totals for every bank and card

How does it work, step by step?

  1. Turn on alertsMake sure every account emails you per transaction.
  2. Have the agent build the parserAsk a coding agent to write the email reader and categorizer.
  3. Run a local modelKeep categorization on your own device.
  4. Match merchant emailsAttach order or receipt details to each charge.
  5. Schedule nightlyRun by cron and review the summary weekly.

The prompt

Our own prompt, inspired by Fahad Hasin and written to work in Claude Code and Custom agent. Values in lime are placeholders.

Prompt0 variables
Write a Python script that runs nightly on my Raspberry Pi. It should read new emails from my bank alert senders, extract amount, date, account and merchant, look for a matching merchant email from the same day to add item details, categorize each charge with the local model at [endpoint], and append rows to spending.csv. Never send data to an external service. Print a daily summary by category.

Inspired by Fahad Hasin: #40: How I am using Claude Code as a non-coder. The prompt above is written by playbooks.bot in our own words; nothing from the original is quoted.

What can go wrong?

  • Bank email formats change; check the parser when totals look odd.
  • A small local model mislabels some merchants; correct and add rules.

Our take

Privacy is the real feature here. Running on a home device with a local model means spending data need not leave the house. Fahad's setup answers a common objection to finance apps: he did not want a company reading his text messages, so the alerts are read and categorized on a Raspberry Pi at home by a local model. The trade-off is upkeep. Banks change their email formats, so if a total looks odd, check the parser first. A small local model mislabels some merchants; correct those and add rules rather than switching to a cloud model by default. Matching merchant receipts to charges makes the ledger far more useful than raw alert lines. Give the reader access only to the bank alert label, encrypt the Pi's storage, and review the weekly summary instead of trusting it blindly. This only works if every account you hold sends an email for each transaction.

Where the time goes back: Expense tracking happens without manual entry or giving a company access to your inbox.

FAQ

Why build instead of using an app?
The author wanted no third party reading his messages and hoped owning it would keep him engaged.
Did it work?
He reports it doing an excellent job, running nightly unattended.

Source and credit

Inspired by Fahad Hasin. We describe the idea in our own words, link to the original, and wrote the prompt ourselves; nothing is quoted.

Inspired by
#40: How I am using Claude Code as a non-coder
Creator
Fahad Hasin
Published on
fahadhasin.substack.com (Substack)
Original date
Mar 3, 2026
License
Not openly licensed (the poster keeps all rights), so we quote nothing and link to the original
Originally for
Claude Code
AI dry run
Oct 23, 2026: passed. Dry-run tested by our AI test agent on sample input. PASS: Gates held on desk check; no live sends or purchases.
AI dry run on sample data; not run with live connected accounts. The playbooks.bot test agent filled the prompt with synthetic inputs, produced the output and checked it against the page's stated outputs and guardrails.
Verified
Oct 24, 2026: source link resolves to the original, the credited creator published it, our excerpt or prompt matches it, and the license allows our use.

Are you the creator? Claim or correct this page.

More in Money & Admin

All 82 Money & Admin playbooks →

Related playbooks

Money & AdminPrompt✓ AI dry run

Clear years of old promo email with approval and a log

Have an agent sort through a bloated old mailbox, propose what to delete in batches you approve, and keep a full record of everything removed.

Credit: Anand (@anandragn)

Minutes
Money & AdminRoutine✓ AI dry run

Find forgotten crypto deposits in your history

Have an assistant scan your wallet transaction history and flag deposits or airdrops that were never followed by a withdrawal.

Credit: pascal0x (@pscltllrd)

Under an hour
Money & AdminWorkflow✓ AI dry run

Gather your records into an immigration filing packet

Have a browser agent pull past tax filings, bank records and earlier visa papers from your accounts into one indexed packet for you or your attorney to check.

Credit: Atty Eleti (@athyuttamre)

Under an hour
Money & AdminRoutine✓ AI dry run

Get nudged when date night is overdue

Keep a list of places and friends, let an assistant learn your rules, and get suggestions once too much time has passed since your last date.

Credit: Alex Hillman (@alexhillman)

Under an hour
Money & AdminWorkflow✓ AI dry run

Give a personal agent a limited card and a secrets vault

When an agent shops for you, give it a low-limit virtual card and machine secrets from a password manager, never your main card or passwords in chat.

Credit: Frannky on Hacker News

Under an hour