Skip to content

jlqoc/Budgeting

Repository files navigation

πŸ’° Budget Tool

A self-hosted personal finance tool that connects to your bank accounts via Plaid, tracks your recurring expenses, and runs a daily check at 3am to tell you what to pay, when to pay it, and whether you're at risk of overdraft.

Designed to be used alongside Claude AI β€” ask questions like:

  • "Can I afford this $500 expense?"
  • "How long to save $5,000 for a trip without cutting anything?"
  • "What should I pay today?"

Features

  • 🏦 Multi-account support β€” connect up to 6+ bank accounts, checking, savings, and credit cards across any US institution
  • πŸ”’ Secure local storage β€” Plaid access tokens are encrypted with AES-256 on your machine; your credentials never leave your computer
  • πŸ“‹ Expense tracker β€” manage all recurring bills, loans, subscriptions, and savings goals in a simple JSON file (or by chatting with Claude)
  • ⚠️ Overdraft protection β€” daily check calculates your projected balance after upcoming bills and flags risk before it happens
  • πŸ“Š Interactive dashboard β€” open dashboard.html in your browser for a live financial overview and Q&A chat
  • ⏰ Automated daily reports β€” runs at 3am, saves a markdown report, and delivers a briefing when you open Claude

Prerequisites

  • Python 3.9+
  • A free Plaid developer account (takes ~5 minutes)
  • Claude desktop app (for the interactive Q&A features)
  • Git

Setup

1. Clone the repo

git clone https://github.com/jlqoc/Budgeting.git
cd Budgeting

2. Install dependencies

pip install -r requirements.txt

3. Get your Plaid API keys

  1. Go to dashboard.plaid.com and create a free account
  2. Navigate to Team Settings β†’ Keys
  3. Copy your Client ID and Sandbox secret
  4. When you're ready for real bank connections, request Development access (free, approved within a day or two)

4. Configure your environment

cp .env.example .env

Open .env and fill in your Plaid credentials:

PLAID_CLIENT_ID=your_client_id_here
PLAID_SANDBOX_SECRET=your_sandbox_secret_here
PLAID_ENV=sandbox

⚠️ .env is gitignored β€” it will never be committed. Never share this file.

5. Link your bank accounts

Run the bank linker once per institution:

python connect_banks.py

You'll be prompted to:

  1. Create a vault password (used to encrypt your access tokens locally)
  2. Choose a bank to link

In sandbox mode, you can use test institutions to try everything out before connecting real accounts. In production mode, you'll go through Plaid's secure OAuth flow for each real bank.

Repeat for each bank account (up to as many as you have).

6. Fill in your expenses

Open expenses.json and fill in your recurring bills, income, credit cards, loans, and subscriptions. Each item has:

  • name β€” friendly label
  • amount β€” monthly amount in USD
  • due_day β€” day of month it's due (1–28)
  • autopay β€” true if autopay is set up (won't flag as urgent)
  • account β€” which bank account it pulls from (optional label)

Or just tell Claude: "Add my $1,200 rent due on the 1st" and it'll update the file for you.

7. Run your first daily check

python daily_check.py

You'll be prompted for your vault password. The script will:

  • Fetch live balances from all linked accounts
  • Identify bills due in the next 14 days
  • Calculate overdraft risk
  • Save a report to reports/report_YYYY-MM-DD.md
  • Print the advisory to the terminal

8. Open the dashboard

Open dashboard.html in your browser. On first load it shows placeholder data. To populate it with live data:

python export_for_dashboard.py

This writes reports/latest.json, which the dashboard reads. Refresh the page to see your live financial snapshot.

9. Schedule the daily 3am check (optional)

macOS / Linux (cron)

crontab -e

Add:

0 3 * * * VAULT_PASSWORD=yourpassword /usr/bin/python3 /path/to/Budgeting/daily_check.py >> /path/to/Budgeting/reports/cron.log 2>&1

Windows (Task Scheduler)

  1. Open Task Scheduler β†’ Create Basic Task
  2. Trigger: Daily at 3:00 AM
  3. Action: Start a program
    • Program: python
    • Arguments: "C:\path\to\Budgeting\daily_check.py" --vault-password yourpassword
    • Start in: C:\path\to\Budgeting

Claude Desktop (Cowork mode)

If you're using Claude's Cowork mode, the scheduled task is set up automatically via the built-in scheduler.


File Structure

Budgeting/
β”œβ”€β”€ connect_banks.py        # One-time bank account linker (run once per bank)
β”œβ”€β”€ daily_check.py          # Daily advisory script (runs at 3am)
β”œβ”€β”€ export_for_dashboard.py # Exports live data to dashboard
β”œβ”€β”€ expenses.py             # Expense utilities (imported by other scripts)
β”œβ”€β”€ expenses.json           # Your recurring expenses, bills, goals (edit this)
β”œβ”€β”€ dashboard.html          # Interactive browser dashboard + Claude Q&A
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ .env.example            # Copy to .env and fill in your keys
β”œβ”€β”€ .gitignore              # Keeps .env and tokens/ out of git
β”œβ”€β”€ LICENSE
β”‚
β”œβ”€β”€ tokens/                 # Created automatically β€” gitignored
β”‚   β”œβ”€β”€ tokens.enc          # AES-256 encrypted Plaid access tokens
β”‚   └── salt.bin            # Encryption salt
β”‚
└── reports/                # Created automatically β€” gitignored
    β”œβ”€β”€ report_YYYY-MM-DD.md
    └── latest.json

Security

  • Your bank credentials are never stored. Plaid uses OAuth β€” you log in directly on your bank's website, and Plaid gives back a token.
  • Access tokens are encrypted with AES-256 (Fernet) using a password you choose. They live in tokens/tokens.enc on your machine only.
  • tokens/ and .env are gitignored β€” they cannot be accidentally committed to a public repo.
  • Reports are gitignored β€” your actual financial data never leaves your machine.

Using with Claude

Once set up, open Claude and ask things like:

"I want to plan a $5,000 trip. How long will it take to save without changing my budget?"

"I have an emergency expense of $300 β€” can I pull from my Chase checking without overdrafting?"

"What subscriptions am I paying for that I could cut?"

"Show me a paycheck-by-paycheck plan to pay off my credit card by December."

Claude reads your expenses.json and the latest balance report to give you specific, accurate answers based on your real numbers.


Contributing

PRs welcome. Some ideas for improvements:

  • Web UI for editing expenses (instead of JSON)
  • Email/SMS delivery of daily report
  • Credit card payoff optimizer
  • Multi-currency support
  • Transaction categorization and trend analysis

License

MIT β€” see LICENSE

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors