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 thecragoal, and every other goal runs and scaffolds withrequirement_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 atsbomflow 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 placeholdersbomflow.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:
sbomflow examples # every worked example, grouped by command
sbomflow examples store # just the ones for `store`
sbomflow examples audit --json # machine-readableThese 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).
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.| Fact | Value |
|---|---|
| Group | start — Get started |
| Stability | stable |
| Regime | any |
| Reads | the target directory, and your answers at the prompts of a real terminal. |
| Writes | evidence-pack.json (the first pack, after a preview you confirm); sbomflow.yaml, never over one unconfirmed |
--output names | a directory |
| Network | offline — This command has no network-capable path. |
| Exit codes | 0 ok · 2 no real terminal, or a usage error |
| Machine output | human-only-by-design — interactive, TTY-gated onboarding; refuses CI and redirected IO by design |
Options
| Option | Value | Default | Allowed | Required | Help |
|---|---|---|---|---|---|
-h, --help | (flag) | none | — | no | show this help message and exit |
[target] | [target] | the current directory | any | no | Product directory. |
--no-input, --non-interactive | (flag) | false | — | no | Never prompt; exit with guidance to the scriptable path (for CI/automation). |
--no-color | (flag) | false | — | no | Disable ANSI color output. |
--as-of | AS_OF | none | any | no | Optional ISO timestamp for a deterministic first audit. |
--product-name | PRODUCT_NAME | none | any | no | Use this as the editable detected-name default. |
--product-version | PRODUCT_VERSION | none | any | no | Use this as the editable detected-version default. |
--product-class | CLASS | none | default, important-class-i, important-class-ii, critical | no | Use this as the editable declared-class default; SBOMFlow does not classify the product. One of: default, important-class-i, important-class-ii, critical. |
--output | OUTPUT | none | any | no | Use this as the editable output-directory default (directory). |
--style | {system,dark,light,high-contrast,ansi,none} | none | system, dark, light, high-contrast, ansi, none | no | Use 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.
sbomflow setup .Never prompt: print the scriptable path for automation and exit 2. Exits 2.
sbomflow setup . --no-inputPre-fill the editable defaults the wizard offers; with no terminal it still asks nothing and exits 2. Exits 2.
sbomflow setup . --product-name Gateway --product-version 2.4.1 --output evidenceRun the wizard in the current directory; with no terminal it prints the scriptable path instead and exits 2. Exits 2.
sbomflow setupSee also: sbomflow quickstart, sbomflow doctor, sbomflow help goal sbom.
sbomflow quickstart#
First run: detect the project, scaffold config, run an offline audit, summarize.
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.| Fact | Value |
|---|---|
| Group | start — Get started |
| Stability | stable |
| Regime | any |
| Reads | the target directory only. |
| Writes | evidence-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 names | a directory |
| Network | offline — This command has no network-capable path. |
| Exit codes | 0 ok, including a declined confirmation · 2 usage or input error |
| Machine output | has-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
| Option | Value | Default | Allowed | Required | Help |
|---|---|---|---|---|---|
-h, --help | (flag) | none | — | no | show this help message and exit |
[target] | [target] | none | any | no | Project directory to scan (default: the current directory). |
--output | OUTPUT | none | any | no | Where the evidence pack is written (directory). Default: <target>/sbomflow-evidence. |
--product-name | PRODUCT_NAME | none | any | no | Override the auto-detected product name. |
--product-version | PRODUCT_VERSION | none | any | no | Override the auto-detected product version. |
--requirement-regime | {cra,none} | none | cra, none | no | Which 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 | — | no | Do not scaffold sbomflow.yaml (audit with detected defaults only). |
--zip | (flag) | false | — | no | Also write the deterministic bundle zip. |
--tour | (flag) | false | — | no | After 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-of | AS_OF | none | any | no | Pinned timestamp for a reproducible first run. |
--ci | {github} | none | github | no | Instead of auditing, emit a ready-to-commit CI workflow (offline audit + gate + PR annotations + evidence upload). Currently: github. |
--force | (flag) | false | — | no | With --ci, overwrite an existing workflow file (default: refuse). |
--yes | (flag) | false | — | no | Accept 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 | — | no | Emit 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.
sbomflow quickstart . --output evidence --as-of 2026-06-26T12:00:00+00:00Print the pre-write disclosure as JSON and exit without writing anything.
sbomflow quickstart . --jsonRun with no requirement regime assessed and no config scaffolded, then print the guided tour.
sbomflow quickstart . --output evidence --requirement-regime none --no-init --tourWrite a ready-to-commit GitHub Actions workflow instead of auditing.
sbomflow quickstart . --ci githubNaming the directory is the go-ahead: detect, scaffold config, run an offline audit and summarize, with no question asked.
sbomflow quickstart .See also: sbomflow audit, sbomflow doctor, sbomflow init, sbomflow help goal sbom.
sbomflow init#
Scaffold sbomflow.yaml and optional reviewer templates.
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.| Fact | Value |
|---|---|
| Group | start — Get started |
| Stability | stable |
| Regime | any |
| Reads | the target directory, to see whether a config is already there. |
| Writes | sbomflow.yaml, and inert *.TEMPLATE.json files |
| Network | offline — This command has no network-capable path. |
| Exit codes | 0 ok · 2 usage or input error · 3 a config exists and --force was not given |
| Machine output | artifact-suffices — scaffolds sbomflow.yaml and inert review templates; the scaffolded files are the product |
Options
| Option | Value | Default | Allowed | Required | Help |
|---|---|---|---|---|---|
-h, --help | (flag) | none | — | no | show this help message and exit |
[target] | [target] | the current directory | any | no | Directory to write sbomflow.yaml into (default: the current directory). |
--force | (flag) | false | — | no | Overwrite an existing sbomflow.yaml. |
--with-review-templates | (flag) | false | — | no | Write TEMPLATE reviewer files with no real decisions. |
--with-source-stubs | (flag) | false | — | no | Write TEMPLATE gap-owner routing and reviewer-role policy stubs (no decisions). |
--product-name | PRODUCT_NAME | REPLACE-ME | any | no | Initial product.name value. |
--product-version | PRODUCT_VERSION | REPLACE-ME | any | no | Initial product.version value. |
--product-class | CLASS | default | default, important-class-i, important-class-ii, critical | no | Initial declared product.class value. SBOMFlow does not classify the product. One of: default, important-class-i, important-class-ii, critical. |
--requirement-regime | {cra,none} | cra | cra, none | no | Initial 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.
sbomflow init . --forceScaffold a config that assesses no requirement regime.
sbomflow init . --force --requirement-regime noneAlso write inert reviewer templates that record no decision.
sbomflow init . --force --with-review-templatesRefuse to overwrite a config that is already there. Exits 3.
sbomflow init .See also: sbomflow validate-config, sbomflow quickstart, sbomflow doctor.
sbomflow doctor#
Run offline environment/config preflight checks.
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.| Fact | Value |
|---|---|
| Group | start — Get started |
| Stability | stable |
| Regime | any |
| Reads | the target directory or config file, and this installation. |
| Writes | stdout (the report; --json prints JSON); analysis-control-receipt.json (with --analysis-control); --fix --apply: only its planned repairs |
| Network | offline — This command has no network-capable path. |
| Exit codes | 0 ok, even when the report names problems · 2 refused target or unwritable path · 6 control receipt written, not healthy |
| Machine output | has-json — one versioned JSON document on stdout |
Options
| Option | Value | Default | Allowed | Required | Help |
|---|---|---|---|---|---|
-h, --help | (flag) | none | — | no | show this help message and exit |
[target] | [target] | the current directory | any | no | Target dir or config file. |
--json | (flag) | false | — | no | Emit machine-readable doctor output. |
--pilot | (flag) | false | — | no | Also 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 | — | no | Print a plan of safe, reversible remediations. Print-first: plans nothing to disk by itself. |
--apply | (flag) | false | — | no | With --fix, execute the plan's still-valid actions (skips any with a drifted precondition). |
--release-manifest | RELEASE_MANIFEST | none | any | no | Signed release-manifest.json to compare the installed version and local vulndb snapshot against, fully offline (never fetched, never auto-updated). |
--public-key | PUBLIC_KEYS | none | any | no | PEM public key to trust for --release-manifest verification (repeatable). |
--vulndb-dir | VULNDB_DIR | .sbomflow-vulndb | any | no | Local vulndb snapshot directory for --release-manifest freshness comparison (default: .sbomflow-vulndb, matching sbomflow vulndb --dir). |
--analysis-control | PATH | none | any | no | Run 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-at | TIMESTAMP | none | any | no | Observation 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.
sbomflow doctor .Print a plan of safe, reversible repairs without writing anything.
sbomflow doctor . --fixWrite this installation's offline control receipt.
sbomflow doctor . --analysis-control analysis-control-receipt.jsonSee also: sbomflow quickstart, sbomflow validate-config, sbomflow support-bundle, sbomflow help exit.
sbomflow examples#
Print worked examples that are executed by the test suite.
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.| Fact | Value |
|---|---|
| Group | start — Get started |
| Stability | stable |
| Regime | any |
| Reads | the examples registry shipped with SBOMFlow; no project. |
| Writes | stdout (the examples; --json prints JSON) |
| Network | offline — This command has no network-capable path. |
| Exit codes | 0 ok · 2 the command has no worked example |
| Machine output | has-json — read/status surface; one versioned JSON document on stdout |
Options
| Option | Value | Default | Allowed | Required | Help |
|---|---|---|---|---|---|
-h, --help | (flag) | none | — | no | show this help message and exit |
[COMMAND] | [COMMAND] | none | any | no | Only show examples for this command (default: all). |
--json | (flag) | false | — | no | Emit JSON. |
Examples
Print every worked example, grouped by command.
sbomflow examplesPrint only the examples for one command.
sbomflow examples storePrint the worked examples as JSON.
sbomflow examples --jsonSee also: sbomflow commands, sbomflow help, sbomflow help goals.