The canonical shape of an akua Package is a KCL program with three regions: imports, anDocumentation Index
Fetch the complete documentation index at: https://docs.akua.dev/llms.txt
Use this file to discover all available pages before exploring further.
Input schema, and a body that calls source engines (Helm, kustomize, RGD) and aggregates resources. This page is an Akua-focused excerpt of the akua package format spec. The full spec covers engine calls, lockfile, and metadata; this page focuses on what an Akua product author touches most: the Input schema and @ui annotations.
Anatomy
Every Package is one KCL program with three typed regions:akua render writes every entry of resources as a YAML file under --out. Akua runs that render per-installation and commits the output to the installation repository.
The Input schema
The Input schema is the public contract: it declares what customers can configure. This schema is what Akua exports to JSON Schema for the install wizard.
Rules:
- The schema must be named
Input. The binding line is canonicallyinput: Input = ctx.input(). - Fields use KCL native types:
str,int,float,bool,[T],{str: T}, unions ("a" | "b" | "c"), nested schemas. - Fields without defaults are required; fields with defaults are optional.
- Use KCL docstrings (
"""...""") on each field; they become the JSON Schemadescriptionand surface in autocomplete and the install wizard. check:blocks express cross-field constraints; they run during render.- No runtime side effects (no env, no filesystem, no network). KCL’s sandbox enforces this.
@ui annotations
KCL docstrings carry the description field, but the install wizard needs more: field ordering, grouping into sections, widget hints, validation bounds. akua provides the @ui(...) decorator for this.
@ui(...) is an authoring hint that’s stripped before the source reaches KCL’s resolver and projected onto the JSON Schema property as the OpenAPI-3.1-compliant x-ui extension. Akua’s install wizard recognizes x-ui and renders accordingly; renderers that don’t, ignore it.
Recognized keys
The keyword arguments to@ui(...) are arbitrary; anything you pass becomes x-ui metadata. Akua’s wizard currently recognizes:
| Key | Effect |
|---|---|
order | Numeric position within the form (lower = earlier) |
group | Section header the field appears under (e.g. "Identity", "Capacity") |
widget | Field renderer hint: "slider", "password", "textarea", "select" |
placeholder | Placeholder text shown in empty inputs |
min / max | Numeric bounds (used by widget="slider" and form validation) |
@ui(foo=bar) annotations for your own renderers without breaking Akua.
How @ui reaches the wizard
Composition body
The body composes resources by calling engine functions:Exporting vs rendering
| Verb | Purpose | Needs inputs? | Output |
|---|---|---|---|
akua export | Convert the Package’s Input schema to a standard interchange format | No | JSON Schema 2020-12 or OpenAPI 3.1 |
akua render | Execute the Package’s full pipeline against customer inputs | Yes | Rendered YAML manifests |
Related topics
Install links
How
@ui drives the install wizard.Concepts
How Packages, Products, and Installations relate.
Customize an installation via git
Edit
inputs.yaml and package.k directly.Akua package format spec
Full spec: engines, lockfile, signing.