CLI

[ AxiomCore · Documentation ]

axiom server

Reference for every axiom server subcommand that scaffolds, validates, runs, packages and verifies a compiled backend contract and its private server plan.

axiom server works with a compiled backend contract and its private server plan: it scaffolds configuration, generates OpenAPI and handler types, runs managed and sandbox actions, drives durable delivery, and packages release bundles. This page covers all 22 subcommands in Axiom CLI 0.149.1.

All axiom server commands run locally without Cloud login. Commands that start a service or worker resolve provider values, such as a database URL or Redis URL, from environment variables named in your deployment files.

From a compiled backend contract to a verified release bundle
From a compiled backend contract to a verified release bundle
Diagram source
flowchart LR
  B[axiom build] --> C[Contract and plan]
  C --> D[server deployment]
  D --> V[server validate]
  V --> R[server run]
  V --> P[server package]
  P --> VB[server verify-bundle]
  VB --> RB[server run-bundle]
  VB --> RC[server rollback-check]

axiom build writes the contract and plan. server deployment scaffolds the private deployment file, which you review. server validate constructs the real providers without opening a listener. From there you either run the service locally with server run, or package an immutable bundle, verify it, and run it with server run-bundle. server rollback-check compares two verified bundles before you switch back to an older one.

axiom server

Usage
axiom server <COMMAND>
SubcommandPurpose
planScaffold a native plan from a compiled contract.
deploymentScaffold the private provider and grant file.
delivery-deploymentScaffold the private durable delivery file.
openapiGenerate an OpenAPI 3.1 document.
typesGenerate Python or Go handler types.
targetsList target profiles and whether each is available.
inspectShow action guards, effects and target compatibility.
diffCompare private behavior between two plans.
validateConstruct providers and check cleanup without a listener.
runServe managed and sandbox actions over HTTP.
devBuild source and reload it on change.
invokeCall one action directly through its guards.
boundaryRun the JSON-lines bridge used by native adapters.
workerExecute durable jobs, consumers, schedules and webhooks.
enqueueSubmit a job or publish an event.
delivery-inspectInspect delivery state and dead letters.
delivery-cancelCancel pending work or signal a leased attempt.
delivery-redriveRedrive a dead letter.
packageCreate an immutable release directory.
verify-bundleVerify a release directory offline.
run-bundleRun a verified release with its packaged executable.
rollback-checkCheck that an older release can replace the current one.

Shared inputs

InputWhat it isWhere it comes from
<CONTRACT>Compiled backend .axiom contract.axiom build writes .axiom/contracts/backend.axiom by default.
<PLAN>Private server plan (axiom-server-plan/v2 JSON) bound to that contract.axiom build writes backend.server.json beside the contract when the source declares managed or sandbox actions. For an extracted or adapter-served contract, axiom server plan scaffolds one.
--deploymentPrivate axiom-server-deployment/v1 file: plan hash, capabilities, provider bindings, operation grants, coordination and authentication.axiom server deployment, then your review.
--bindingsaxiom-action-bindings/v1 file for sandbox plans. Each sandbox extension maps to environment variable names for its package, authority and module files, plus the exact authority digest. It must cover exactly the plan's extensions.Written by you for plans with sandbox actions.
--deliveryPrivate axiom-delivery-deployment/v1 file for durable jobs, events and webhooks.axiom server delivery-deployment, then your review.

Keep the plan, deployment, bindings and delivery files private. They never enter the public .axiom artifact. Scaffold commands refuse to overwrite an existing file: choose a new output path so a reviewed file is never replaced.

Native actions need a registered trusted Rust application host. The generic runtime behind axiom serve and axiom server run cannot resolve arbitrary native symbols. Python and Go services use their server adapter, which talks to axiom server boundary.

Scaffold and generate

axiom server plan

Scaffold a native action plan from a compiled contract when your handlers live in your own application (for example an extracted FastAPI or Go service). Review the generated status and body mappings before use.

Usage
axiom server plan --output <OUTPUT> <CONTRACT>
OptionValueDefaultMeaning
<CONTRACT>pathrequiredCompiled backend .axiom contract.
-o, --outputpathrequiredNew plan file to create.
Terminal
axiom server plan backend.axiom --output backend.server.json

axiom server deployment

