axon bundle

Package the agent into its publishable artifact.

axon bundle             # the artifact
axon bundle --image     # and a self-contained container

The artifact alone by default: no Docker, about a second. It is what deploy and publish produce internally, exposed for shipping it somewhere else.

Output

Written to .agent/build/:

FileWhat it is
source.tar.gzThe agent source — config, src/, modules, the compiled cognet
assets.tar.gzREADME images, compressed. Absent when the agent ships none
image.jsonIdentity: name, version, visibility, build time
DockerfileFor --image, and for building one yourself

.env is excluded — secrets are injected at runtime by the host.

Self-hosting needs no image

The base image reads the agent from /agent and never bakes it in, so the ordinary way to run one yourself is a mount:

docker run -v $PWD:/agent -p 8080:8080 axon/base:0.3.6

No build step, and an agent edit is a restart rather than a rebuild. This is the same image Axon Cloud runs, so behaviour matches a managed deployment.

--image

Builds a self-contained container with the source baked in, tagged <scope>-<name>:<version>:

axon bundle --image
# → cody-barry.mk3:0.1.20

For the cases a mount cannot serve — an air-gapped registry, a deployment that must ship one artifact. It requires a running Docker daemon and takes tens of seconds, which is why it is off by default.

The emitted Dockerfile pins the base image to the version this CLI was built against. Never latest: a rebuild months later would otherwise get a different runtime under an agent that was working.

Options

FlagDefaultDescription
--imagefalseAlso build a container image
--jsonfalsePrint one line of JSON to stdout and nothing else

Errors

ErrorMeaning
BUNDLE_IMAGE_FAILEDdocker build did not succeed; its output is above
CONFIG_IMPORT_ESCAPES_ROOTaxon.config.ts imports a file outside the project, which would not ship

For one-command cloud deployment, use axon deploy instead.