CLI

[ AxiomCore · Documentation ]

Contract, package and security commands

Reference for the axiom contract, packages, dependencies, domain and security commands that lock frontend inputs and analyze contract layers.

These commands manage what a frontend depends on (contract locks, typed frontend packages, and third-party packages for authored extensions) and analyze a backend contract's optional domain and security layers. This page covers Axiom CLI 0.149.1. None of them needs a Cloud login; only dependencies resolve and dependencies cache recover contact package registries over the network.

GroupUse it toStatus
axiom contractLock and verify the backend contracts a frontend imports.Alpha
axiom packagesBuild, lock, verify and review typed frontend .axiom packages.Alpha
axiom dependenciesResolve and audit third-party packages used by authored extensions.Experimental
axiom domainValidate the Domain Model v1 layer, or bootstrap it from OpenAPI or SQL.Alpha (validate), Experimental (bootstrap)
axiom securityAnalyze the opt-in Security Model v1 layer without building.Alpha, as part of the Acore contract toolchain

Axiom Marketplace is Coming soon. The packages commands do not discover or install packages from a catalog; they consume explicit package files and locks.

How frontend dependency manifests become reviewed locks
How frontend dependency manifests become reviewed locks
Diagram source
flowchart LR
  Deps[AxiomDeps.toml] --> CResolve[contract resolve]
  CResolve --> ULock[UI contract lock]
  ULock --> CVerify[contract verify]
  ULock --> CCheck[contract check-source]
  ULock --> CDiff[contract diff in review]
  Deps --> PResolve[packages resolve]
  PResolve --> PLock[package lock]
  PLock --> PVerify[packages verify]
  PLock --> PCheck[packages check-source]

AxiomDeps.toml declares the contracts and packages a frontend uses. contract resolve and packages resolve turn it into deterministic locks under .axiom/. In CI, verify re-resolves the manifest and fails if the committed lock differs, check-source validates imports against the lock alone, and the diff commands show semantic changes for review.

axiom contract

Resolves and verifies the signed backend contract artifacts that a frontend imports with use contract, and records them in a deterministic UI contract lock. Normal development through axiom run FRONTEND.acore discovers the manifest and maintains an internal development lock under .axiom/dev automatically. Use these commands to manage a reviewed lock for CI and release workflows.

Usage
axiom contract <COMMAND>

No options other than --help.

CommandPurpose
contract resolveResolve manifest entries, show changes and write the lock.
contract verifyRe-resolve and verify locked bytes and proof without changing files.
contract diffShow semantic changes between two locks.
contract facadePrint read-only virtual-facade metadata for a locked alias.
contract check-sourceValidate use contract declarations against the committed lock.

A frontend manifest names each contract alias, its artifact and the operations it uses. This is the task-app example:

frontend/AxiomDeps.toml
type = "frontend"
targets = ["web"]

[contracts.tasks]
artifact = "../backend/.axiom/contracts/backend.axiom"
baseUrl = "http://127.0.0.1:8080"
audience = "web"
operations = ["create_task", "delete_task", "list_tasks", "update_task"]

An entry that points at an unsigned local artifact produces a warning: it is allowed for development, and you release the contract through Axiom Cloud before production use.

axiom contract resolve

Resolves the contract entries in AxiomDeps.toml into a deterministic lock. When the lock already exists and changes, it prints the semantic diff as JSON before writing. It reads only the local artifacts the manifest names. With the default --lock, the lock path is relative to the manifest's directory.

Usage
axiom contract resolve [OPTIONS]
OptionValueDefaultMeaning
--depsfileAxiomDeps.tomlDependency manifest to resolve.
--lockfile.axiom/axiom.ui.lock.jsonLock file to write.
Terminal
axiom contract resolve

axiom contract verify

Re-resolves the manifest and checks every locked input, byte for byte, without changing files. Use it in CI. On a mismatch it fails and asks you to resolve and review the semantic diff. On success it reports how many aliases are signed and unsigned.

