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
| Command | Description |
|---|---|
init | Create project directory structure and config |
add | Add a component (tool, repo, image, chart) to the manifest |
scan | Discover images and charts from cloned repos |
generate-manifest | Generate zarf.yaml from current manifest |
build | Build the air-gap Zarf package |
validate | Validate versions.env and manifest consistency |
verify | Verify a built package against its manifest |
status | Show build state and component counts |
clean | Remove build artifacts and temporary files |
serve | Deploy package and start bastion services |
keygen | Generate Cosign signing keypair |
release | Tag and produce final release artifact |
version | Print CLI version |
opencenter-airgap init
Creates the directory structure (config/, build/, dist/, assets/) and a default config/versions.env.
| Flag | Default | Description |
|---|---|---|
--template | baremetal | Template 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>
| 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 |
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>
| Flag | Description |
|---|---|
--repos | Clone 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]
| Flag | Description |
|---|---|
--clean | Remove previous artifacts before starting |
--resume | Resume from last successful checkpoint |
--force-regenerate | Regenerate 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
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | General error (see stderr) |
| 2 | Invalid arguments or missing required flags |