# Generate SBOM with the Xygeni CLI

To generate an SBOM file with the Xygeni CLI , specify the **`--sbom`** option with the name of the file to create. You may use `stdin` or `stdout` to force output to the standard output / standard error, respectively.

```
SBOM options:
      --sbom=<sbom>          SBOM file to generate. Use 'stdout' or '-' for standard output, 'stderr' for standard error.
      --sbom-format=<sbomFormat>
                             SBOM format: cyclonedx, spdx.
```

The `--sbom` option is required with **`--sbom-format`**. Two formats are currently supported:

* `cyclonedx`, CycloneDX format (JSON schema).See <https://cyclonedx.org/> for full details.
* `spdx`, the Software Package Data Exchange (SPDX) in JSON serialization format, standard ISO/IEC 5962:2021. See <https://spdx.dev/> for full details.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.xygeni.io/xygeni-scanner-cli/xygeni-cli-overview/generate-sbom-with-the-xygeni-cli.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
