A local AI-powered receipt organiser for macOS. Drop receipts in — they get classified, renamed, and filed into the right folders automatically. Built for Portuguese freelancers (Trabalhador Independente) with smart IRS/IVA routing.
- Drop one or many receipts (PDF, JPG, PNG) → Ollama reads them locally
- Classifies 23 document types: subscriptions, hardware, grocery, pharmacy, fuel, travel, utilities, rent, medical, and more
- Smart deductibility detection: knows what's deductible for a PT freelancer under Recibos Verdes
- Multi-folder filing: deductible invoices automatically copy to
IRS_{year}/Deductible_Invoice/andIVA_{year}/T{quarter}/based on the invoice date - Renames files to a clean convention:
vendor_description_DD_MM_YYYY.ext - Batch mode: queue 10+ files, review all, file everything in one click
- Filing log: history of every document filed with destination and amount
- Runs as a native macOS app — no browser, no terminal
Receipt-2675-8507-9281.pdf → anthropic_claude_pro_subscription_19_03_2026.pdf
├── Finance/Portugal_Taxes/IVA/IVA_2026/T1/
├── Finance/Portugal_Taxes/IRS/IRS_2026/Deductible_Invoice/
└── (primary move + 2 copies)
- macOS 12+
- Python 3.11+
- Ollama running locally with a vision model
ollama pull llava # fast, recommended
# or
ollama pull llama3.2-vision # higher accuracy# 1. Clone
git clone https://github.com/GlitchG/receipt-sorter.git
cd receipt-sorter
# 2. Virtual environment
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# 3. Configure folders
cp config.template.json config.json
# Edit config.json — replace YOUR_USERNAME with your actual paths
# Or launch the app and configure via ⚙ SettingsDouble-click Receipt Sorter.app in your Applications folder (after setup below).
source venv/bin/activate
python main.py # native window via pywebview
# or
python app.py # browser at http://localhost:5055# Copy the .app bundle to Applications
cp -r "Receipt Sorter.app" ~/Applications/
# Make the launcher executable
chmod +x ~/Applications/Receipt\ Sorter.app/Contents/MacOS/ReceiptSorterThen open Finder → Applications → Receipt Sorter.
On first launch macOS may show a security warning. Go to System Settings → Privacy & Security and click "Open Anyway".
{vendor}_{description}_{DD_MM_YYYY}.{ext}
Examples:
vodafone_pt_internet_bill_01_03_2026.pdf
amazon_usb_hub_purchase_15_02_2026.pdf
lidl_grocery_shop_10_03_2026.jpg
clinica_medica_consultation_05_03_2026.pdf
| Type | Deductible (PT freelancer) |
|---|---|
| SaaS subscription | ✓ |
| Software purchase | ✓ |
| Hardware (work tools) | ✓ |
| Internet / phone bill | ✓ |
| Advertising spend | ✓ |
| Professional service | ✓ |
| Office supplies | ✓ |
| Grocery / restaurant | ✗ |
| Pharmacy | ✗ |
| Fuel / transport | partial |
| Travel | ✗ |
| Rent / utilities | ✗ |
| Medical | ✗ |
| Insurance | ✗ |
| Government fees | ✗ |
| Component | Role |
|---|---|
| Python + Flask | Backend server |
| Ollama (llava / llama3.2-vision) | Local AI — OCR + classification |
| pdfplumber | Text extraction from PDFs |
| pywebview | Native macOS window wrapper |
| Vanilla JS | Frontend — no framework dependencies |
Everything runs 100% locally. No data leaves your machine. Ollama runs entirely offline.
receipt-sorter/
├── app.py # Flask backend
├── main.py # Native app entry point (pywebview)
├── config.json # Your local paths (git-ignored)
├── config.template.json # Template for setup
├── requirements.txt
├── templates/
│ └── index.html # Frontend UI
└── Receipt Sorter.app/ # macOS app bundle
MIT
- ga4-attribution-models — multi-touch attribution in BigQuery
- bigquery-meridian-mmm — Bayesian marketing mix modelling
- ga4-bigquery-incremental — GA4 incremental refresh patterns