Publishing
axon module prepare # generate type declarations
axon module deploy # publish to registry
Run both from the module folder. prepare inspects your src/ exports and writes
module.d.ts. deploy packages the source and uploads to the registry. Published
versions are immutable.
Registry identity
Your module is published under your account scope:
axon module deploy # → @you/discord on the registry
The name comes from module.config.ts. The scope comes from your Axon account.
What's included
node_modules/ is never included — it is reconstructed by bun install on the
installing agent. The registry stores source only.
my-module/
├── module.config.ts # ✓ included
├── package.json # ✓ included
├── src/ # ✓ included
├── server/ # ✓ included
├── module.d.ts # ✓ included (generated by prepare)
├── node_modules/ # ✗ excluded
└── .env # ✗ excluded
What happens on install
When someone runs axon install @you/my-module, Axon fetches the source into the agent's modules/ directory, incorporates package.json dependencies, resolves nested module dependencies, merges type declarations into the agent's axon.d.ts, and prints the env keys the module needs.
The agent author installs one thing. Everything composes automatically.
Versioning
The registry uses semver. axon module deploy auto-bumps the patch version on each
deploy. Bump minor or major manually in package.json before deploying when the
change warrants it.
# patch bump (automatic)
axon module deploy
# minor or major — edit package.json first
# "version": "2.0.0"
axon module deploy
Declaring env requirements
Env keys declared in module.config.ts are printed at install time:
discord needs these environment keys:
• DISCORD_BOT_TOKEN — Bot token from the Discord developer portal.
Add these to your agent's .env after install.
The declaration drives the install prompt. The module validates at runtime with
axon.env.require().