Scaffold the private deployment file for a contract and plan. Resources, grants and providers start in a reviewable state: operation grants are empty, and a typed resource without a known provider is marked reviewRequired.

Usage
axiom server deployment --output <OUTPUT> <CONTRACT> <PLAN>
OptionValueDefaultMeaning
<CONTRACT>pathrequiredCompiled backend .axiom contract.
<PLAN>pathrequiredPrivate server plan for that contract.
-o, --outputpathrequiredNew deployment file to create.

The scaffold refers to values by environment variable name. You set these when you run the service:

VariableUsed for
AXIOM_REDIS_URLShared coordination when the plan needs distributed rate limits or durable idempotency.
AXIOM_JWT_PUBLIC_KEYRS256 JWT verification key. Issuer and audience come from the contract's security profile, or placeholders you must replace.
AXIOM_<RESOURCE>_<FIELD>Required typed configuration fields of a resource.
AXIOM_HTTP_<NAME>_<KEY>HTTP client resources: ORIGIN, CREDENTIAL, ALLOWLOOPBACK, IDEMPOTENCYSUPPORTED.
AXIOM_RESOURCE_<NAME>_FILEFile, upload root or database binding path for other resources.
Terminal
axiom server deployment backend.axiom backend.server.json --output deployment.json

axiom server delivery-deployment

Scaffold the private durable delivery file for a plan that declares jobs, events or webhooks. Operation grants start empty; add only the grants you want before starting a worker.

Usage
axiom server delivery-deployment --output <OUTPUT> <CONTRACT> <PLAN>
OptionValueDefaultMeaning
<CONTRACT>pathrequiredCompiled backend .axiom contract.
<PLAN>pathrequiredPrivate server plan with delivery declarations.
-o, --outputpathrequiredNew delivery file to create.

The scaffold uses namespace delivery, a 30-second lease, 24-hour receipt retention, and these environment variable names: AXIOM_DELIVERY_REDIS_URL, AXIOM_DELIVERY_JOB_<NAME>_TOKEN and AXIOM_DELIVERY_CONSUMER_<NAME>_TOKEN for worker credentials, and AXIOM_WEBHOOK_<NAME>_URL and AXIOM_WEBHOOK_<NAME>_KEY for webhook destinations and signing keys. See Events, jobs and webhooks for grants and Redis requirements.

axiom server openapi

Generate an OpenAPI 3.1 document from the effective contract and its server mappings, for API gateways or third-party clients.

Usage
axiom server openapi --output <OUTPUT> <CONTRACT> <PLAN>
OptionValueDefaultMeaning
<CONTRACT>pathrequiredCompiled backend .axiom contract.
<PLAN>pathrequiredPrivate server plan for that contract.
-o, --outputpathrequiredNew OpenAPI JSON file to create.
Terminal
axiom server openapi backend.axiom backend.server.json --output openapi.json

axiom server types

Generate typed handler inputs, outputs and handler signatures for a Python or Go service that implements the contract's actions.

Usage
axiom server types --language <LANGUAGE> --output <OUTPUT> <CONTRACT> <PLAN>
OptionValueDefaultMeaning
<CONTRACT>pathrequiredCompiled backend .axiom contract.
<PLAN>pathrequiredPrivate server plan for that contract.
--languagepython, gorequiredOutput language.
-o, --outputpathrequiredNew source file to create.
Terminal
axiom server types backend.axiom backend.server.json --language python --output handler_types.py
axiom server types backend.axiom backend.server.json --language go --output handler_types.go

Inspect and compare

axiom server targets

List every deployment target profile with its runtime, platform, capabilities, providers, limits and evidence. Unavailable or uncertified profiles fail closed: they cannot validate or package.

Usage
axiom server targets

No options other than --help.

TargetAvailableScope
native-serverYes, on macOS aarch64 and Linux aarch64/x86_64Managed and verified sandbox HTTP actions. Database persistence and the PostgreSQL provider are included only on macOS aarch64.
container-amd64, container-arm64YesSource-built Linux managed and sandbox HTTP images. Packaging needs --runtime-source.
cloudflare-workers-localYesPortable managed JSON API with HS256 JWT and bounded HTTP providers, checked with local workerd. Packaging needs --runtime-source.
containerNoSelect an architecture-specific container target.
serverlessNoLambda runtime and hosted checks are pending.
cloudflare-workersNoHosted Cloudflare acceptance is pending.
edgeNoNo generic edge certification.

