Transaction Commands
Bank transaction ingestion, categorization, and cleanup.
Commands
optimal tx ingest
Parse & deduplicate bank CSV files into the transactions table
| Flag | Description | Default | Required |
|---|---|---|---|
--file <path> | Path to the CSV file | yes | |
--user-id <uuid> | Supabase user UUID | yes |
bash
optimal tx ingest --file ./chase-march-2026.csv --user-id oracleoptimal tx stamp
Auto-categorize unclassified transactions using rule-based matching
| Flag | Description | Default | Required |
|---|---|---|---|
--user-id <uuid> | Supabase user UUID | yes | |
--dry-run | Preview matches without writing to database |
bash
optimal tx stamp --user-id oracle
optimal tx stamp --user-id oracle --dry-runoptimal tx delete
Batch delete transactions or staging rows (safe: dry-run by default)
| Flag | Description | Default | Required |
|---|---|---|---|
--table <t> | Table: transactions or stg_financials_raw | yes | |
--user-id <uuid> | User UUID filter | ||
--date-from <date> | Start date YYYY-MM-DD | ||
--date-to <date> | End date YYYY-MM-DD | ||
--source <src> | Source filter | ||
--category <cat> | Category filter (transactions) | ||
--account-code <code> | Account code filter (staging) | ||
--month <YYYY-MM> | Month filter (staging) | ||
--execute | Actually delete (default is dry-run preview) |
bash
optimal tx delete --table transactions --date-from 2026-01-01 --date-to 2026-01-31
optimal tx delete --table transactions --user-id <uuid> --source chase
optimal tx delete --table stg_financials_raw --month 2026-03 --account-code 4100
optimal tx delete --table transactions --date-from 2026-01-01 --date-to 2026-01-31 --execute