@causaprima/scribo-cli
v1.0.0
Published
Causa Prima Scribo CLI — generate EN 16931-compliant e-invoices (XRechnung, ZUGFeRD, plain US PDF) from the terminal.
Readme
@causaprima/scribo-cli
Generate EN 16931-compliant e-invoices from the terminal.
npx @causaprima/scribo-cli create \
--jurisdiction DE --currency EUR \
--sender-name "Example GmbH" --sender-country DE \
--sender-address "Example Allee 1" --sender-postcode 10115 --sender-city Berlin \
--sender-tax-id DE123456788 --sender-email [email protected] \
--sender-contact-name "Billing" --sender-contact-phone "+49 30 0000000" \
--recipient-name "Acme GmbH" --recipient-country DE \
--recipient-address "Hauptstrasse 1" --recipient-postcode 10117 --recipient-city Berlin \
--recipient-email "[email protected]" \
--line "Senior consulting,3,1200,19,DAY,S" \
--due-date 2026-05-16 \
-o invoice.pdfAfter npm install -g @causaprima/scribo-cli, the binary is available as both scribo and scribo-cli.
Commands
scribo create— generate an invoice and save it locally.- Use
--from invoice.jsonto loadCreateInvoiceInputfrom a JSON file. - Use repeated
--lineflags for line items:description,quantity,unit_price,tax_rate[,unit_code,tax_category_code]. Escape commas with\,. - Payment instructions:
--payment-iban(+ optional--payment-bic) for SEPA, or--payment-account-number+--payment-routing-numberfor US bank details. XRechnung (German B2G) requires an IBAN.
- Use
scribo get <invoiceId>— fetch metadata (JSON to stdout).scribo download <invoiceId> [-o file]— download bytes only.scribo jurisdictions— list supported jurisdictions and formats.
Configuration
| Variable | Purpose | Default |
|---|---|---|
| SCRIBO_API_BASE_URL | Public API origin | https://scribo.causaprima.ai |
| SCRIBO_API_KEY | Optional bearer token (reserved for v1.1 partner quotas) | (unset) |
CLI flags --base-url and --api-key override env vars.
Contract
The CLI talks to the public Scribo /api/v1/* HTTP API. The authoritative
contract is the OpenAPI document at docs/openapi/scribo-v1.json in this
repo (also served at GET {SCRIBO_API_BASE_URL}/api/v1/openapi.json).
Exit codes
0— success64(EX_USAGE) — missing or malformed CLI flag65(EX_DATAERR) — server returned 4xx (other than 404)66(EX_NOINPUT) — invoice not found (404)70(EX_SOFTWARE) — server returned 5xx75(EX_TEMPFAIL) — rate-limited (429) or temporarily soft-blocked; retry after the period printed in the error1— network or unclassified error
