akua pkgakua pkg

akua pkg is the Package toolchain inside the akua CLI: it scaffolds, renders, tests, signs and publishes Packages. The same commands ship as the standalone akuapkg executable; akuapkg render and akua pkg render behave identically.

Renders run inside a WebAssembly sandbox with no network, no shell and only the Package directory readable, so untrusted Packages are safe to render.

brew install akua-dev/tap/akua
akua pkg init hello && cd hello
akua pkg render --inputs inputs.example.yaml

Commands

Author and render

CommandDescription
initScaffold a new Package
renderExecute a package.k against inputs and write manifests
checkFast workspace check (parse + lint)
lintParse-only check of a package.k (KCL syntax + imports)
fmtFormat a package.k via KCL’s canonical formatter
exportEmit the Package’s Input schema (JSON Schema / OpenAPI)
inspectReport a Package’s input surface or tarball metadata
testRun KCL tests (test_*.k, *_test.k) and, with --golden, snapshot tests
replInteractive KCL shell (.help lists meta commands)
diffStructural diff between two rendered-output directories

Dependencies

CommandDescription
addAdd a dependency to akua.toml and lock it
removeRemove a dependency from akua.toml
treePrint the workspace’s declared deps and lockfile entries
lockRegenerate akua.lock from akua.toml
updateRefresh akua.lock to what upstream serves now
vendorMaterialize and inspect the vendor tree at .akua/vendor/

Distribute

CommandDescription
packPack the workspace into a local .tar.gz
pullPull a published Package from an OCI registry
pushUpload a pre-packed tarball to an OCI registry
signProduce a cosign signature sidecar for a packed tarball
publishPack, push, sign and attest the workspace’s Package. With akua, omit --ref to publish privately to your Workspace. Private images guide: https://docs.akua.dev/private-images
verifyCheck akua.lock against akua.toml, or a tarball against its signature

Toolchain

CommandDescription
cacheManage the on-disk OCI, git, Helm and url caches
versionPrint the package toolchain version

Universal flags

Every command accepts these flags. Output is JSON by default when a coding agent runs the command; --json and --no-json decide explicitly.

FlagTypeDescription
--jsonbooleanEmit structured JSON to stdout; default for agents, --no-json forces text
--planbooleanCompute the plan; do not write
--timeoutstringWall-clock cap; renders are bounded by fuel instead
--idempotency-keystringRetry-safe key for write operations
--logchoiceStructured log format to stderr (choices: text, json)
--log-levelchoiceLog level (choices: debug, info, warn, error)
--verbose, -vbooleanMore detail in logs (does not change stdout format)
--no-colorbooleanDisable color codes
--no-progressbooleanDisable progress output
--no-interactivebooleanNever prompt
--no-agent-modebooleanIgnore agent-context detection

Exit codes

CodeMeaning
0Success.
1The input was wrong: a flag, a file, a Package, or a check that found a difference.
2The system failed: a file could not be read or written.
3A policy refused the operation.
4A registry or service rate-limited the request.
5The operation needs approval before it can run.
6The command ran out of its time or CPU budget.

Errors

A failing command prints one JSON object on stderr with a stable code, a message, and a docs link to the error reference:

{
  "level": "error",
  "code": "E_MANIFEST_MISSING",
  "message": "akua.toml not found",
  "path": "./akua.toml",
  "docs": "https://docs.akua.dev/akua/errors/E_MANIFEST_MISSING"
}