Get started

Check the setup, scaffold a config, run a first pack. This page documents every command in the start group, in the order sbomflow help start lists them. Each command's section is generated from the command itself — its summary, description and options from the parser, and its reads, writes, exit codes, examples and see-also from the command catalog — so it says exactly what sbomflow <command> --help says. Every example below is executed offline by the test suite, and every non-zero exit code is either produced by an executed probe or carries a recorded reason why no offline probe can produce it.

See the CLI overview for how the thirteen groups fit together and the command reference for every command's options in one place.

Overview#

  • sbomflow setup — guided interactive onboarding (a real terminal only). It asks what you want to get done first; a product class is asked only when you choose the cra goal, and every other goal runs and scaffolds with requirement_regime: none. With no terminal it prints the same guidance as before and exits 2.
  • sbomflow help goals — the goals, each with exact offline steps. The same goals are on Goals; Use SBOMFlow without CRA assessment and Keeping runtime evidence in custody walk two of them end to end.
  • sbomflow quickstart <dir> — auto-detect, scaffold config, run an offline audit. After a run with no requirement regime its next steps teach the release-gate goal's gate and point at sbomflow help goals.
  • sbomflow doctor <dir> — report your environment and config facts.
  • sbomflow doctor --analysis-control <path> — check an offline runtime control receipt. A valid SBOM proves something about the tree, not about the run that produced it; this is how you check the second thing.
  • sbomflow init <dir> — scaffold a placeholder sbomflow.yaml.
  • sbomflow examples [command] — worked examples that are guaranteed to run.

quickstart discloses what it is about to touch before it writes anything — scan root, output directory, the config it will create, the detected build inputs, a bounded in-scope file count and the offline posture. --yes accepts that disclosure without prompting; --json prints the same disclosure as one versioned document and exits without writing, auditing or asking. A home-rooted path prints as ~/my-product; a path outside your home prints verbatim, on purpose.

Worked examples#

Every command's --help page ends with its examples, and every one of them is executed by the test suite, as are the examples on these group pages. For the worked-example registry — "show me waiver usage", "how do I diff two releases?" — ask the CLI:

sh
sbomflow examples                 # every worked example, grouped by command
sbomflow examples store           # just the ones for `store`
sbomflow examples audit --json    # machine-readable

These are not prose. Every example is stored as data and executed against the bundled demo fixture by the test suite, so a renamed flag or a newly required argument fails the build rather than failing you at the terminal. None of them touch the network, which is what makes running them in tests possible.

Who this is for: evaluators, new operators, security leads and CI owners.

sbomflow setup#

Guided interactive first-run onboarding (a real terminal only; never in CI).

text
Guided, interactive first-run onboarding: detect the product, confirm
identity and output location, preview exactly what will be written, then
run the first offline audit and explain the result.

Requires a real terminal; it never prompts in CI or redirected IO, and
without a terminal it prints the scriptable path (`sbomflow quickstart .`)
and exits 2.
FactValue
Groupstart — Get started
Stabilitystable
Regimeany
Readsthe target directory, and your answers at the prompts of a real terminal.
Writesevidence-pack.json (the first pack, after a preview you confirm); sbomflow.yaml, never over one unconfirmed
--output namesa directory
Networkoffline — This command has no network-capable path.
Exit codes0 ok · 2 no real terminal, or a usage error
Machine outputhuman-only-by-design — interactive, TTY-gated onboarding; refuses CI and redirected IO by design

Options

OptionValueDefaultAllowedRequiredHelp
-h, --help(flag)none—noshow this help message and exit
[target][target]the current directoryanynoProduct directory.
--no-input, --non-interactive(flag)false—noNever prompt; exit with guidance to the scriptable path (for CI/automation).
--no-color(flag)false—noDisable ANSI color output.
--as-ofAS_OFnoneanynoOptional ISO timestamp for a deterministic first audit.
--product-namePRODUCT_NAMEnoneanynoUse this as the editable detected-name default.
--product-versionPRODUCT_VERSIONnoneanynoUse this as the editable detected-version default.
--product-classCLASSnonedefault, important-class-i, important-class-ii, criticalnoUse this as the editable declared-class default; SBOMFlow does not classify the product. One of: default, important-class-i, important-class-ii, critical.
--outputOUTPUTnoneanynoUse this as the editable output-directory default (directory).
--style{system,dark,light,high-contrast,ansi,none}nonesystem, dark, light, high-contrast, ansi, nonenoUse this terminal output style without prompting for a style.

