detect to review your package files, then generate an SBOM, audit dependencies, or check licenses. This reference covers Alpha version 0.3.0.
For help with a command, run githits-scan <command> --help. For nested commands, use the full name, such as githits-scan sbom generate --help or githits-scan license check --help.
Common options
All five commands accept these output options:
Diagnostics go to stderr. Reports go to stdout or the output file.
For discovery and online analysis, use these options to control file selection:
Online analysis requires
GITHITS_API_TOKEN. Review what Scan uploads before running it. The HTTP API reference describes upload limits, quota, and how to interpret results.
Detect
Preview the package files Scan would upload, without a token or network connection:
If no package files are selected, Scan exits 1. If Scan cannot prepare an upload, JSON inventory is still available with null
upload_paths and an upload_error. The command then exits 2 for usage errors or 3 for I/O errors.
Generate an SBOM
Generate a dependency inventory in the format you need:--format to choose the output:
Audit dependencies
Check vulnerabilities, deprecated releases, outdated and duplicate versions, and manifest/lockfile disagreements:
JSON and saved analyses retain findings even when the human-readable output omits details. To inspect an analysis offline, save it with
--save-analysis. Compact audit --json output cannot be used as a saved analysis.
Report licenses
Read license information without applying a policy:license check to enforce a policy.
The report separates reported licenses, publisher context, source observations, and coverage gaps. It does not give a policy verdict.
Check license policy
Configure a license policy, then check dependencies against it:--sbom, Scan generates a CycloneDX JSON document online. With --sbom, it reads an existing document offline. Both forms require [licenses] in the selected configuration.
Violations, missing or unrecognized licenses, and unresolved projects return exit 1.
Offline replay
Inspect a saved analysis, read a license report, or check an SBOM without contacting the API. These commands need no token:
Replay uses the saved information. It does not refresh data from GitHits. Compact audit JSON and policy verdict JSON are for automation and cannot be used as replay inputs.
Exit codes
Use these distinctions to handle failures in CI. Read the diagnostic before rerunning an online command: it submits a new job and can consume quota again.