build
Assemble an unsigned, reproducible .pkg artifact.
npx @elizon/cli build [directory] [--dir=<directory>] [--out=<file>.pkg] [--json]Turns a Package project into a single .pkg file. Offline, with no account and no connected device.
What it does
Checks the toolchain. The running CLI version must equal cliVersion in .elizon/config.yaml.
Runs validate. Any error stops the build; warnings don't. An invalid Package never becomes an
artifact.
Serialises every object (Agents, Teams, Workflows, Tools, Skills, Knowledge Bases, voice and SIP) into its portable form, and refuses anything that would carry an Organization-specific identifier or personal data out of your hands.
Writes the archive and a digest manifest (a SHA-256 hash of every file in it), then reads the result back to check it before reporting success.
✓ /home/you/support-bot/my-org-support-bot-0.1.0.pkg
my-org.support-bot 0.1.0 — 2 objects, 2740 bytes
entry point: agents.support-assistant
digests.json: sha256:41ec06ffbf…
knowledgeBases.product-docs knowledgeBases/product-docs.json
agents.support-assistant agents/support-assistant.json
unsigned — this artifact cannot be installed until it is signed.
Run `npx @elizon/cli sign my-org-support-bot-0.1.0.pkg --target=<name> --yes` to sign it with your Organization’s key.Options
| Option | Effect |
|---|---|
[directory] / --dir | The project to build (pass one or the other). Default: the current directory. |
--out=<file>.pkg | Where to write the artifact. Default: <namespace>-<name>-<version>.pkg beside elizon.yaml. |
--json | One JSON document; data.signed is always false. |
Unsigned, by design
build never signs, and has no code that could. Signing needs your Organization's key, which never
leaves your Organization, so it's a separate step: sign.
That keeps build fully offline. A freshly built artifact reports as PKG_UNSIGNED, meaning
unsigned, not broken.
Reproducible
Two builds of the same sources with the same CLI version produce byte-identical files: entries are written in a fixed order, definitions are serialised with sorted keys, and no timestamp is recorded. That matters because the digest manifest is what gets signed, possibly on another machine or in CI.
Toolchain errors
| Code | Meaning | Fix |
|---|---|---|
CLI_TOOLCHAIN_UNPINNED | .elizon/config.yaml is missing or has no cliVersion. | Run init in the project, or add cliVersion: <version> to it. |
CLI_TOOLCHAIN_MISMATCH | The running CLI isn't the pinned version. | Run the pinned version: npx @elizon/cli@<cliVersion> build. |
Moving to a newer CLI version
Moving a project to a new CLI is a deliberate change, made in one place:
- Set
cliVersionin.elizon/config.yamlto the new version. - Refresh the coding-agent files so they run the new version:
npx @elizon/cli@<new-version> init --update. - Run
npx @elizon/cli@<new-version> validate. A newer CLI may know fields or rules the old one didn't. - Consider raising
compatibility.minPlatformVersionif you now rely on something newer.