Skip to content
Axiom/SDK
SDK / Signing and publishing

Signing and publishing

A mod or a pack reaches a player through the registry, signed by its publisher, and runs only while that signature holds. This page is the whole path: keys, logging in, building, publishing, hiding and yanking, and what an install and every load check.

Once: log in and make a key

Terminal
$ axiom login
$ axiom key new main
$ axiom sign --key main
  • axiom login opens the website's approval page in your browser. Sign in with GitHub and click Approve; nothing is copied or typed. The CLI keeps the login in the operating system's credential store, the Keychain on macOS and the Credential Manager on Windows. On a machine with no browser, axiom login --paste reads a token from the account page instead; such a token can publish but not register keys. Linux has no credential store yet, so there set AXIOM_TOKEN in the environment.
  • axiom key new main makes an Ed25519 key, keys/main.key, readable by you alone and never overwritten. There is no way to export its private half, because nothing needs it: the registry verifies, it never signs. axiom key export --public prints the public half.
  • axiom sign --key main, with no package, registers that key with your account for your GitHub namespace, io.github.<login>, or another you hold with --namespace. Keys are registered only this way; the website lists and revokes them.

Namespaces

A package's id starts with a namespace its publisher holds. Every account holds io.github.<login> from the start. A domain you own can be claimed on the website's account page by DNS, which gives you its reversed name, such as com.example. First-party work is published under com.axiommods: mods under com.axiommods.mods.<name> and packs under com.axiommods.packs.<name>.

Each release

Terminal
$ axiom check
$ axiom build
$ axiom publish io.github.yourname.hello-0.1.0.axpkg --key main
  • axiom check reads the manifest and reports every fault at once. With --surface, it also checks every capability name against the surface.
  • axiom build packages the directory as <id>-<version>.axpkg. Every file goes in except dot files and packages already built. A file the format cannot hold, a link, or anything that is not an ordinary file is a refusal rather than left out, because a mod missing an asset nobody noticed breaks after it is published. A pack's directory builds the same way, by its pack.toml.
  • axiom publish signs the package and uploads it. Every reason the registry gives for a refusal is printed as a [FAIL] line. Use axiom pack publish for a pack.

The version in the manifest is the version published, and a version is published once. A version is strict semantic versioning, 1.2.0: 1.2, v1.2.0 and 01.2.0 are refused.

Hidden packages

axiom publish --hidden publishes a new package hidden. It stays out of every list and search, and installs and verifies like any other by its exact id. It is for a package not meant to be browsed, such as a test mod. Only the first publish sets it; after that, the website's account page hides or lists the package.

Yanking

Terminal
$ axiom yank io.github.yourname.hello 0.1.0 --reason "Crashes on load"
$ axiom yank io.github.yourname.hello 0.1.0 --undo

A yanked version is not offered for new installs or picked by a range, and stays downloadable, because an install pinned to it still has to verify. A reason is at most 500 characters.

What install checks

axiom install <id> works out the whole graph first, downloads nothing, and asks:

  • Versions. The mod and every dependency, each at the newest version the registry still offers (not yanked or removed, not signed by a revoked key) that every range allows. A prerelease is chosen only when a range names one.
  • Signers. Every package's key must be one the registry says signs for its namespace and that nobody revoked. A key this machine has never trusted is shown with its full fingerprint, and approving the install trusts it.
  • Refusals. Two ranges that cannot both hold, a package for another game, a cycle, a pack named as a dependency, and a graph past 64 packages are each refused with a reason.

Then, for each package, it checks the download's size and SHA-256 against the registry, its signature against the key, and that its manifest declares the same tier, capabilities, dependencies and game the registry did. Only when every package passes does anything change on disk. For a script, --yes approves the graph and --trust <fingerprint> names a key to trust; --yes alone never trusts a key.

A mod runs only signed

What install verified is checked again every time a mod loads. The binary is read out of the kept package, never from a loose file, after checking the package is the one its seal names, the signature verifies and the key is trusted and not revoked. A mod copied into the data directory by hand does not run, whatever is beside it. axiom verify <id> makes the same checks and says what it found, and axiom doctor runs them over everything installed.

So the dev loop for a mod is publish, install, run, even in the Sandbox. Publish hidden while you work, and bump the patch version for each build you want to try.

Versions and ranges

Dependencies name a range after the id, the same way capabilities name a major:

Range
Means
2.1.0 or =2.1.0
Exactly that version.
^2.1.0
Up to the next release that may break you: below 3.0.0. Below 1.0.0 it stops at the next minor, so ^0.2.0 is below 0.3.0.
>=, >, <=, <
An explicit bound. Terms separated by spaces must all hold.
*
Any version. The only term that stands alone.

There is no "or". A prerelease such as 2.0.0-beta satisfies only a range that names a prerelease. A range that cannot be read blocks the mod rather than meaning "any".

Not built yet

  • Installing a local .axpkg. It has no registry signature to check it against, so installs come from the registry.
  • axiom new, axiom watch, and compiling a mod from axiom build with --release or --target.
  • Release channels, publish --tag.