Skip to main content

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]
FlagDefaultDescription
--templatebaremetalTemplate 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:

SubcommandRequired argsDescription
image<image-ref> (must include tag)Add a container image
tool--name, --version, --urlAdd 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>
FlagDescription
--reposClone 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]
FlagDescription
--cleanRemove previous build artifacts before starting
--resumeResume from last successful checkpoint
--force-regenerateRegenerate 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.env syntax and required variables
  • components.yaml schema compliance
  • URL reachability for declared artifacts (Zone A only)
  • zarf.yaml component references match collected assets

verify

Verify a built package.

opencenter-airgap verify <package-path> [--manifest <manifest-path>]
FlagDescription
--manifestPath 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

CodeMeaning
0Success
1General error (check stderr for details)
2Invalid 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.