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/:
| File | What it is |
|---|---|
source.tar.gz | The agent source — config, src/, modules, the compiled cognet |
assets.tar.gz | README images, compressed. Absent when the agent ships none |
image.json | Identity: name, version, visibility, build time |
Dockerfile | For --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
| Flag | Default | Description |
|---|---|---|
--image | false | Also build a container image |
--json | false | Print one line of JSON to stdout and nothing else |
Errors
| Error | Meaning |
|---|---|
BUNDLE_IMAGE_FAILED | docker build did not succeed; its output is above |
CONFIG_IMPORT_ESCAPES_ROOT | axon.config.ts imports a file outside the project, which would not ship |
For one-command cloud deployment, use axon deploy instead.