Authenticate
In CI, skipinvoice-ai login and set INVOICE_AI_API_KEY:
--api-key, then INVOICE_AI_API_KEY, then the saved profile. Give a CI key only the scopes the job needs.
JSON output
Output is a table in a terminal and JSON when piped. Pass--json to force JSON, or --format csv.
{ "data": [...], "next_cursor": ... }. Messages and errors go to stderr, so stdout stays valid JSON.
No prompts
send,void,deleteandarchiveask for confirmation. Pass--yesto skip it.invoices createstarts a wizard in a terminal. Pass--no-interactivewith flags such as--customerand--price.- When
CIis set or there’s no terminal, the CLI never prompts. A command that needs a prompt exits with code2.
Exit codes
GitHub Actions example
Send every draft invoice each Monday:.github/workflows/send-invoices.yml
invoices:read and invoices:send. Sending is capped at 10 emails per hour per key and 50 per account, so a large batch stops with exit code 4.