uds-cli

module
v0.37.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2026 License: AGPL-3.0

README

UDS-CLI

Latest Release Go version Build Status OpenSSF Scorecard

UDS CLI is the command-line DevX for interacting with the UDS ecosystem. It is the primary way to interact with UDS workflows from a terminal, including bundle authoring, artifact creation, deployment, publishing, cluster operations, task automation, and access to the UDS-adjacent tooling needed to operate the platform.

UDS CLI currently supports Legacy and Next modes. Legacy remains the default while Next matures as an alpha preview. See CLI Modes for details.

Install

Recommended installation method is with Brew:

brew trust --formula defenseunicorns/tap/uds && brew tap defenseunicorns/tap && brew install uds

UDS CLI binaries are also included with each Github Release

Snapshot prereleases

The Snapshot Release workflow runs daily at 03:00 UTC against main; manual dispatches also build only main. Successful runs publish a GitHub prerelease tagged vX.Y.Z-snapshot+YYYYMMDDHHMMSS-XXXXXXXX, where vX.Y.Z is the latest stable tag and XXXXXXXX is the source commit's eight-character SHA. Each prerelease contains Linux and macOS binaries for amd64 and arm64, Linux DEB/RPM packages, SHA-256 checksums, and per-binary SBOMs.

Snapshots do not update Homebrew or become the latest release. Scheduled cleanup retains the newest three snapshot prereleases and preserves their tags.

Official Documentation

Official documentation is located at docs.defenseunicorns.com/cli/

Quickstart

UDS CLI Next uses bundle.uds.hcl bundle definitions. This example creates a local k3d cluster with the UDS k3d package, initializes Zarf, and deploys podinfo.

Prerequisites: Docker and k3d must be installed and running.

Create bundle.uds.hcl:

uds {
  bundle_api_version = "uds.dev/v1alpha1"
}

metadata {
  name        = "next-quickstart"
  description = "Next mode quickstart bundle"
  version     = "0.1.0"
}

package "uds_k3d_dev" {
  source = "oci://ghcr.io/defenseunicorns/packages/uds-k3d:0.20.2"
  signature_verification { verify = false }
}

package "init" {
  source = "oci://ghcr.io/zarf-dev/packages/init:v0.85.0"
  signature_verification {
    keyless {
      certificate_identity_regexp = "https://github\\.com/zarf-dev/zarf/\\.github/workflows/release\\.yml@refs/tags/v\\d+\\.\\d+\\.\\d+"
      certificate_oidc_issuer      = "https://token.actions.githubusercontent.com"
    }
  }
  depends_on = [package.uds_k3d_dev]
}

package "podinfo" {
  source = "oci://ghcr.io/defenseunicorns/uds-cli/podinfo:0.0.2"
  signature_verification { verify = false }
  depends_on = [package.init]
}

Deploy directly from the bundle definition during development:

CLI_FEATURES=NextMode=true uds bundle dev deploy .

Or create an unsigned bundle artifact and deploy it:

CLI_FEATURES=NextMode=true uds bundle create --unsigned .
CLI_FEATURES=NextMode=true uds bundle deploy ./uds-bundle-next-quickstart-<ARCH>-0.1.0.tar.zst --skip-signature-verification

Replace ARCH with the bundle architecture, such as amd64 or arm64.

The --unsigned flag is required here because this quickstart does not configure bundle signing. Deploying the unsigned artifact requires --skip-signature-verification.

CLI Modes

UDS CLI currently supports two modes while the next-generation CLI matures.

Legacy mode is the default today and preserves existing behavior. Next mode is available as an alpha preview behind the NextMode feature flag.

uds version
uds --features=NextMode=true version
CLI_FEATURES=NextMode=true uds version

Next mode will continue to mature during alpha and is planned to become the default in beta. Legacy mode will be removed after the beta migration window.

Legacy Mode Quickstart

UDS-CLI provides a mechanism to bundle and deploy multiple, independent Zarf packages. To create a UDSBundle of Zarf packages, create a uds-bundle.yaml file like so:

kind: UDSBundle
metadata:
  name: example
  description: an example UDS bundle
  version: 0.0.1

packages:
  - name: init
    repository: ghcr.io/zarf-dev/packages/init
    ref: v0.85.0
    keylessVerification:
      certificateIdentityRegexp: https://github\.com/zarf-dev/zarf/\.github/workflows/release\.yml@refs/tags/v\d+\.\d+\.\d+
      certificateOIDCIssuer: https://token.actions.githubusercontent.com
  - name: podinfo
    repository: ghcr.io/defenseunicorns/uds-cli/podinfo
    ref: 0.0.2

Running uds create in the same directory as the above uds-bundle.yaml will create a bundle tarball containing both the Zarf init package and podinfo. The bundle can be deployed with uds deploy.

Contributing

Build instructions and contributing docs are located in CONTRIBUTING.md.

Directories

