Air-Gap CLI Commands
Purpose: For operators, provides every opencenter-airgap command with flags, options, and examples.
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 |
build | Build the air-gap Zarf package |
verify | Verify a built package against its manifest |
status | Show build state and component counts |
validate | Validate versions.env and manifest consistency |
clean | Remove build artifacts and temporary files |
serve | Start local registry and package server |
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 |
--config | config/versions.env | Configuration file path |
# Baremetal (default)
opencenter-airgap init
# OpenStack template
opencenter-airgap init --template openstack
opencenter-airgap add
Adds a component to config/components.yaml. Accepts a positional component_type (tool, repo, image, chart) and a name.
| Flag | Required for | Description |
|---|---|---|
--version | tool, chart | Component version |
--url | tool, repo | Download URL or Git URL |
--ref | repo | Git ref (branch, tag, commit) |
--repo | chart | Helm repository URL |
--extract | — | Extract archive after download (tools) |
--binary | — | Path to binary inside archive |
--manifest | — | Manifest path (default: config/components.yaml) |
opencenter-airgap add tool helm --version 3.14.0 \
--url https://get.helm.sh/helm-v3.14.0-linux-amd64.tar.gz \
--extract --binary linux-amd64/helm
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.
| Flag | Description |
|---|---|
--repo <path> | Scan a local repo path (repeatable) |
--repos | Clone repos from versions.env before scanning |
--discover-images | Discover images from component manifest repos |
--concurrency | Number of worker processes |
opencenter-airgap scan --repos --discover-images
opencenter-airgap build
Builds the Zarf package from versions.env and the component manifest. Outputs a zarf-package-*.tar.zst file in dist/.
opencenter-airgap verify
Checks a built package against its manifest. Validates image digests, chart versions, and tool checksums.
opencenter-airgap validate
Validates versions.env syntax and cross-references the component manifest for missing or conflicting entries.
opencenter-airgap status
Prints current build state: component counts, last build timestamp, and package size.
opencenter-airgap clean
Removes build/ and dist/ directories. Does not touch config/.
opencenter-airgap serve
Starts a local container registry (port 5000) and an Nginx-based package server (port 8080) from a built package. Used on bastion hosts in air-gapped sites.
Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | General error (see stderr) |
| 2 | Validation failure |