Interactive CLI tool for categorizing and analyzing South African bank statements using a local LLM (Ollama).
# Statement Processor
Interactive conversational CLI for categorizing and analyzing South African bank statements using a local LLM (Ollama).
## Features
- **Conversational interface** — all input is understood via LLM, no rigid command syntax required
- Automatically loads the most recent `statement-*.csv` from `~/Downloads`
- Categorizes transactions using Ollama (Mistral) with web search fallback
- Learns merchant-to-category mappings over time for faster future runs
- Cross-file and intra-file deduplication prevents double-counting
- Budget tracking with traffic light status (GREEN/ORANGE/RED)
- Conversational budget recommendations — ask for advice, then apply it
- Asset tracking and net worth calculation
- Fuel price calculator with cached SA petrol/diesel prices
- Anomaly detection and habit analysis
- Skippable categorization (press Ctrl+C during startup to skip)
- Configurable month start for multiple/variable income streams
- Reset commands for transactions, assets, or everything
- Settings management from the REPL
- Rich markdown rendering for LLM responses
## Prerequisites
- Python 3.10+
- Ollama running locally with Mistral: `ollama pull mistral`
## Setup
```bash
pip install -e .
```
## Usage
```bash
# Load most recent statement from ~/Downloads
statement-processor
# Load a specific file
statement-processor --file statement-24-257-241-3.csv
```
### Conversational Interface
All input is processed through the LLM — just speak naturally:
```
> How much did I spend on food?
> Show me my budget summary
> Any suspicious transactions this month?
> Based on my income and expenses, recommend a budget
> Update the budget to use those recommendations
> Move all HETZNER transactions to SUBSCRIPTION
> I have a car worth 200k with 150k outstanding
> What is my net worth?
> Set my base salary to 35000
> How much would 200km cost in petrol at 8.5L/100km?
> Reset all my transactions
> Compare to last month
```
### What You Can Ask About
| Area | Examples …