Path Synopsis
cmd
uds command
Package main is the entrypoint for the uds binary.
Package main is the entrypoint for the uds binary.
uds-cli-next command
Package main is the entrypoint for the UDS CLI.
Package main is the entrypoint for the UDS CLI.
internal
cli
Package cli provides the root command and subcommand registration for the UDS CLI.
Package cli provides the root command and subcommand registration for the UDS CLI.
cli/bundle
Package bundle provides CLI commands for managing UDS bundles.
Package bundle provides CLI commands for managing UDS bundles.
cli/core
Package core provides CLI commands for UDS Core operations.
Package core provides CLI commands for UDS Core operations.
cli/tools
Package tools provides the tools subcommand that groups vendored CLI tools.
Package tools provides the tools subcommand that groups vendored CLI tools.
cli/version
Package version provides the version command for the UDS CLI.
Package version provides the version command for the UDS CLI.
cli/zarf
Package zarf wraps the vendored Zarf CLI with two entry points:
Package zarf wraps the vendored Zarf CLI with two entry points:
filesystem
Package filesystem provides shared filesystem policies for repository-private code.
Package filesystem provides shared filesystem policies for repository-private code.
legacy/cli
Package cmd contains the CLI commands for UDS.
Package cmd contains the CLI commands for UDS.
legacy/cli/monitor
Package monitor contains the CLI commands for UDS monitor.
Package monitor contains the CLI commands for UDS monitor.
legacy/testutil
Package test contains e2e tests for UDS
Package test contains e2e tests for UDS
legacy/zarfexec
Package zarfexec adapts embedded Zarf execution to explicit arguments.
Package zarfexec adapts embedded Zarf execution to explicit arguments.
mode
Package mode resolves the product mode before a Cobra tree is constructed.
Package mode resolves the product mode before a Cobra tree is constructed.
oci
Package oci contains UDS-specific OCI layout and registry orchestration.
Package oci contains UDS-specific OCI layout and registry orchestration.
operator
Package operator contains UDS Core operator monitoring logic for UDS CLI Next.
Package operator contains UDS Core operator monitoring logic for UDS CLI Next.
version
Package version owns build metadata for the future canonical command tree.
Package version owns build metadata for the future canonical command tree.
zarf
Package zarf deploys, removes, verifies, and stages Zarf packages used by UDS bundles.
Package zarf deploys, removes, verifies, and stages Zarf packages used by UDS bundles.
pkg
bundle
Package bundle implements UDS bundle deployment functionality.
Package bundle implements UDS bundle deployment functionality.
bundle/spec
Package spec defines the public semantic model for UDS bundles.
Package spec defines the public semantic model for UDS bundles.
iostreams
Package iostreams provides standard I/O stream abstractions for CLI commands.
Package iostreams provides standard I/O stream abstractions for CLI commands.
legacy/bundle
Package bundle contains functions for interacting with, managing and deploying UDS packages
Package bundle contains functions for interacting with, managing and deploying UDS packages
legacy/bundler
Package bundler defines behavior for bundling packages
Package bundler defines behavior for bundling packages
legacy/bundler/fetcher
Package fetcher contains functionality to fetch local and remote Zarf pkgs for local bundling
Package fetcher contains functionality to fetch local and remote Zarf pkgs for local bundling
legacy/bundler/pusher
Package pusher contains functionality to push Zarf pkgs to remote bundles
Package pusher contains functionality to push Zarf pkgs to remote bundles
legacy/cache
Package cache provides a primitive cache mechanism for bundle layers
Package cache provides a primitive cache mechanism for bundle layers
legacy/config
Package config contains configuration strings for UDS-CLI
Package config contains configuration strings for UDS-CLI
legacy/config/lang
Package lang contains the language strings in english used by UDS
Package lang contains the language strings in english used by UDS
legacy/engine/k8s
Package k8s contains k8s client logic
Package k8s contains k8s client logic
legacy/engine/pepr
Package pepr contains the logic monitoring Pepr operations in a UDS Cluster
Package pepr contains the logic monitoring Pepr operations in a UDS Cluster
legacy/engine/stream
Package stream contains the logic for streaming logs from from UDS Core
Package stream contains the logic for streaming logs from from UDS Core
legacy/interactive
Package interactive contains functions for interacting with the user via STDIN.
Package interactive contains functions for interacting with the user via STDIN.
legacy/message
Package message provides a rich set of functions for displaying messages to the user.
Package message provides a rich set of functions for displaying messages to the user.
legacy/sources
Package sources contains Zarf packager sources
Package sources contains Zarf packager sources
legacy/style
Package style contains the styles for the UDS CLI and UDS Engine streaming output.
Package style contains the styles for the UDS CLI and UDS Engine streaming output.
legacy/types
Package types contains all the types used by UDS.
Package types contains all the types used by UDS.
legacy/utils
Package utils provides utility fns for UDS-CLI
Package utils provides utility fns for UDS-CLI
legacy/utils/boci
Package boci (bundle OCI) provides OCI utility functions for bundles
Package boci (bundle OCI) provides OCI utility functions for bundles
tests
legacy/e2e
Package test contains e2e tests for UDS
Package test contains e2e tests for UDS

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL