ClawReceipt is an AI-powered receipt management system for the OpenClaw/OpenKrab ecosystem.
It captures expenses fast, auto-categorizes them, tracks monthly budgets with predictive analytics, detects recurring expenses, and provides smart financial insights โ all from the CLI or a rich TUI dashboard.
- โก Quick Add: Record receipts with just store name and amount โ date, time, and category are auto-filled
- ๐ง Smart Auto-Categorize: AI pattern matching detects categories from store names (200+ patterns for Food, Transport, Shopping, etc.)
- ๐ท๏ธ Tags & Notes: Attach tags and memos to any receipt for better organization
- โ๏ธ Edit & Delete: Full CRUD operations on all receipts
- ๐ฎ Predictive Budgeting: Forecasts end-of-month spending based on daily rate
- ๐ Trend Analysis: Weekday spending patterns, sparkline charts, and statistical breakdowns
- ๐ Recurring Detection: Automatically finds recurring expenses by analyzing store/amount patterns
- ๐ก Smart Insights: AI-generated actionable observations about your spending habits
- โ๏ธ Month Comparison: Side-by-side comparison of any two months
- ๐ช Store Ranking: Leaderboard of where your money goes
- ๐ฅ๏ธ Rich TUI Dashboard: Full terminal UI with budget gauge, insights panel, search bar, and sparklines
- ๐ค Data Export: Export to CSV and Excel from CLI or TUI
- ๐ Full-Text Search: Search receipts by store, category, notes, tags, or date
- ๐ฆ OpenClaw Ready: Comprehensive
SKILL.mdfor agent automation - ๐พ Local First: SQLite with WAL mode, indexed queries, zero cloud dependencies
- ๐ Cross Platform: Windows, Linux, macOS with UTF-8 encoding support
- Python 3.10+
- OpenClaw CLI (recommended for automation)
- Clone repository
git clone https://github.com/OpenKrab/ClawReceipt.git
cd ClawReceipt- Create virtual environment and install
python -m venv venv
source venv/bin/activate # Linux/macOS
# or
venv\Scripts\Activate.ps1 # Windows PowerShell
pip install -r requirements.txt- Set monthly budget
python run.py budget --set 5000- Add first receipt (with auto-category!)
python run.py quick "Seven Eleven" 85.50
# โ Auto-detects category: Food, uses today's date & time# Standard add
python run.py add --date "2026-03-06" --time "15:30:00" --store "Seven Eleven" --amount 120.50 --category "Food" --notes "lunch" --tags "daily,food"
# Quick add (today, auto-category)
python run.py quick "Starbucks" 165
# List all / filter
python run.py list
python run.py list --month "2026-03" --category "Food" --limit 20
# Search
python run.py search "Starbucks"
# Edit a receipt
python run.py edit 5 --amount 200 --notes "corrected amount"
# Delete a receipt
python run.py delete 5python run.py budget # Budget status + prediction
python run.py budget --set 10000 # Set new budget
python run.py budget --month "2026-02" # Check specific month
python run.py alert # Silent check (exit 0=ok, 1=over, 2=warning)python run.py summary # Category breakdown
python run.py trends # Full trend analysis with sparklines
python run.py predict # End-of-month prediction
python run.py compare "2026-01" "2026-02" # Compare two months
python run.py recurring # Find recurring expenses
python run.py stores # Store spending leaderboard
python run.py insights # AI-powered smart insightspython run.py export csv
python run.py export excel --filename "my_report.xlsx"python run.py tui # Open interactive dashboardpython run.py quick "Grab" 150
python run.py quick "Starbucks" 165
python run.py quick "Lazada" 890 --tags "gadget" --notes "USB-C cable"Category is auto-detected from the store name โ
Grab โ Transport,Starbucks โ Food,Lazada โ Shopping!
python run.py summaryVisual breakdown of all spending by category with progress bars and percentages.
python run.py predictForecasts your total spending by month-end based on your current daily rate. Shows safe daily spending limit to stay within budget.
python run.py search "Starbucks"Full-text search across store names, categories, notes, tags, and dates.
python run.py insightsAI-powered analysis of your spending habits โ budget warnings, recurring expenses, month-over-month changes, and actionable advice.
ClawReceipt uses a dual-layer categorization engine:
- Pattern Matching: 200+ regex patterns covering Thai and English store names
- Learning Engine: Remembers your categorization choices and applies them to future receipts
| Category | Example Stores |
|---|---|
| Food | Seven Eleven, McDonald's, Starbucks, GrabFood, MK Suki |
| Transport | Grab, BTS, MRT, PTT, Shell, Toll |
| Shopping | Lazada, Shopee, Central, Big C, IKEA |
| Entertainment | Netflix, Spotify, Major Cinema, Steam |
| Health | Hospitals, Watson, Boots, Gym |
| Bills | AIS, True, Electric, Water, Rent |
| Education | Books, Udemy, Coursera |
| Travel | Agoda, Airbnb, Airlines |
The system calculates:
- Daily spending rate from current month's data
- Projected end-of-month total based on remaining days
- Safe daily limit to stay within budget
- Days until budget exhaustion at current rate
The alert command now returns exit code 2 when spending is within budget but predicted to exceed โ perfect for automated early warnings.
- Python 3.10+ โ Core runtime
- SQLite โ Local database with WAL mode & indexing
- Rich โ CLI styling, tables, progress bars
- Textual โ TUI dashboard framework
- Pandas + OpenPyXL โ Data analysis & export
- Pydantic โ Data validation
- Pillow โ Image processing support
CREATE TABLE receipts (
id INTEGER PRIMARY KEY AUTOINCREMENT,
date TEXT NOT NULL,
time TEXT DEFAULT '',
store TEXT NOT NULL,
amount REAL NOT NULL,
category TEXT NOT NULL,
notes TEXT DEFAULT '',
tags TEXT DEFAULT '',
created_at TEXT DEFAULT (datetime('now','localtime'))
);
CREATE TABLE config (
key TEXT PRIMARY KEY,
value TEXT
);
CREATE TABLE category_learn (
store_pattern TEXT PRIMARY KEY,
category TEXT NOT NULL,
confidence REAL DEFAULT 1.0,
updated_at TEXT
);- SQLite DB:
data/receipts.db - Main entrypoint:
run.py - Core modules:
src/cli.pyโ CLI commands (16 commands)db.pyโ Database operations with smart queriesintelligence.pyโ AI engine (categorization, analytics, prediction)tui.pyโ Terminal dashboardstyling.pyโ Rich styling utilities
- Banner image:
public/banner.png
ClawReceipt/
โโโ data/
โ โโโ receipts.db # SQLite database (auto-created)
โโโ public/
โ โโโ banner.png # Project banner
โโโ src/
โ โโโ cli.py # CLI commands (16 commands)
โ โโโ db.py # Smart database layer
โ โโโ intelligence.py # ๐ง AI engine
โ โโโ tui.py # Smart TUI dashboard
โ โโโ styling.py # Rich styling utilities
โโโ run.py # Main entry point
โโโ requirements.txt # Python dependencies
โโโ SKILL.md # OpenClaw agent integration guide
โโโ README.md # This file
PRs are welcome! Please ensure:
- Code follows existing style patterns
- Add tests for new functionality
- Update documentation as needed
- Test cross-platform compatibility
MIT
Built for the Lobster Way ๐ฆ โ Now with ๐ง AI Superpowers





