Generate a PDF invoice and save it to ~/Downloads. Use when the user asks to create, generate, or make an invoice.
Generate a PDF invoice and save it to ~/Downloads/.
When the user asks to create, generate, or make an invoice. The user will typically provide details via a voice note or brain dump; parse what they say and fill in the fields below.
There are two known senders. Determine which one from context:
If the user hasn't provided enough information (e.g. missing client email or bank details), ask before generating. Do not proceed without bank details.
Write a temporary Python script to /tmp/generate-invoice.py using fpdf2 and run it. Before
running, ensure fpdf2 is installed:
pip install --quiet fpdf2 2>/dev/null || pip install --quiet --break-system-packages fpdf2
The script must produce a PDF with this exact layout:
Use fpdf2 with FPDF. Use Helvetica font only. Currency is GBP (£). Page size A4.
Save the PDF to ~/Downloads/ with this filename format:
YYYY-MM-DD_Sender-Name_Client-Name.pdf
Rules for the filename:
2026-03-20_Katie-Smith_Acme-Corp.pdfPrint the full output path when done and confirm to the user.