Examples

In a terminal, walk the guided first run; with no terminal (CI, a pipe) it prints the scriptable path instead and exits 2. Exits 2.

sh
sbomflow setup .

Never prompt: print the scriptable path for automation and exit 2. Exits 2.

sh
sbomflow setup . --no-input

Pre-fill the editable defaults the wizard offers; with no terminal it still asks nothing and exits 2. Exits 2.

sh
sbomflow setup . --product-name Gateway --product-version 2.4.1 --output evidence

Run the wizard in the current directory; with no terminal it prints the scriptable path instead and exits 2. Exits 2.

sh
sbomflow setup

See also: sbomflow quickstart, sbomflow doctor, sbomflow help goal sbom.

sbomflow quickstart#

First run: detect the project, scaffold config, run an offline audit, summarize.

text
The fastest first run: detect the project type, scaffold sbomflow.yaml
(unless --no-init), run a fully offline audit, and print a short summary.

Before the first write it discloses the scope: scan root, output, detected
inputs, a bounded file count, the network posture and what already exists.
It asks only when no target is given; naming a directory, or --yes,
proceeds without a question, so scripts and CI never prompt.
FactValue
Groupstart — Get started
Stabilitystable
Regimeany
Readsthe target directory only.
Writesevidence-pack.json (and the rest of the pack, into --output); sbomflow.yaml, never over an existing one; stdout (the disclosure; --json prints only that)
--output namesa directory
Networkoffline — This command has no network-capable path.
Exit codes0 ok, including a declined confirmation · 2 usage or input error
Machine outputhas-json — one versioned JSON document on stdout (sbomflow-quickstart-preflight-v1, or sbomflow-quickstart-ci-preflight-v1 under --ci — two shapes, so two names). The RUN's machine interface is still the artifact set it writes; --json serves the pre-write disclosure instead — the same document the terminal form renders, so a caller reading JSON and a caller reading the terminal cannot reach different conclusions about the scan root, the bounded and labelled file count, or which of the five states the output directory is in. It emits that document and exits without writing, auditing or consenting

Options

OptionValueDefaultAllowedRequiredHelp
-h, --help(flag)none—noshow this help message and exit
[target][target]noneanynoProject directory to scan (default: the current directory).
--outputOUTPUTnoneanynoWhere the evidence pack is written (directory). Default: <target>/sbomflow-evidence.
--product-namePRODUCT_NAMEnoneanynoOverride the auto-detected product name.
--product-versionPRODUCT_VERSIONnoneanynoOverride the auto-detected product version.
--requirement-regime{cra,none}nonecra, nonenoWhich requirement regime this run is executed under: cra (default) derives the CRA Annex I requirement graph, gaps and coverage; none declares that no requirement regime applies, so no requirement is assessed and the run records that declaration. Under none the empty evidence gaps mean NOT ASSESSED, never 'no gaps'. Overrides requirement_regime in sbomflow.yaml.
--no-init(flag)false—noDo not scaffold sbomflow.yaml (audit with detected defaults only).
--zip(flag)false—noAlso write the deterministic bundle zip.
--tour(flag)false—noAfter the summary, print a numbered, copy-paste guided tour through the release workflow, filled with this run's real paths. Pure print, CI-safe.
--as-ofAS_OFnoneanynoPinned timestamp for a reproducible first run.
--ci{github}nonegithubnoInstead of auditing, emit a ready-to-commit CI workflow (offline audit + gate + PR annotations + evidence upload). Currently: github.
--force(flag)false—noWith --ci, overwrite an existing workflow file (default: refuse).
--yes(flag)false—noAccept the disclosed scope without being asked. Only a run with no target given is ever asked; the disclosure itself is always printed.
--json(flag)false—noEmit the pre-write disclosure as deterministic JSON and exit without writing anything or auditing. Same facts as the text form, including the labelled bounded-count state and the output-directory state.

Examples

Scan the project, scaffold its config and run the first offline audit.

sh
sbomflow quickstart . --output evidence --as-of 2026-06-26T12:00:00+00:00