Usage
axiom contract verify [OPTIONS]
OptionValueDefaultMeaning
--depsfileAxiomDeps.tomlDependency manifest.
--lockfile.axiom/axiom.ui.lock.jsonLock file to verify, relative to the manifest's directory by default.
Terminal
axiom contract verify

axiom contract diff

Prints the semantic changes between two UI contract locks as JSON. Use it to review a lock update.

Usage
axiom contract diff <BEFORE> <AFTER>
OptionValueDefaultMeaning
<BEFORE>lock filerequiredEarlier lock.
<AFTER>lock filerequiredLater lock.

axiom contract facade

Prints read-only virtual-facade metadata for one locked alias: the typed interface the UI compiler derives for that contract. No facade file is generated.

Usage
axiom contract facade [OPTIONS] <ALIAS>
OptionValueDefaultMeaning
<ALIAS>namerequiredContract alias from the lock, such as tasks.
--lockfile.axiom/axiom.ui.lock.jsonLock to read.

axiom contract check-source

Validates the use contract declarations in one source file against only the committed lock. It never resolves or writes files, and exits non-zero with one diagnostic per problem.

Usage
axiom contract check-source [OPTIONS] <SOURCE>
OptionValueDefaultMeaning
<SOURCE>.acore filerequiredFrontend source to validate.
--lockfile.axiom/axiom.ui.lock.jsonCommitted lock.
Terminal
axiom contract check-source main.acore

axiom packages

Builds, resolves, verifies, inspects, diffs and source-checks typed frontend .axiom packages, such as theme and component libraries. Resolution reads only local files inside the manifest's directory, and rejects an artifact that resolves outside it. See Packages.

Usage
axiom packages <COMMAND>

No options other than --help.

CommandPurpose
packages buildValidate and canonically encode a package envelope.
packages resolveResolve package dependencies into the package lock.
packages verifyRe-resolve locked bytes and proofs.
packages inspectPrint one verified locked envelope.
packages diffClassify package changes and enforce explicit approvals.
packages check-sourceValidate imports and compile the unchanged source for a target.
packages runRun package-backed source through the normal target session.

axiom packages build

Validates a typed package envelope, writes its canonical encoding to --out, and prints the output path and SHA-256 digest.

Usage
axiom packages build --out <OUT> <SOURCE>
OptionValueDefaultMeaning
<SOURCE>JSON filerequiredPackage envelope to encode.
-o, --outfilerequiredEncoded .axiom package to write.

axiom packages resolve

Resolves the package entries in AxiomDeps.toml into a canonical lock that you commit. It validates the complete lock before replacing any output.

Usage
axiom packages resolve [OPTIONS]
OptionValueDefaultMeaning
--depsfileAxiomDeps.tomlDependency manifest.
--lockfile.axiom/AxiomPackages.lockPackage lock to write.
Terminal
axiom packages resolve

axiom packages verify

Re-resolves the manifest and verifies every locked package's bytes and proofs without changing files. Use it in CI.

Usage
axiom packages verify [OPTIONS]
OptionValueDefaultMeaning
--depsfileAxiomDeps.tomlDependency manifest.
--lockfile.axiom/AxiomPackages.lockPackage lock to verify.
Terminal
axiom packages verify

axiom packages inspect

Prints one verified locked package envelope as JSON.

Usage
axiom packages inspect [OPTIONS] <ALIAS>
OptionValueDefaultMeaning
<ALIAS>namerequiredPackage alias from the lock.
--lockfile.axiom/AxiomPackages.lockPackage lock to read.

axiom packages diff

Prints a semantic diff of two encoded packages as JSON, then fails unless every change that needs review is approved. Approval values are breaking-change, target-reduction, new-required-theme-role and permission-increase.

