Skip to content

CLI reference

Installing @stafyniaksacha/facturx exposes a facturx command. You can also run it without installing, via your package runner.

Invocation

bash
npx @stafyniaksacha/facturx <command> [options]
bash
pnpm dlx @stafyniaksacha/facturx <command> [options]
bash
bunx @stafyniaksacha/facturx <command> [options]
bash
# when the package is a dependency of your project
facturx <command> [options]

Commands

CommandPurpose
generateEmbed an XML into a PDF to produce a Factur-X / Order-X PDF/A-3.
extractExtract the embedded XML from a PDF/A-3.
checkValidate an XML invoice against the XSD (and optionally Schematron).

Global options

OptionDescription
--help, -hShow help for the CLI or a specific command.
--versionPrint the installed version.
bash
npx @stafyniaksacha/facturx --help
npx @stafyniaksacha/facturx generate --help
npx @stafyniaksacha/facturx --version

Common options

Several options are shared across commands and behave identically everywhere:

OptionAliasDescription
--flavor-fSchema flavor: facturx, orderx, zugferd. Autodetected from the XML if omitted.
--level-lSchema level (e.g. en16931). Autodetected from the XML if omitted.
--output-oOutput file path.
--checkRun XSD validation (default true; pass --no-check to skip).

See Profiles & flavors for the valid flavor / level combinations.

Released under the MIT License.