See Deployment targets for each profile's limits.

axiom server inspect

Validate the exact contract identity and show each action's guards, effects and transitive requirements, plus a target compatibility assessment. Without --deployment, provider review stays pending and the result cannot establish release compatibility.

Usage
axiom server inspect [OPTIONS] <CONTRACT> <PLAN>
OptionValueDefaultMeaning
<CONTRACT>pathrequiredCompiled backend .axiom contract.
<PLAN>pathrequiredPrivate server plan for that contract.
--deploymentpathnoneDeployment file to assess providers and grants.
--bindingspathnoneSandbox bindings file.
--targettarget IDnative-serverTarget profile to assess against.

The same assessment, with optional redacted startup observations, is available from axiom inspect server.

axiom server diff

Compare the private behavior of two contract and plan pairs, such as guards, effects and provider requirements. The public contract diff is unchanged; use axiom diff for public changes.

Usage
axiom server diff <BEFORE_CONTRACT> <BEFORE_PLAN> <AFTER_CONTRACT> <AFTER_PLAN>
OptionValueDefaultMeaning
<BEFORE_CONTRACT>pathrequiredEarlier compiled contract.
<BEFORE_PLAN>pathrequiredEarlier private plan.
<AFTER_CONTRACT>pathrequiredLater compiled contract.
<AFTER_PLAN>pathrequiredLater private plan.

Validate and run locally

axiom server validate

Check that a deployment works before you start a listener: it assesses target compatibility, constructs the actual providers and authentication, verifies sandbox assets and confirms cleanup. Missing credentials fail validation.

Usage
axiom server validate [OPTIONS] --deployment <DEPLOYMENT> <CONTRACT> <PLAN>
OptionValueDefaultMeaning
<CONTRACT>pathrequiredCompiled backend .axiom contract.
<PLAN>pathrequiredPrivate server plan for that contract.
--deploymentpathrequiredReviewed deployment file.
--bindingspathnoneSandbox bindings file.
--deliverypathnoneDelivery file. Only valid with --target native-server.
--targettarget IDnative-serverTarget profile. cloudflare-workers-local runs an artifact preflight only.
Terminal
axiom server validate backend.axiom backend.server.json --deployment deployment.json

On success it prints one JSON object with "validated":true, the targetAssessment, "listenerOpened":false and the cleanup result.

axiom server run

Serve the plan's managed and sandbox actions as an HTTP service. It never starts mocks. Use it to run a compiled contract and plan exactly as deployed; for source-first development use axiom serve or axiom server dev.

Usage
axiom server run [OPTIONS] --deployment <DEPLOYMENT> <CONTRACT> <PLAN>
OptionValueDefaultMeaning
<CONTRACT>pathrequiredCompiled backend .axiom contract.
<PLAN>pathrequiredPrivate server plan for that contract.
--deploymentpathrequiredReviewed deployment file.
--bindingspathnoneSandbox bindings file.
--deliverypathnoneReviewed durable controller for producer actions. Request input cannot select its grants.
--observationspathnoneAfter shutdown, write bounded, payload-free native observations to this new file (owner-only, at most 25 MiB). The file must not exist.
--listenaddress127.0.0.1:8080Listener address.
Terminal
axiom server run backend.axiom backend.server.json --deployment deployment.json --listen 127.0.0.1:8080

axiom server dev

Build .acore source, serve it, and reload when project files change, within the providers and grants of a reviewed deployment.

Usage
axiom server dev [OPTIONS] --deployment <DEPLOYMENT> <SOURCE>
OptionValueDefaultMeaning
<SOURCE>pathrequiredBackend .acore entry source. Its directory is the project root.
--deploymentpathrequiredReviewed deployment file.
--bindingspathnoneSandbox bindings file.
--deliverypathnoneDelivery file.
--listenaddress127.0.0.1:8080Must be a loopback address with a fixed, non-zero port.
--poll-ms50 to 2000250Change polling interval in milliseconds.

The watcher snapshots up to 1,024 source, manifest and lock files. It skips hidden directories, symlinks, secret files and target, node_modules, build, dist, venv and __pycache__. A rejected reload keeps the running service. If a new snapshot fails to start, the last validated snapshot restarts.

Terminal
axiom server dev service.acore --deployment deployment.json --listen 127.0.0.1:8080