Usage
axiom packages diff [OPTIONS] <BEFORE> <AFTER>
OptionValueDefaultMeaning
<BEFORE>.axiom packagerequiredEarlier package.
<AFTER>.axiom packagerequiredLater package.
--approveapprovalnoneApprove one change class. Repeat for several.
Terminal
axiom packages diff theme-1.0.0.axiom theme-2.0.0.axiom --approve breaking-change

axiom packages check-source

Validates package imports against the package lock and compiles the unchanged source for one target. It writes no files and exits non-zero on a diagnostic.

Usage
axiom packages check-source [OPTIONS] <SOURCE>
OptionValueDefaultMeaning
<SOURCE>.acore filerequiredPackage-backed UI source.
--package-lockfile.axiom/AxiomPackages.lockPackage lock.
--ui-lockfile.axiom/axiom.ui.lock.jsonUI contract lock.
--targetweb, android, iosiosTarget to compile for.

axiom packages run

Runs package-backed source through the normal target host session, like axiom ui run with a package lock. Host and Node.js requirements are the same as for ui run.

Usage
axiom packages run [OPTIONS] <SOURCE>
OptionValueDefaultMeaning
<SOURCE>.acore filerequiredPackage-backed UI source.
--package-lockfile.axiom/AxiomPackages.lockPackage lock.
--ui-lockfile.axiom/axiom.ui.lock.jsonUI contract lock.
--targetweb, android, iosiosTarget to run.
--onceflagoffCompile once and exit.
--launchflagoffOpen the browser or deliver to the native host. Cannot be combined with --once.

axiom dependencies

Resolves and audits third-party packages that authored executable extensions use. The manifest is AxiomDeps.toml in its strict v2 schema, which declares registries and build environments. Resolution writes the canonical lock .axiom/AxiomDeps.lock, stores artifacts in an immutable content-addressed cache, and materializes a workspace view. Package scripts and advisories are recorded, never executed. Executable extensions are Experimental; see Extension dependencies.

Usage
axiom dependencies <COMMAND>

No options other than --help.

CommandPurpose
dependencies checkValidate the v2 manifest without fetching.
dependencies formatCanonically format the manifest.
dependencies migrateConvert a v1 manifest to v2.
dependencies schemaPrint the v2 JSON Schema.
dependencies completionsReturn editor completions for a TOML path.
dependencies hoverExplain one manifest field.
dependencies resolveResolve package graphs and write the lock.
dependencies verifyValidate the lock and every cached byte.
dependencies inspectExplain environments, provenance, licenses, advisories and scripts.
dependencies cacheVerify, prune or recover the cache.

When --cache is omitted, the cache is axiom/dependencies/v1 inside the user cache directory.

axiom dependencies check

Validates the complete AxiomDeps.toml v2 document without fetching anything. It prints the canonical manifest digest and the number of contracts, packages, extensions and build environments, and exits non-zero on the first problem.

Usage
axiom dependencies check [OPTIONS]
OptionValueDefaultMeaning
--depsfileAxiomDeps.tomlManifest to validate.
--jsonflagoffPrint the result or diagnostics as JSON.
Terminal
axiom dependencies check

axiom dependencies format

Canonically formats a v2 manifest. By default it prints the formatted manifest to standard output.

Usage
axiom dependencies format [OPTIONS]
OptionValueDefaultMeaning
--depsfileAxiomDeps.tomlManifest to format.
--checkflagoffFail if formatting would change the file. Cannot be combined with --write.
--writeflagoffReplace the manifest after successful validation.

axiom dependencies migrate

Converts a supported v1 manifest to the strict v2 schema in memory. By default it prints the result to standard output.

Usage
axiom dependencies migrate [OPTIONS]
OptionValueDefaultMeaning
--depsfileAxiomDeps.tomlv1 manifest to convert.
--outfilenoneWrite the migrated manifest to a new file. Cannot be combined with --write.
--writeflagoffReplace the input after a successful migration.

axiom dependencies schema

Prints the checked-in AxiomDeps.toml v2 JSON Schema, for editors and validation tools.

Usage
axiom dependencies schema

