Automate CycloneDX CLI with stdin and stdout
mainThe CycloneDX CLI is designed for automation. Most commands that accept an --input-file option also support reading from stdin. Similarly, commands with an --output-file option can output to stdout.
Note: When using pipes, you must explicitly specify the --input-format and --output-format because the tool cannot autodetect formats from a stream.
cat bom.json | cyclonedx-cli convert --input-format json --output-format xml > bom.xml