akua / cli / add

akua add

Insert a dependency into akua.toml. Pure manifest edit — the resolver best-effortly updates akua.lock immediately after.

akua add <name> (--oci=<url> | --git=<url> | --path=<path> | --repo=<url> --chart=<chart>) [flags]

Exactly one source flag is required. --repo requires --chart.

Dependency sources

sourceflagsuse when
OCI--oci=<url>published signed artifact (most common)
Git--git=<url>non-OCI-distributed sources
Path--path=<path>workspace-local, dev-only
Helm repo--repo=<url> --chart=<chart>classic HTTPS Helm repository

Examples

# OCI dep
akua add cnpg --oci oci://ghcr.io/cloudnative-pg/charts/cluster --version 0.20.0

# Git dep pinned to a tag
akua add tooling --git https://github.com/acme/tools --tag v1.2.3

# Local path dep
akua add shared --path ../shared

# HTTPS Helm-repo dep
akua add temporal --repo https://go.temporal.io/helm-charts --chart temporal --version 0.62.0

# Replace an existing entry
akua add cnpg --oci oci://ghcr.io/cloudnative-pg/charts/cluster --version 0.21.0 --force

Flags

flagdescription
--oci=<url>OCI source URL (oci://…)
--git=<url>Git source URL
--path=<path>local filesystem path
--repo=<url>HTTPS Helm-repo URL (pairs with --chart)
--chart=<name>chart name within the Helm repo (required with --repo)
--version=<version>version constraint; required for OCI and Helm-repo deps
--tag=<tag>git tag (alternative to --rev)
--rev=<sha>git commit SHA (alternative to --tag)
--forcereplace an existing entry under name
--workspace=<path>workspace root containing akua.toml (default: .)

Exit codes

0 success, 1 user error, 2 system error.

JSON output

{
  "name": "temporal",
  "source": "helm",
  "source_ref": "https://go.temporal.io/helm-charts",
  "version": "0.62.0",
  "replaced": false
}