axiom server invoke

Call one authored action directly, without HTTP, through its mandatory guards. Use it to test an action's guards and output from a script.

Usage
axiom server invoke [OPTIONS] --deployment <DEPLOYMENT> --request <REQUEST> <CONTRACT> <PLAN>
OptionValueDefaultMeaning
<CONTRACT>pathrequiredCompiled backend .axiom contract.
<PLAN>pathrequiredPrivate server plan for that contract.
--deploymentpathrequiredReviewed deployment file.
--bindingspathnoneSandbox bindings file.
--deliverypathnoneReviewed durable controller. Request input cannot select its grants.
--requestpathrequiredJSON invocation request (action, origin, identity, input, optional headers), at most 1,114,112 bytes.

The result prints as JSON.

axiom server boundary

Run the private JSON-lines enforcement bridge that a native framework adapter (for example the Python or Go server adapter) starts over stdin and stdout. It opens no network listener. You normally do not run it by hand.

Usage
axiom server boundary [OPTIONS] <CONTRACT> <PLAN>
OptionValueDefaultMeaning
<CONTRACT>pathrequiredCompiled backend .axiom contract.
<PLAN>pathrequiredNative server plan for that contract.
--deploymentpathnoneDeployment file whose providers the bridge enforces.

Durable delivery

These commands need a plan with delivery declarations, a reviewed delivery file and a reachable Redis server named by AXIOM_DELIVERY_REDIS_URL (or the name in your delivery file). Execution is at least once. See Events, jobs and webhooks for grants, retries and Redis configuration.

axiom server worker

Execute durable jobs, event consumers, schedules and signed webhook attempts. SIGTERM or Ctrl+C stops new attempts and drains current work.

Usage
axiom server worker [OPTIONS] --deployment <DEPLOYMENT> --delivery <DELIVERY> <CONTRACT> <PLAN>
OptionValueDefaultMeaning
<CONTRACT>pathrequiredCompiled backend .axiom contract.
<PLAN>pathrequiredPrivate server plan for that contract.
--deploymentpathrequiredReviewed deployment file.
--deliverypathrequiredReviewed delivery file.
--bindingspathnoneSandbox bindings file.
--onceflagoffTick schedules, process one attempt, print it and exit.
--poll-ms10 to 60000100Idle polling interval in milliseconds.
Terminal
axiom server worker backend.axiom backend.server.json --deployment deployment.json --delivery delivery.json

axiom server enqueue

Submit a typed job, or publish to an event binding, using an explicitly granted operation.

Usage
axiom server enqueue --delivery <DELIVERY> --request <REQUEST> <CONTRACT> <PLAN>
OptionValueDefaultMeaning
<CONTRACT>pathrequiredCompiled backend .axiom contract.
<PLAN>pathrequiredPrivate server plan for that contract.
--deliverypathrequiredReviewed delivery file.
--requestpathrequiredJSON submission (kind, name, producer ID, payload, optional delay and trace parent), at most 70,000 bytes.

The receipt prints as JSON. Repeating the same identity and payload during retention returns the same receipt.

axiom server delivery-inspect

Inspect redacted provider state, attempts, failures and recovery history. The output never includes payloads or credentials.

Usage
axiom server delivery-inspect [OPTIONS] --delivery <DELIVERY> <CONTRACT> <PLAN>
OptionValueDefaultMeaning
<CONTRACT>pathrequiredCompiled backend .axiom contract.
<PLAN>pathrequiredPrivate server plan for that contract.
--deliverypathrequiredReviewed delivery file.
--idtask IDnoneShow one task instead of a list.
--deadflagoffList dead letters instead of active work.
--limitcount32Maximum entries in a list.

axiom server delivery-cancel

Cancel pending work, or signal the attempt that currently holds the lease. The delivery file must grant cancellation for that binding.

Usage
axiom server delivery-cancel --delivery <DELIVERY> --id <ID> <CONTRACT> <PLAN>
OptionValueDefaultMeaning
<CONTRACT>pathrequiredCompiled backend .axiom contract.
<PLAN>pathrequiredPrivate server plan for that contract.
--deliverypathrequiredReviewed delivery file.
--idtask IDrequiredTask to cancel.

axiom server delivery-redrive

Move one dead letter back into delivery. It needs a recovery grant, and external effects of earlier attempts can repeat.

