CLI¶
The CLI wraps the Rust core for common workflows like CSR generation, invoice signing, validation, QR generation, QR reading, and hashing.
Examples¶
fatoora-rs-cli csr --csr-config csr.properties --generated-csr csr.pem --private-key key.pem --pem
fatoora-rs-cli sign --invoice invoice.xml --cert cert.pem --key key.pem --signed-invoice signed.xml
fatoora-rs-cli validate --invoice invoice.xml --xsd-path assets/schemas/UBL2.1/xsd/maindoc/UBL-Invoice-2.1.xsd
fatoora-rs-cli qr --invoice invoice.xml
fatoora-rs-cli qr --invoice signed.xml --fail-on-signed
fatoora-rs-cli qr-read --invoice signed.xml
fatoora-rs-cli generate-hash --invoice invoice.xml
Notes¶
csrwrites CSR and key to stdout unless--generated-csr/--private-keyare provided. Use--pemto output PEM; otherwise output is base64 DER.signrequires matching cert/key formats (--cert-formatand--key-formatmust both be PEM or DER).validateuses the bundled UBL schema by default and accepts--xsd-pathto override it.qrgenerates a QR payload: from finalized invoice XML, or by regenerating from signed invoice XML. Use--fail-on-signedto reject signed invoices.qr-readreads the existing embedded QR payload from a signed invoice XML.generate-hashprints a signed hash if the XML is signed, otherwise falls back to finalized XML.
See also: Invoice Reference and Signing Reference