Send an invoice for the last complete month to Slack without preview or approval
Fire-and-forget invoicing: fetch hours for the last complete month, create proforma, fire it, notify via Slack. No preview, no approval prompt.
--rate N (optional, uses DEFAULT_HOURLY_RATE from .env)Compute the last complete calendar month relative to today's date:
Run all steps sequentially. Do NOT ask for user confirmation at any point.
Run: uv run python -m invoicing fetch --start <start> --end <end>
Parse the JSON output. If is 0, tell the user "No hours tracked for <period>" and stop.
total_hoursRun: uv run python -m invoicing create --start <start> --end <end> --rate <rate>
Parse the JSON output to get invoice_id, invoice_number, total, fakturoid_url.
Run: uv run python -m invoicing fire --invoice-id <invoice_id>
This finalizes the proforma into a real tax document.
If status is "already_fired", Fakturoid auto-converted the proforma — this is normal, not an error.
Run: uv run python -m invoicing notify --invoice-id <invoice_id>
This sends a Slack message and uploads the invoice PDF to the configured channel.
Parse the JSON output to confirm status: "notified" and check pdf_uploaded.
Save message_ts, channel_id, and file_id from the output — needed if the user wants to delete the message later via slack-delete --ts <message_ts> --channel-id <channel_id> --file-id <file_id>.
Show a brief summary: invoice number, total amount, Fakturoid URL, and Slack notification status.
"already_fired"): tell the user the proforma exists and offer to retry firing or delete it.uv run python -m invoicing delete --invoice-id <id>.