Print the pre-write disclosure as JSON and exit without writing anything.

sh
sbomflow quickstart . --json

Run with no requirement regime assessed and no config scaffolded, then print the guided tour.

sh
sbomflow quickstart . --output evidence --requirement-regime none --no-init --tour

Write a ready-to-commit GitHub Actions workflow instead of auditing.

sh
sbomflow quickstart . --ci github

Naming the directory is the go-ahead: detect, scaffold config, run an offline audit and summarize, with no question asked.

sh
sbomflow quickstart .

See also: sbomflow audit, sbomflow doctor, sbomflow init, sbomflow help goal sbom.

sbomflow init#

Scaffold sbomflow.yaml and optional reviewer templates.

text
Write a placeholder sbomflow.yaml for a project: product identity,
the declared class and the requirement regime, each a value you edit.
The template flags add inert *.TEMPLATE.json reviewer files and routing
stubs; they record no decision, and init never classifies the product.
An existing config is refused (exit 3) unless --force is given.
FactValue
Groupstart — Get started
Stabilitystable
Regimeany
Readsthe target directory, to see whether a config is already there.
Writessbomflow.yaml, and inert *.TEMPLATE.json files
Networkoffline — This command has no network-capable path.
Exit codes0 ok · 2 usage or input error · 3 a config exists and --force was not given
Machine outputartifact-suffices — scaffolds sbomflow.yaml and inert review templates; the scaffolded files are the product

Options

OptionValueDefaultAllowedRequiredHelp
-h, --help(flag)none—noshow this help message and exit
[target][target]the current directoryanynoDirectory to write sbomflow.yaml into (default: the current directory).
--force(flag)false—noOverwrite an existing sbomflow.yaml.
--with-review-templates(flag)false—noWrite TEMPLATE reviewer files with no real decisions.
--with-source-stubs(flag)false—noWrite TEMPLATE gap-owner routing and reviewer-role policy stubs (no decisions).
--product-namePRODUCT_NAMEREPLACE-MEanynoInitial product.name value.
--product-versionPRODUCT_VERSIONREPLACE-MEanynoInitial product.version value.
--product-classCLASSdefaultdefault, important-class-i, important-class-ii, criticalnoInitial declared product.class value. SBOMFlow does not classify the product. One of: default, important-class-i, important-class-ii, critical.
--requirement-regime{cra,none}cracra, nonenoInitial requirement_regime value (default: cra). none scaffolds a config with no product.class, technical_documentation, annex_i_evidence or due_diligence keys, so a following run is a none run that trips no requirement-regime preflight refusal.

Examples

Overwrite the project's config with a fresh scaffold.

sh
sbomflow init . --force

Scaffold a config that assesses no requirement regime.

sh
sbomflow init . --force --requirement-regime none

Also write inert reviewer templates that record no decision.

sh
sbomflow init . --force --with-review-templates

Refuse to overwrite a config that is already there. Exits 3.

sh
sbomflow init .

See also: sbomflow validate-config, sbomflow quickstart, sbomflow doctor.

sbomflow doctor#

Run offline environment/config preflight checks.

text
Report local environment and config facts before a first run: Python version,
optional extras, config discovery/validity, and what a scan would pick up. It
fabricates nothing and changes nothing.

--pilot adds the machine-checkable half of the pilot-readiness checklist: a
smoke analysis of a synthetic product, a pinned determinism double-run, disk
space, and target writability (a temporary directory and a deleted write-probe
in the target). It reports whether the ENVIRONMENT is ready — never the
product, the evidence, or the review workflow.

TARGET is one existing place, and doctor never substitutes another for it.
Accepted: an existing directory (the project root), or an existing SBOMFlow
config file — sbomflow.yaml / sbomflow.yml / sbomflow.json, the project marker
— whose directory is the root. Refused, with a stable code and before anything
is read or written: a path that does not exist (E001), one that cannot be
examined (E004), a symbolic link named as the target, a regular file that is
not a config file, and any other file type (E019). There is no fallback to the
parent directory, a neighbour, or the current directory, and a repair never
creates a directory. `..` is resolved, not refused, so every path printed is
the physical one that will be touched.

