Skip to main content

Air-Gap CLI Commands

Purpose: For operators, provides every opencenter-airgap command with flags, options, and examples.

Package: opencenter-build (Python 3.12+, version 1.0.0-rc2)

Command Overview

CommandDescription
initCreate project directory structure and config
addAdd a component (tool, repo, image, chart) to the manifest
scanDiscover images and charts from cloned repos
generate-manifestGenerate zarf.yaml from current manifest
buildBuild the air-gap Zarf package
validateValidate versions.env and manifest consistency
verifyVerify a built package against its manifest
statusShow build state and component counts
cleanRemove build artifacts and temporary files
serveDeploy package and start bastion services
keygenGenerate Cosign signing keypair
releaseTag and produce final release artifact
versionPrint CLI version

opencenter-airgap init

Creates the directory structure (config/, build/, dist/, assets/) and a default config/versions.env.

FlagDefaultDescription
--templatebaremetalTemplate type: baremetal, openstack
# Baremetal (default)
opencenter-airgap init

# OpenStack template (includes Terraform provider config)
opencenter-airgap init --template openstack

Safe to run in an existing project — does not overwrite existing files.

opencenter-airgap add

Adds a component to config/components.yaml.

opencenter-airgap add image <image-reference>
opencenter-airgap add tool --name <name> --version <version> --url <url>
opencenter-airgap add repo <git-url>
opencenter-airgap add chart <chart-reference>
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
chart<chart-ref>Add a Helm chart

Duplicates are detected and skipped.

opencenter-airgap add tool --name helm --version v4.0.5 \
--url https://get.helm.sh/helm-v4.0.5-linux-amd64.tar.gz

opencenter-airgap add image nginx:1.27.3

opencenter-airgap add chart cert-manager --version v1.16.2 \
--repo https://charts.jetstack.io

opencenter-airgap scan

Discovers container images and Helm charts from repositories listed in versions.env.

opencenter-airgap scan --repos
opencenter-airgap scan --repo <path>
FlagDescription
--reposClone and scan all repos from versions.env
--repo <path>Scan a specific local directory

Parses YAML files for image: fields and HelmRelease/HelmRepository resources. Results merge into components.yaml.

opencenter-airgap generate-manifest

Generate zarf.yaml from the current manifest without running a full build.

opencenter-airgap generate-manifest

Renders zarf.yaml.template with variables from versions.env and component data. Useful for inspecting the Zarf definition before building.

opencenter-airgap build

Builds the Zarf package. Outputs zarf-package-*.tar.zst in dist/.

opencenter-airgap build [--clean] [--resume] [--force-regenerate]
FlagDescription
--cleanRemove previous artifacts before starting
--resumeResume from last successful checkpoint
--force-regenerateRegenerate components.yaml from versions.env

Executes 8 phases with checkpoint state in build/state.json.

opencenter-airgap validate

Validates configuration integrity.

opencenter-airgap validate

Checks versions.env syntax, components.yaml schema compliance, URL reachability, and zarf.yaml references.

opencenter-airgap verify

Verifies a built package.

opencenter-airgap verify <PACKAGE> [--manifest <manifest-path>]

Checks archive integrity, SBOM presence, and Cosign signature.

opencenter-airgap status

opencenter-airgap status

Shows each build phase state, artifact counts, and timestamps.

opencenter-airgap clean

opencenter-airgap clean

Removes build/, dist/, and state file. Preserves config/.

opencenter-airgap serve

Deploy a package and start bastion services with health checks.

opencenter-airgap serve <PACKAGE>

Starts container registry and nginx file server from the specified package. Includes health check endpoints for monitoring.

opencenter-airgap keygen

Generate Cosign signing keypair.

opencenter-airgap keygen

Creates keys in .secrets/ directory with 0600 permissions.

opencenter-airgap release

Tag and produce final release artifact.

opencenter-airgap release [VERSION]

If VERSION is omitted, uses version from pyproject.toml.

opencenter-airgap version

opencenter-airgap version

Exit Codes

CodeMeaning
0Success
1General error (see stderr)
2Invalid arguments or missing required flags