No options other than --help.

axiom dependencies completions

Returns deterministic editor completion candidates for a position in the manifest, given as a TOML path.

Usage
axiom dependencies completions [OPTIONS]
OptionValueDefaultMeaning
--pathTOML pathempty (the document root)Path to complete.
--jsonflagoffPrint JSON.

axiom dependencies hover

Explains one AxiomDeps.toml v2 field. It fails when the path has no documentation.

Usage
axiom dependencies hover [OPTIONS] <PATH>
OptionValueDefaultMeaning
<PATH>TOML pathrequiredField to explain.
--jsonflagoffPrint JSON.

axiom dependencies resolve

Resolves exact package graphs from the registries the manifest declares, verifies and stores every artifact in the cache, writes the canonical lock and materializes the workspace view. It needs network access to those registries unless you pass --locked or --offline. Direct exact-version conflicts are rejected before any network request.

Usage
axiom dependencies resolve [OPTIONS]
OptionValueDefaultMeaning
--depsfileAxiomDeps.tomlManifest to resolve.
--lockfile.axiom/AxiomDeps.lockCanonical lock to write.
--cachedirectoryuser cache axiom/dependencies/v1Content-addressed cache.
--workspace-viewdirectory.axiom/dependenciesWhere locked artifacts are materialized for the workspace.
--lockedflagoffRequire the existing lock and cache; never resolve or fetch. Cannot be combined with --offline.
--offlineflagoffReuse the existing lock and cache without network access.
--jsonflagoffPrint a JSON summary.

With --locked or --offline, the lock must match the current manifest and the cache must hold every locked artifact.

Terminal
axiom dependencies resolve
axiom dependencies resolve --locked

axiom dependencies verify

Validates the canonical lock and every cached byte it references, offline. It fails on a corrupt or malformed cache object. Use it in CI.

Usage
axiom dependencies verify [OPTIONS]
OptionValueDefaultMeaning
--lockfile.axiom/AxiomDeps.lockLock to verify.
--cachedirectoryuser cache axiom/dependencies/v1Cache to check.
--jsonflagoffPrint JSON.
Terminal
axiom dependencies verify

axiom dependencies inspect

Explains the environments, provenance, licenses, advisories and package scripts recorded in the lock.

Usage
axiom dependencies inspect [OPTIONS]
OptionValueDefaultMeaning
--lockfile.axiom/AxiomDeps.lockLock to explain.
--jsonflagoffPrint the complete lock as JSON.

axiom dependencies cache

Verifies, prunes or recovers the immutable authored-dependency cache.

Usage
axiom dependencies cache <COMMAND>

No options other than --help. The subcommands are verify, prune and recover.

axiom dependencies cache verify

Checks every object in the cache against its digest and exits non-zero when any object is corrupt or malformed.

Usage
axiom dependencies cache verify [OPTIONS]
OptionValueDefaultMeaning
--cachedirectoryuser cache axiom/dependencies/v1Cache to verify.
--jsonflagoffPrint JSON.

axiom dependencies cache prune

Removes cache objects that none of the given locks reference. It requires at least one --lock; there is no implicit global deletion.

Usage
axiom dependencies cache prune [OPTIONS] --lock <LOCKS>
OptionValueDefaultMeaning
--cachedirectoryuser cache axiom/dependencies/v1Cache to prune.
--lockfilerequiredCanonical lock whose objects are retained. Repeat for several locks.
--jsonflagoffPrint JSON.

axiom dependencies cache recover

Downloads the cache objects a lock needs from their recorded registries and verifies them. It needs network access.

Usage
axiom dependencies cache recover [OPTIONS]
OptionValueDefaultMeaning
--lockfile.axiom/AxiomDeps.lockLock whose objects to recover.
--cachedirectoryuser cache axiom/dependencies/v1Cache to fill.
--jsonflagoffPrint JSON.

axiom domain

Validates or bootstraps the optional Domain Model v1 layer of a backend contract. See Domain and security models.