--fix prints a plan of provably safe, reversible remediations (a mischosen
config-key casing, a missing inert *.TEMPLATE.json review scaffold) — never a
reviewer decision file or evidence artifact. Without --apply it is the dry
run: it reads only, writes nothing, and lists every proposed path,
precondition and reversal. --apply executes only the actions still valid at
apply time, each re-checked against the resolved target immediately before its
write, so a plan cannot authorise a write into a substituted path. A
precondition that has drifted since the plan was built is skipped with a
reason and every other action still proceeds (exit 0); a target that changed
under the run, or a write the filesystem refused, is reported per action and
exits 2. Rolling back is the reversal line printed beside each action.

--analysis-control PATH runs the offline runtime control receipt: a packaged
reserved synthetic corpus is executed in a throwaway directory and PATH
records which named controls THIS INSTALLATION could perform. It reads no
customer project and reaches no verdict about one. Exit 0 only when every
declared control passed; a written degraded/failed/indeterminate receipt exits
6.
FactValue
Groupstart — Get started
Stabilitystable
Regimeany
Readsthe target directory or config file, and this installation.
Writesstdout (the report; --json prints JSON); analysis-control-receipt.json (with --analysis-control); --fix --apply: only its planned repairs
Networkoffline — This command has no network-capable path.
Exit codes0 ok, even when the report names problems · 2 refused target or unwritable path · 6 control receipt written, not healthy
Machine outputhas-json — one versioned JSON document on stdout

Options

OptionValueDefaultAllowedRequiredHelp
-h, --help(flag)none—noshow this help message and exit
[target][target]the current directoryanynoTarget dir or config file.
--json(flag)false—noEmit machine-readable doctor output.
--pilot(flag)false—noAlso run the design-partner pilot preflight: smoke analysis, pinned determinism double-run, disk space, and target writability. Checks the environment only, never product or evidence readiness.
--fix(flag)false—noPrint a plan of safe, reversible remediations. Print-first: plans nothing to disk by itself.
--apply(flag)false—noWith --fix, execute the plan's still-valid actions (skips any with a drifted precondition).
--release-manifestRELEASE_MANIFESTnoneanynoSigned release-manifest.json to compare the installed version and local vulndb snapshot against, fully offline (never fetched, never auto-updated).
--public-keyPUBLIC_KEYSnoneanynoPEM public key to trust for --release-manifest verification (repeatable).
--vulndb-dirVULNDB_DIR.sbomflow-vulndbanynoLocal vulndb snapshot directory for --release-manifest freshness comparison (default: .sbomflow-vulndb, matching sbomflow vulndb --dir).
--analysis-controlPATHnoneanynoRun the offline runtime control receipt against the packaged reserved diagnostic corpus and write it to PATH. Reads no customer project, writes nothing else, and reaches no verdict about any product.
--observed-atTIMESTAMPnoneanynoObservation time to record on the --analysis-control receipt (RFC 3339). Omitted, no time is recorded rather than invented.

Examples

Report the environment and config facts for a project.

sh
sbomflow doctor .

Print a plan of safe, reversible repairs without writing anything.

sh
sbomflow doctor . --fix

Write this installation's offline control receipt.

sh
sbomflow doctor . --analysis-control analysis-control-receipt.json

See also: sbomflow quickstart, sbomflow validate-config, sbomflow support-bundle, sbomflow help exit.

sbomflow examples#

Print worked examples that are executed by the test suite.

text
Print worked, copy-pasteable examples for a command.

Every example is executed against the bundled demo fixture by the test
suite, so an example that stops working fails the build rather than you.
FactValue
Groupstart — Get started
Stabilitystable
Regimeany
Readsthe examples registry shipped with SBOMFlow; no project.
Writesstdout (the examples; --json prints JSON)
Networkoffline — This command has no network-capable path.
Exit codes0 ok · 2 the command has no worked example
Machine outputhas-json — read/status surface; one versioned JSON document on stdout

Options

OptionValueDefaultAllowedRequiredHelp
-h, --help(flag)none—noshow this help message and exit
[COMMAND][COMMAND]noneanynoOnly show examples for this command (default: all).
--json(flag)false—noEmit JSON.

Examples

Print every worked example, grouped by command.

sh
sbomflow examples

Print only the examples for one command.

sh
sbomflow examples store

Print the worked examples as JSON.

sh
sbomflow examples --json

See also: sbomflow commands, sbomflow help, sbomflow help goals.