Skip to content

CLI reference

This page covers user-facing CLI operations. Run apex <command> --help for the complete options supported by the installed version.

Command Purpose Connects to or changes targets
check Check Deployment YAML and node connectivity Checks nodes; does not install
validate Validate the Deployment and component manifests; resolve dynamic versions No
prepare Download or import artifacts and verify SHA256 No
apply Deploy using prepared artifacts Yes
deploy Run check, validate, prepare, and apply in order Yes

For a controlled deployment, run check, validate, and prepare, review apply --dry-run, then deploy:

Terminal window
apex check -f deployment.yaml
apex validate -f deployment.yaml --manifests ~/.apex/manifests -o resolved.yaml
apex prepare -f resolved.yaml --manifests ~/.apex/manifests
apex apply -f resolved.yaml --manifests ~/.apex/manifests --dry-run
apex apply -f resolved.yaml --manifests ~/.apex/manifests

For a one-command deployment, use apex deploy -f deployment.yaml. Automation should pass --yes when it intentionally accepts confirmation prompts.

validate resolves version: auto and release-based versions, and writes a resolved Deployment. Pass the reported resolvedDeploymentYaml to prepare and apply so every stage uses the same exact versions. Select the version cache policy with --use-cached-versions, --refresh-versions, or --offline. prepare and apply do not resolve dynamic versions.

Online:

Terminal window
apex prepare -f resolved.yaml --manifests ~/.apex/manifests

Import from an offline directory:

Terminal window
apex prepare -f resolved.yaml --manifests ~/.apex/manifests --offline-dir ./bundle

prepare matches offline artifacts by the exact filenames in the manifests and verifies SHA256. Missing required artifacts cause an error. apply only uses prepared cache content; it does not download artifacts or search the offline directory.

Terminal window
apex apply -f resolved.yaml --dry-run
apex apply -f resolved.yaml --install-mode full

--dry-run produces a plan and command preview without connecting to nodes, transferring files, or executing commands. --install-mode compact|full overrides role modes without changing the source YAML. Step-selection options are intended for staged maintenance; use them only when you understand component dependencies and installation state. After preparing the required artifacts, a full apply without step selectors performs the normal deployment checks.

Terminal window
apex package list
apex package install explorer
apex package remove explorer

Package commands use the Default Deployment saved after the last successful full deployment. Use -f deployment.yaml if no snapshot is available, another context is required, or SSH credentials are not present in the snapshot. Removal prompts for confirmation; pass --yes for automation. Optional packages cannot be installed or removed independently in full mode.

Terminal window
apex version
apex clean -f deployment.yaml

clean deletes the Apex working directory on the Deployment targets and requires confirmation. It is not a product uninstall command; verify spec.apexDir before proceeding. For product removal and data cleanup, use the commands in Component management. Reports are stored in reports/ and operation logs in logs/ under Apex Home.

  • -f / --file: Deployment YAML path.
  • --manifests: Component Manifest directory; defaults to the directory under Apex Home.
  • --cache: Artifact cache directory.
  • --offline: Avoid network access and use local cache or artifacts.
  • --yes: Confirm operations that otherwise prompt.

Options vary by subcommand; use that command’s --help output as the source of truth.