← 返回
未分类 中文

Local Budget

Analyze exported bank/credit card CSV files locally to track spending, categorize transactions with LLM reasoning, compare against user-defined budgets, and...
本地分析导出的银行/信用卡CSV文件,追踪支出,使用LLM推理对交易分类,与用户设定的预算比较,并…
newageinvestments25-byte newageinvestments25-byte 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 365
下载
💾 0
安装
1
版本
#latest

概述

Local Budget

Analyze bank/credit card CSV exports, categorize transactions, compare against budgets, and generate clean markdown reports for Obsidian.

Workflow Overview

  1. Parse — run parse_csv.py to normalize raw CSVs into a unified JSON format
  2. Categorize — run categorize.py to get LLM-ready JSON with suggested categories; review/adjust
  3. Report — run report.py to generate a markdown spending report

All scripts live in scripts/. Budget config and sample data in assets/. See references/csv-formats.md for supported formats and references/categories.md for category customization.

Step 1: Parse CSV

python3 scripts/parse_csv.py <input.csv> [--format chase|boa|generic] [--output transactions.json]
  • Auto-detects format if --format is omitted (checks header columns)
  • Outputs a unified JSON array of transaction objects
  • Each transaction: { "date": "YYYY-MM-DD", "description": str, "amount": float, "type": "debit"|"credit", "original_category": str|null }
  • Debits are positive amounts; credits (refunds/income) are negative
  • Handles multiple date formats: MM/DD/YYYY, YYYY-MM-DD, MM/DD/YY
  • Skips rows with missing date or amount; logs warnings to stderr

If the user's bank isn't auto-detected, check references/csv-formats.md for column mappings and use --format generic with the appropriate flag, or add a new format.

Step 2: Categorize Transactions

python3 scripts/categorize.py transactions.json [--budget assets/sample-budget.json] [--output categorized.json]
  • Outputs a JSON file with each transaction tagged with a suggested category based on description keyword matching
  • The LLM (you) should review the output and adjust categories before generating the report
  • Default categories: Housing, Food & Dining, Transportation, Utilities, Entertainment, Shopping, Health, Subscriptions, Income, Other
  • To adjust: edit the JSON directly, or tell the user which transactions look miscategorized and confirm corrections
  • See references/categories.md for the keyword-matching logic and how to customize

LLM review step: After running categorize.py, scan the output for anything in "Other" or with low-confidence keywords. Ask the user to confirm or correct those entries before proceeding.

Step 3: Generate Report

python3 scripts/report.py categorized.json [--budget assets/sample-budget.json] [--output report.md]
  • Generates a markdown report with:
  • Monthly summary (total in/out)
  • Spending by category with budget vs. actual comparison
  • Top 10 merchants by spend
  • Month-over-month trend if multiple months present in the data
  • Overage alerts for categories that exceed budget
  • If --budget is omitted, report shows actuals only (no budget comparison)
  • Output is Obsidian-compatible markdown with frontmatter

Budget Config

Budget is defined in a JSON file. See assets/sample-budget.json for a realistic example.

{
  "monthly_budgets": {
    "Housing": 1800,
    "Food & Dining": 600
  }
}

Common Tasks

"Analyze my Chase export"

parse_csv.py chase_export.csv --format chase --output tx.json

categorize.py tx.json --output cat.json

→ Review categories, then report.py cat.json --budget assets/sample-budget.json

"Show me my spending for March"

→ Parse and categorize the CSV, then filter by month in report.py (it auto-groups by month)

"I went over budget on dining"

→ Run the full pipeline; report.py flags overage categories with ⚠️

"Add a new bank format"

→ See references/csv-formats.md for the column mapping spec

"Customize categories"

→ See references/categories.md to edit keyword lists or add new categories

File Locations

Store CSVs and JSON outputs wherever the user prefers. Default working directory is wherever the command is run. Suggest keeping exports in a dedicated folder like ~/finances/exports/.

Reports can be saved directly to the Obsidian vault:

python3 scripts/report.py categorized.json --output ~/path/to/vault/finance/2024-03-budget.md

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-31 18:32 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

Tavily 搜索

jacky1n7
通过 Tavily API 进行网页搜索(Brave 替代方案)。当用户要求搜索网页、查找来源或链接,且 Brave 网页搜索不可用时使用。
★ 274 📥 100,992
ai-agent

Workflow Crystallizer

newageinvestments25-byte
分析记忆日志,检测重复出现的模式,并建议自动化(cron 任务、技能或工作流快捷方式)。代理会逐步构建自己的快捷方式。
★ 0 📥 495
data-analysis

AdMapix

fly0pants
AdMapix 原始数据层,提供广告创意、应用、排名、下载/收入及市场元数据。返回 AdMapix API 的结构化 JSON;调用方...
★ 297 📥 142,054