{{ define "main" }}
Reference

CLI reference

Four modes: statistics for one document, diff for two, convert between formats, and a local web server. Use - in place of either path to read from standard input.

Usage
sbomlyze <sbom1|-> [sbom2|-] [options]
sbomlyze convert <sbom|-> --to <format> [-o out]

Modes:
  Single file:  sbomlyze <sbom> [--json]
  Interactive:  sbomlyze <sbom> -i
  Convert:      sbomlyze convert <sbom> --to <fmt>
  Web server:   sbomlyze -web [--port 8080]
  Two files:    sbomlyze <sbom1> <sbom2> [...]
Quick start
sbomlyze before.json after.json
sbomlyze image.json
sbomlyze image.json --compliance
sbomlyze image.json -i
sbomlyze -web
sbomlyze convert syft.json --to spdx
sbomlyze before.json after.json --format sarif
sbomlyze before.json after.json --policy policy.json

Options

{{ range site.Data.cli.options }}
{{ .k }} {{ .d }}
{{ end }}

Output formats

Seven formats, all produced from the same analysis.

{{ range site.Data.cli.outFormats }} {{ end }}
Format Flag Description Best for
{{ .name }} {{ .f }} {{ .d }} {{ .b }}

Policy engine

sbomlyze exits with code 1 when violations occur. Setting any min_*_score threshold automatically triggers compliance evaluation, even without --compliance.

policy.json
{
  "max_added": 10,
  "max_removed": 5,
  "max_changed": 100,
  "deny_licenses": ["GPL-3.0", "AGPL-3.0"],
  "require_licenses": true,
  "deny_duplicates": true,
  "deny_integrity_drift": true,
  "max_depth": 3,
  "warn_supplier_change": true,
  "warn_new_transitive": true,
  "min_ntia_score": 85,
  "min_cisa_score": 70,
  "min_bsi_score": 80,
  "min_overall_compliance": 75
}
{{ range site.Data.cli.rules }}
{{ .k }} {{ .d }}
{{ end }}

Component identity matching

Components are matched by precedence, so cross-format comparison works without identical document layouts.

{{ range site.Data.cli.identity }}
{{ .p }} {{ .name }} {{ .e }}
{{ end }}

Exit codes

0
Success. No differences or violations.
1
Differences found, policy violations, or errors. In diff mode, any component change returns 1 — usable as a plain “did anything change?” gate.

Supported formats

{{ range site.Data.cli.sbomFormats }}
{{ .name }}
{{ .d }}
{{ end }}

All formats must be JSON. XML support is not currently available.

{{ end }}