Skip to content

avr sbom

View, generate, and download repository SBOMs.

Terminal window
avr sbom [OPTIONS] COMMAND [ARGS]...

Download an SBOM artifact (CycloneDX, SPDX, or dependency inventory).

Terminal window
avr sbom download [OPTIONS] [COMMIT]

COMMIT is the commit of a recorded SBOM, as a full SHA or a unique prefix of at least 7 characters such as the one avr sbom list shows. Defaults to the latest SBOM.

Terminal window
Examples:
avr sbom download --repo acme/api
avr sbom download --repo acme/api --format spdx --out api.spdx.json
avr sbom download 3f2c9a1b7d04 --repo acme/api --out - | jq .components

Arguments

  • [COMMIT]

Options

  • --repo, -R <TEXT> — Repository (org/repo or rep-xxx). Auto-detected from git remote if omitted.
  • --org, -o <TEXT> — Organization ID or slug. Uses default org if not specified (see: avr config set org).
  • --commit <TEXT> — Same as the COMMIT argument.
  • --format <CHOICE> — Artifact to download. (choices: cyclonedx, inventory, spdx · default: cyclonedx)
  • --out <TEXT> — Output file path, or "-" for stdout. Defaults to the artifact filename in the current directory.

Start SBOM generation for a repository.

Terminal window
avr sbom generate [OPTIONS] [REF]

REF is the branch, tag, or commit SHA to analyse; an abbreviated SHA such as the one avr sbom list shows works too. Defaults to the default-branch tip. Without --wait, commit_sha is the full SHA of the commit the run analyses when REF is a full SHA or one the API expanded.

One analysis runs per repository at a time. A request for the same ref as the analysis already running joins it; a request for a different ref is rejected (HTTP 409) until that analysis finishes. Once an SBOM has been recorded for the repository, a new run is refused (HTTP 429) for a cooldown period, and the error says how many seconds remain.

With --wait and a REF that names a commit, success means a new SBOM for that commit is downloadable, whatever the analysis task's own outcome (task_status); commit_sha and recorded_at identify it. A failed analysis can still deliver its SBOM later, so such a wait runs to --wait-timeout before reporting failure. For a branch, tag, or the default branch the API does not say which commit the run resolved, so --wait reports the analysis task's outcome only. Transient errors while waiting are retried until --wait-timeout; a wait that times out leaves the analysis running.

Terminal window
Examples:
avr sbom generate --repo acme/api
avr sbom generate v1.4.0 --repo acme/api
avr sbom generate 3f2c9a1b7d04 --repo acme/api --wait
Terminal window
JSON FIELDS
ai_task_id, commit_sha, error_code, recorded_at, status, task_status

Arguments

  • [REF]

Options

  • --repo, -R <TEXT> — Repository (org/repo or rep-xxx). Auto-detected from git remote if omitted.
  • --org, -o <TEXT> — Organization ID or slug. Uses default org if not specified (see: avr config set org).
  • --ref <TEXT> — Same as the REF argument.
  • --wait — Wait until generation finishes before returning.
  • --wait-timeout <INTEGER RANGE> — Seconds to wait when --wait is set. (default: 900)
  • --json <TEXT> — Output JSON. Pass comma-separated field names, "*" for all fields, or "?" to list available fields.
  • -q, --jq <TEXT> — Filter --json output through a jq expression.

List the repository's recorded SBOMs, newest first.

Terminal window
avr sbom list [OPTIONS]

Counts shown as "?" were not recorded by the SBOM's schema version.

Terminal window
Examples:
avr sbom list --repo acme/api
avr sbom list --repo acme/api --json commit_sha,copyleft_count
Terminal window
JSON FIELDS
artifacts, branch, commit_sha, copyleft_count, generated_at,
is_release, recorded_at, schema_version, total_dependencies,
unresolved

Options

  • --repo, -R <TEXT> — Repository (org/repo or rep-xxx). Auto-detected from git remote if omitted.
  • --org, -o <TEXT> — Organization ID or slug. Uses default org if not specified (see: avr config set org).
  • -L, --limit <INTEGER RANGE> — Max SBOMs to return. (default: 50)
  • --cursor <TEXT> — Opaque cursor from a previous response's next_cursor.
  • --json <TEXT> — Output JSON. Pass comma-separated field names, "*" for all fields, or "?" to list available fields.
  • -q, --jq <TEXT> — Filter --json output through a jq expression.

Show an SBOM's summary: dependency counts, licenses, and artifacts.

Terminal window
avr sbom view [OPTIONS] [COMMIT]

COMMIT is the commit of a recorded SBOM, as a full SHA or a unique prefix of at least 7 characters such as the one avr sbom list shows. Defaults to the latest SBOM.

A long license table is cut to the most common licenses and a long copyleft list to its first names; --full lists all of them. Long license names are clipped; the summary in --json carries them whole.

Terminal window
Examples:
avr sbom view --repo acme/api
avr sbom view 3f2c9a1b7d04 --repo acme/api
avr sbom view --repo acme/api --full
avr sbom view --repo acme/api --json summary --jq .summary.licenses
Terminal window
JSON FIELDS
artifacts, branch, commit_sha, generated_at, is_release, recorded_at,
schema_version, summary

Arguments

  • [COMMIT]

Options

  • --repo, -R <TEXT> — Repository (org/repo or rep-xxx). Auto-detected from git remote if omitted.
  • --org, -o <TEXT> — Organization ID or slug. Uses default org if not specified (see: avr config set org).
  • --commit <TEXT> — Same as the COMMIT argument.
  • --full — List every license and copyleft dependency in the summary. Long lists are otherwise cut to the 10 most common licenses and the first 10 copyleft dependencies.
  • --json <TEXT> — Output JSON. Pass comma-separated field names, "*" for all fields, or "?" to list available fields.
  • -q, --jq <TEXT> — Filter --json output through a jq expression.