Usage
axiom domain <COMMAND>

No options other than --help.

CommandPurpose
domain validateValidate domain references and print the canonical manifest hash.
domain bootstrapWrite reviewable domain suggestions from OpenAPI or SQL.

axiom domain validate

Validates domain references and prints the canonical domain manifest hash with the number of entities, relationships and projections. A contract without a domain block is reported as such and the command succeeds.

Usage
axiom domain validate [OPTIONS] [FILE]
OptionValueDefaultMeaning
[FILE].acore fileaxiom.acoreContract to validate.
--jsonflagoffPrint JSON.
Terminal
axiom domain validate main.acore --json

For the hello-api example, which declares no domain block, the output is:

Expected output
{
  "format": "none",
  "message": "No optional domain block is declared."
}

axiom domain bootstrap

Writes a reviewable Domain Model v1 block from OpenAPI JSON or exported SQL DDL. It writes suggestions only: it never modifies the input or your contract and never connects to a live database. It refuses to overwrite an existing output file, and the input limit is 8 MiB. Review model names, ownership, audiences and invariants before you copy the block into axiom.acore. OpenAPI and SQL input is Experimental and bounded; it is not full behavior or runtime parity. See Existing database.

Usage
axiom domain bootstrap [OPTIONS] --source <SOURCE> <INPUT>
OptionValueDefaultMeaning
<INPUT>filerequiredOpenAPI JSON document or exported SQL DDL.
--sourceopenapi, sqlrequiredInput kind.
--outputfileaxiom.domain.acoreNew file for the suggestions.
Terminal
axiom domain bootstrap openapi.json --source openapi

axiom security

Inspects the opt-in Security Model v1 policy, its source evidence and its coverage. See Domain and security models and Security rules.

Usage
axiom security <COMMAND>

No options other than --help. The only subcommand is check.

axiom security check

Runs the same deterministic security analysis as axiom build without writing an artifact. It renders the manifest a build embeds: mode, findings, coverage, policy graph, source evidence and canonical hash. Run it locally, in CI and before a release. It does not read secret values.

Usage
axiom security check [OPTIONS] [FILE]
OptionValueDefaultMeaning
[FILE].acore fileaxiom.acoreContract to analyze.
--jsonflagoffPrint the full report as JSON, suitable for CI annotations.
--fail-on-warningflagoffReturn non-zero when there are warnings, for a review-only CI job.
Terminal
axiom security check axiom.acore
axiom security check axiom.acore --json > security-report.json
axiom build axiom.acore --out backend.axiom

For the hello-api example with security(mode: "audit") added, the report lists one warning and the command exits with status 0:

Expected output
Security Mode audit · 0 error(s), 1 warning(s) · 0 of 1 endpoints covered (0 direct, 0 default-policy)
AXSEC-001 WARNING [hello] `hello` is externally reachable but has no explicit public declaration or authorization policy.
  → Declare `security.endpoints[endpoint]` as public or bind it to a user-defined policy.

Exit status

SituationResult
No security blockExits 0 and explains that Security Mode is not enabled.
audit modeExits 0 after reporting findings, including errors that would block strict mode. This makes baseline adoption safe.
strict mode with error findingsExits non-zero. axiom build uses the same rule.
--fail-on-warning with warningsExits non-zero, so CI can enforce warnings once a team agrees on its baseline.
Invalid Acore or invalid policy referencesAlways exits non-zero.
  1. Run a Go or Python extractor and review its advisory facts.
  2. Add security(mode: "audit"), explicit public routes and policies.
  3. Classify sensitive fields and add response projections.
  4. Declare network, upload, path, process, cache, CORS and logging controls only for boundaries the service actually owns.
  5. Review each security change in a native contract pull request.
  6. Move to strict after a trusted server adapter enforces the declarations.

Put policy-safe identifiers such as origins and issuers in Acore, and keep credentials in deployment secrets. See Production readiness for the release review.