Usage
axiom server delivery-redrive --delivery <DELIVERY> --id <ID> <CONTRACT> <PLAN>
OptionValueDefaultMeaning
<CONTRACT>pathrequiredCompiled backend .axiom contract.
<PLAN>pathrequiredPrivate server plan for that contract.
--deliverypathrequiredReviewed delivery file.
--idtask IDrequiredDead letter to redrive.

Package and release bundles

Bundles are local artifacts. Provisioning, publication and hosting stay external. Legacy axiom-server-release/v1 bundles have no bound target or runtime contract: repackage the original artifacts with the current CLI before verification, activation or rollback. See Release a backend.

axiom server package

Create an immutable, hash-bound release directory for one target after an artifact-only preflight. Production credentials are not resolved.

Usage
axiom server package [OPTIONS] --deployment <DEPLOYMENT> --output <OUTPUT> <CONTRACT> <PLAN>
OptionValueDefaultMeaning
<CONTRACT>pathrequiredCompiled backend .axiom contract.
<PLAN>pathrequiredPrivate server plan for that contract.
--deploymentpathrequiredReviewed deployment file.
--bindingspathnoneSandbox bindings file. The environment variables it names must point to the package, authority and module files to seal.
--targettarget IDnative-serverTarget profile.
--runtime-sourcedirectorynoneReviewed workspace source root used to build a container or Worker runtime. Required for container-amd64, container-arm64 and cloudflare-workers-local; rejected for other targets.
--environmentprofile namenoneContainer targets only: seal this AxiomSecrets.toml profile into the release as a value-free record, so the container resolves its Cloud sources through the workload identity at run time. Rejected for other targets with AXSECRET_UNSUPPORTED_TARGET. Needs a released CLI with this option, which is Coming soon.
--secret-rootdirectorythe contract's directoryDirectory that holds AxiomSecrets.toml. Requires --environment.
-o, --outputdirectoryrequiredNew release directory. An existing path is rejected because releases are immutable.

A sealed container profile may contain only axiom-cloud-database and axiom-cloud secret sources with identity = "google-metadata", and only env configuration sources; other profiles fail with AXSECRET_CONTAINER_SOURCE. See connect a server on Google Cloud.

What each target produces:

TargetOutput
native-serverA deterministic axiom-server-release/v2 bundle: the running axiom executable as bin/axiom, the canonical contract, plan, deployment, optional bindings and sealed sandbox assets. Package on the platform you will run on; the CLI never copies a host executable across platforms.
container-amd64, container-arm64A reviewed Linux build context that builds the runtime from source.
cloudflare-workers-localA Worker bundle for the pinned portable managed runtime.
Terminal
axiom server package backend.axiom backend.server.json --deployment deployment.json --target native-server --output release-v1

axiom server verify-bundle

Verify a release directory offline: exact file inventory, platform, bound contract and plan, target and runtime, capability requirements and sealed sandbox assets. It also verifies local Worker bundles.

Usage
axiom server verify-bundle <DIRECTORY>
OptionValueDefaultMeaning
<DIRECTORY>directoryrequiredRelease directory to verify.

The JSON result reports "verified":true, the platform, plan and target hashes and the file count. Configuration is validated again at startup.

Terminal
axiom server verify-bundle release-v1

axiom server run-bundle

Run a verified native release using its exact packaged executable and a fresh configuration preflight. Start it with the bundled binary, on the matching platform.

Usage
axiom server run-bundle [OPTIONS] <DIRECTORY>
OptionValueDefaultMeaning
<DIRECTORY>directoryrequiredVerified release directory.
--listenaddress127.0.0.1:8080Listener address.
Terminal
release-v1/bin/axiom server run-bundle release-v1 --listen 127.0.0.1:8080

axiom server rollback-check

Compare two immutable releases before you switch from the current one back to a previous one. Both must verify, share the same target, runtime and platform, and keep a compatible public contract. Private behavior changes are reported for review. Nothing rolls back automatically.

Usage
axiom server rollback-check <CURRENT> <PREVIOUS>
OptionValueDefaultMeaning
<CURRENT>directoryrequiredRelease that is running now.
<PREVIOUS>directoryrequiredRelease you want to return to.
Terminal
axiom server rollback-check release-v2 release-v1

Run a configuration preflight before activating the previous release.