Air-Gap CLI Command Reference
Purpose: For operators, provides every air-gap CLI command with flags, options, and examples.
Overview
The opencenter-airgap CLI manages the full build lifecycle for air-gap packages. All commands operate relative to the project root directory.
Commands
init
Initialize a new build environment.
opencenter-airgap init [--template baremetal|openstack]
| Flag | Default | Description |
|---|---|---|
--template | baremetal | Template type; openstack includes Terraform provider config |
Creates config/versions.env with default version pins. Safe to run in an existing project — does not overwrite existing files.
add
Add a component to the manifest.
opencenter-airgap add image <image-reference>
opencenter-airgap add tool --name <name> --version <version> --url <url>
opencenter-airgap add repo <git-url>
Subcommands:
| Subcommand | Required args | Description |
|---|---|---|
image | <image-ref> (must include tag) | Add a container image |
tool | --name, --version, --url | Add a CLI binary or tool |
repo | <git-url> | Add a Git repository for scanning |
Appends to config/components.yaml. Duplicates are detected and skipped.
scan
Discover container images and Helm charts from repositories.
opencenter-airgap scan --repos
opencenter-airgap scan --repo <path>
| Flag | Description |
|---|---|
--repos | Clone and scan all repositories from versions.env |
--repo <path> | Scan a specific local directory |
Parses YAML files for image: fields and Helm chart references. Results merge into components.yaml.
build
Build the air-gap package.
opencenter-airgap build [--clean] [--resume] [--force-regenerate]
| Flag | Description |
|---|---|
--clean | Remove previous build artifacts before starting |
--resume | Resume from last successful checkpoint |
--force-regenerate | Regenerate components.yaml from versions.env (discards manual edits) |
Executes all build phases: manifest generation → repo cloning → image scanning → artifact download → Zarf package creation.
validate
Validate configuration and manifest.
opencenter-airgap validate
Checks:
versions.envsyntax and required variablescomponents.yamlschema compliance- URL reachability for declared artifacts (Zone A only)
zarf.yamlcomponent references match collected assets
verify
Verify a built package.
opencenter-airgap verify <package-path> [--manifest <manifest-path>]
| Flag | Description |
|---|---|
--manifest | Path to artifact-manifest.json (auto-detected if omitted) |
Checks archive integrity, component completeness, SBOM presence, and Cosign signature.
status
Display build status and artifact counts.
opencenter-airgap status
Shows each build phase with state (complete/pending/failed), artifact counts, and timestamps.
clean
Remove build artifacts and state.
opencenter-airgap clean
Deletes build/, dist/, and assets/ directories. Preserves config/versions.env and config/components.yaml.
serve
Start local registry and file server for testing.
opencenter-airgap serve
Starts a local container registry and nginx file server from the build output. Useful for testing the package locally before transfer.
keygen
Generate signing keys.
opencenter-airgap keygen
Creates a Cosign key pair for artifact signing.
release
Create a release artifact with metadata.
opencenter-airgap release
Produces the final distributable package with version metadata, checksums, and signatures.
version
Display CLI version.
opencenter-airgap version
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | General error (check stderr for details) |
| 2 | Invalid arguments or missing required flags |
Environment Variables
The CLI reads config/versions.env for build configuration. It does not use shell environment variables for version pinning — all configuration is file-based.