Receipt OCR · 3 prompts · on-device

Prompts from my Apple Foundation Models video

Copy, paste, run — each dark block below is exactly what to copy. Hit Copy (or click inside a block to select all) and paste it into the app named in that section.

1

Command line — Terminal

Paste this into Terminal and press return. It reads your receipt, writes receipt.csv, and opens it in Numbers.

⚠️
Before running, replace IMG_2671.jpeg (highlighted in yellow below) with the name of your image.
Terminal · copy & paste this ↓
fm respond --model system --no-stream \
  --image "IMG_2671.jpeg" --label receipt --tool ocr \
  'Use OCR to read the image labeled receipt. Output only CSV.
Start with this exact header:
merchant,date,total_paid
Write one row for the total amount paid. Exclude time.
Use the printed line total for each item. Leave missing values blank.
Exclude subtotal, tax. Use standard CSV quoting.
Do not include Markdown or commentary.' \
  > receipt.csv && open -a Numbers receipt.csv

↳Done: receipt.csv opens in Numbers with the merchant, date, and total paid.

2

Apple Shortcuts

Paste this into Apple Shortcuts to create the photo-to-CSV shortcut from the demo.

Apple Shortcuts · copy & paste this ↓
I want to take a photo of a receipt and pull the name of the store, the date, and the total amount using the system foundation model. That data should then be placed into receipts.csv in my iCloud drive. If the file already exists, each subsequent receipt will be added to the file.

↳Done: your new shortcut snaps a photo, and the store, date & total land in receipts.csv on iCloud — appended if the file already exists. Then edit the shortcut and confirm the system model is doing the processing, as shown in the video.

3

ChatGPT — build the batch app

Paste this into ChatGPT or Claude desktop apps to have it code the native Mac batch-processing app from the video.

ChatGPT · copy & paste this ↓
I want a Mac native expense report application coded in Swift that will take receipt images dragged into its interface and build a csv file using Apple's foundation model.

It is very important to me that Apple's system foundation model do the processing. Do not use any cloud resources for processing the receipts.

I should be able to drag multiple receipts in, or one at a time. The CSV table will build as I drag the files in and allow me to edit the data inside the app.

I should then be able to save the file as a CSV when I'm done.

Please compile a .app when you're finished.

↳Done: ChatGPT hands you a native Mac .app — drag in one receipt or many, edit the table right in the app, and save as CSV. All processing stays on-device.