meroctl CLI Reference
meroctl is the one command line for Calimero: it starts an app
(app new), builds, packs, signs and publishes it (app build, app pack,
app publish), runs a development cluster around it (local), reaches
Calimero Cloud (cloud), and talks to nodes. It replaced mero-app-build,
mero-sign, mero-compute and scripts/pack-component.py (gone after
1.0.0-rc.24). The commands that talk to a node go through the
node API with calimero-client: before anything is sent it fetches the node’s
attestation and judges the quote, then every request travels in the sealed
channel. Each
command calls the client’s method for its route, generated from the node’s
API document, so the route each one names below is
the operation it calls. The source is crates/meroctl/src.
Its command names are the glossary’s words, as in the API and the SDKs (v1’s names, retired, are listed under Retired words):
| Command | What it manages |
|---|---|
app |
making an app and shipping its signed package (no node) |
package |
signed packages installed on the cluster, once per cluster (v1’s applications) |
instance |
app instances (v1’s contexts) |
org |
organizations (v1’s namespaces) |
team |
an organization’s teams (v1’s groups) |
account |
the signed-in account; each passkey is one of its devices |
local |
a development cluster on this machine, and the build loop around it |
cloud |
Calimero Cloud (organizations, clusters), and a cluster’s compute |
deployment |
a developer’s deployments: the releases offered to other organizations |
Output is JSON, pretty-printed: the route’s answer as the client reads it,
with any field the client’s types do not name kept as the node sent it.
Commands that stream (instance watch, cloud compute pipeline watch,
instance presence stream, ops metrics, blob download to stdout, package watch, local dev, deployment usage --csv) print their own lines, as do app codegen, app abi diff, app check and app signer. The commands that need no node (app new, app build,
app codegen, app abi, app signer, app pack, app sign, app inspect,
app publish, app check --against FILE.mpk, local, cloud but cloud compute) never read --node or
--api.
Global arguments
Section titled “Global arguments”| Flag | Environment | Default | Meaning |
|---|---|---|---|
--home PATH |
CALIMERO_HOME |
~/.calimero |
Directory for meroctl’s saved nodes and sessions ({home}/meroctl/). |
--api URL |
CALIMERO_API |
none | The node’s URL (any node of the cluster). |
--node ALIAS |
the default saved node | A node saved with node add, or a node’s URL (http:// or https://, as --api). Conflicts with --api. |
|
--allow-mock |
off | Trust mock quotes (development clusters such as merod local). A flag only, never read from the environment; node add --allow-mock remembers it for one saved node. |
|
--allow-debug-profiles |
off | Trust a release’s debug profiles (the host can read a debug image’s memory). | |
--tee-profiles NAME,... |
CALIMERO_TEE_PROFILES |
none | Image profiles a real node’s signed mero-tee release must list it under. Without any, every real quote is refused. |
--min-release VERSION |
CALIMERO_MIN_RELEASE |
2.3.109 |
The oldest mero-tee release to trust. |
--api-key KEY |
CALIMERO_API_KEY |
none | Authenticate with this API key instead of a saved session. |
--ops-token TOKEN |
CALIMERO_OPS_TOKEN |
none | The operator’s token, for ops commands. |
--operator-key-file FILE |
CALIMERO_OPERATOR_KEY_FILE |
none | The operator’s Ed25519 key (32-byte seed, hex; the node has its public half from merod --operator-key): ops release, ops outbound, ops upgrade, ops upgrade-org, ops add-node, ops remove-node, ops move, ops restore, ops backup-key --public-key, ops set-quotas, ops set-pools and ops set-prices sign the decision with it when the node asks (428 OPERATOR_SIGNATURE_REQUIRED). Without it, meroctl says to pass it. |
Which node: --api, else --node, else the default saved node. Which
credential: --api-key, else the session saved for that node’s URL (refreshed
when it is within 30 seconds of expiring), else none, and the node says what
the request needs.
An INSTANCE argument is an alias of the signed-in account or an app id (the
instance’s context id, hex(SHA-256(app_id)), works too). With no credential, it is used as given.
Approvals on a development cluster
Section titled “Approvals on a development cluster”What an owner approves takes --dev-passkey FILE: a passkey kept in a file,
which only a development cluster’s localhost relying party accepts.
Without it, the command sends the request plainly and the node answers
412 CONFIRM_REQUIRED: on a real cluster the owner approves in a browser.
That holds for call (a confirm method), instance update, instance transfer,
instance move, org delete, org outbound, org egress ... off,
org approve-release, org upgrade-policy (setting), instance upgrade-policy (setting), instance approve-update, instance undo --yes, org invite, org leave,
org members add, org members remove, org capabilities,
account outbound, account approve-release, account api-key create,
account api-key revoke, account device revoke, team delete,
team members add, team members remove, team settings, team leave,
team upgrade trigger, team upgrade retry, package origins add,
package origins remove, instance origins add, instance origins remove and raw. package watch, dev start and dev watch
require it; local dev signs up a deployer of its own. account device add takes --approve-with FILE, a passkey file
the account already has.
Saved nodes, in {home}/meroctl/nodes.json (mode 0600). No network.
| Command | Meaning |
|---|---|
node add NAME URL [--allow-mock] |
Save a node. The first one saved becomes the default. --allow-mock trusts its mock quote. A name is letters, digits, - and _. |
node remove NAME (rm) |
Forget a saved node. |
node use NAME |
Make a saved node the default. |
node list (ls) |
The saved nodes and the default. |
login, logout, whoami, attest
Section titled “login, logout, whoami, attest”| Command | Route | Meaning |
|---|---|---|
login --dev-passkey FILE [--name NAME] [--origin URL] |
/auth/passkey/register/* or /auth/passkey/login/* |
Sign in with a file passkey, or sign up when FILE does not exist (--name, default developer, names the account). --origin (default http://localhost:3000) must be one the cluster allows. Needs --allow-mock: on a real cluster use an API key. Saves the session for the node. |
logout [--all] |
/auth/logout-all with --all |
Forget the saved session; --all first ends every session of the account. |
whoami |
GET /auth/me |
Who the requests run as. |
attest (attest node) |
GET /attestation |
The node’s attestation document. |
attest app INSTANCE (v1’s attest --context) |
GET /apps/{app}/attestation |
Every replica of that app verified, their receipt keys and the governance they attest. |
attest release [--file FILE --nonce HEX] |
GET /attestation/release |
Verify a release attestation (merod attest): fetched from the node’s URL over a fresh nonce (a booting TD’s merod attest --serve), or read from FILE with the nonce it was made over. Judged with --allow-mock, --tee-profiles and --min-release like any quote; needs no session. Prints the claim, the verified registers and the profile they matched. |
Making an app and shipping its signed package, from an empty directory to a
release. None of these needs a node but app release and app check --against VERSION:
| Command | Meaning |
|---|---|
app new DIR [--template T] [--ref R] [--no-git] |
Start a project from apps/<T> of calimero-network/apps at branch or tag R (default kv-store at main): a sparse, shallow clone of the app, the shared packages/ and tools/ it builds with, and the root files that pin its versions, with the history dropped and a fresh git init. It also writes AGENTS.md, the guide a coding agent reads first (the layout, the build, test and codegen loop for apps/<T>, the rules, and what stays with the person), and a CLAUDE.md that imports it. DIR must not exist or be empty. Needs git. The app’s README says how to run it (meroctl local dev apps/<T>). |
app build [DIR] [--out FILE] [--compute-out FILE] [--target-dir DIR] |
Build the crate (default .) into a calimero:app component (wasm32-wasip2, the ABI lifted where the node reads it), default DIR/app.component.wasm, and its compute component when it has compute methods (default compute.component.wasm beside it). Cargo’s target dir is --target-dir, else CARGO_TARGET_DIR, else DIR/target. |
app codegen --abi FILE --lang ts|python|swift|kotlin|openapi [-o DIR] [--name N] [--package P] [--service S] [--kotlin-serialization-plugin] [--no-openapi] |
The app’s OpenAPI document and a typed client (Typed clients). FILE is a component, an .mpk, a manifest.json or ABI JSON. |
app abi show FILE [--service S] |
The ABI as JSON. |
app abi diff OLD NEW [--service S] [--json] |
What changed between two releases; exit code 1 when a change breaks existing callers (App interface). |
app signer new FILE [--force] / app signer id FILE |
A new Ed25519 signing key (written owner-only), and its did:key signer id. A package’s identity is its package id and its signer. |
app pack [DIR] [--wasm F] [--compute F] [--pipeline F]... [--service NAME=PATH]... [--service-compute NAME=F]... [--service-pipeline NAME=F]... [--frontend DIR] [--frontend-entry E] [--no-frontend] [--outbound URL]... [--upgrades owner|publisher] [--instance-org standalone|org|either] [--guests allowed|forbidden] [--package P] [--name N] [--description D] [--icon PNG] [--category C] [--app-version V] [--min-runtime-version V] [--key FILE] [--previous OLD] [--out FILE] |
Write the manifest the node reads, sign it, and write it with every file it names as an .mpk. With the crate DIR, its [package.metadata.calimero] and version fill what the flags leave out: package, min-runtime-version, frontend-dir, the display metadata a registry lists a new package by (name, description, icon (a PNG), category, tags, author, license, guide), slug, the links (frontend, github, docs, frontend-aliases), frontend-connect (origins the packed frontend’s page may connect to, on frontend.connect), outbound, secrets, upgrades, instance-org, guests and lineage, and connectors, dependencies whose own outbound and secrets it merges in, printing each it adds (Connectors); --name, --description, --icon and --category set them without a crate, the components are built unless --wasm/--compute name them, and the default output is DIR/dist/<package>-<version>.mpk. A frontend is checked with the node’s rules (paths, types, MAX_FRONTEND_BYTES, the entry) and the HTML rules its CSP enforces. Without --key the development key signs, which a public registry refuses. --previous reports ABI changes against the last release first. A package of several services takes --service NAME=PATH per service (PATH its crate directory, built into DIR’s target directory when DIR is given, else its own, or its component), or DIR’s services = [{ name = "room", path = "crates/room" }] (paths relative to DIR; --service replaces the list): the manifest declares services (each services/<name>.wasm, its compute component services/<name>.compute.wasm from the build or --service-compute, its pipelines services/<name>/pipelines/<file> from --service-pipeline) instead of wasm, and --wasm, --compute and --pipeline are refused beside it. A virtual workspace’s DIR (no [package]) is read from [workspace.metadata.calimero] and [workspace.package] version. The package is opened as a node opens it before it is written. |
app check [DIR | --mpk FILE] --against VERSION|FILE.mpk [app pack's flags] [--uses-mpk FILE]... [--of-service S] [--json] [--fail-on red|egress] [--allow-egress PREFIX]... |
What the people running the app will see when this release replaces an earlier one, judged by the classifier the node judges updates with (calimero_bundle::update): where data can go (Data: stays in Calimero, or Data can go to: and every destination of the app and the apps it creates; an external endpoint, a TEE included, is listed like any other), green (applies on its own under an automatic policy, unless it sends data out, removes a method or moves the apps the release creates) or red with each reason in plain words (another signer, a new destination, another state version, a member with egress joining or leaving, a new method called as the person), egress added and removed, new and removed methods, the state version, the members and the signer; --json prints the full classification, both units and the gate. The candidate is packed from DIR (default .) with app pack’s flags (pass the release’s --key: the signer is judged), or read from --mpk. --against FILE.mpk needs no node; --against VERSION reads that installed release of the same package from the node’s card (GET /packages/{p}/{v}/capabilities). Both sides are units: each app a release creates with uses (mode create, at most 3 deep) at its pinned release, else the newest at hand inside its range, read from --uses-mpk files first, then the node. --fail-on red fails on any red reason, --fail-on egress only on new egress (egressAdded, memberAdded); --allow-egress waives a new destination it covers and a joining member whose destinations it all covers. Exit codes: 0 judged (and the gate passed), 1 the gate failed, 2 it could not judge (a file that does not open, a release not at hand, another package, a usage error). |
app sign MANIFEST (--key FILE | --dev) [--previous OLD] |
Sign a manifest.json in place. |
app inspect FILE.mpk |
Open the bundle as a node does (signature, every artifact’s hash) and print verified, signerId, bundleHash and the manifest. |
app publish FILE.mpk [--registry URL] [--api-key KEY] [--org ORG] [--cloud URL] [--public] |
Publish to the app registry (CALIMERO_REGISTRY_URL, default https://apps.calimero.network; POST /api/bundles/push with the signed manifest and the bundle, the key CALIMERO_REGISTRY_API_KEY, else the one registry login saved, as a bearer token, over https only). With --org, the key is a Calimero Cloud organization’s (ck_live_…, scope registry:publish), traded at the Cloud (CALIMERO_CLOUD_URL) for a short publish token first. A new package is private unless --public. The registry’s refusal comes back with its code (version_not_allowed, invalid_signature, …). |
app release (below, under package) packs and installs in one step.
package
Section titled “package”Signed packages installed on the cluster (v1’s applications): a package is
installed once and verified on every node that runs it. Each command also
parses as app <command>, the spelling before package, which app’s help
no longer lists.
| Command | Route | Meaning |
|---|---|---|
package install PACKAGE[@VERSION] [--version V] [--org ORG] [--registry URL] [--registry-api-key KEY] |
POST /packages/install |
Install a release from the node’s registry, for --org (default: your only organization). Without @V or --version, the latest version --registry lists that is not yanked (registry get PACKAGE; the key as registry’s, else the saved one), named on stderr: that registry should be the one the node installs from. |
package install --path FILE |
POST /packages or POST /bundles |
Upload a signed .mpk, or any other file as a raw WASM bundle (its hash printed). Development clusters (--dev) only; production installs PACKAGE@VERSION from the registry. |
package list (ls, list-packages) |
GET /packages |
Installed packages and their versions; each version’s visibility (public, private) and orgs, the organizations of yours a private one is for. |
package get PACKAGE |
GET /packages/{package} |
One installed package. |
package versions PACKAGE (list-versions) |
GET /packages/{package} |
Its installed versions, each with its visibility and orgs, as package list. |
package get-latest-version PACKAGE |
GET /packages/{package} |
Its newest installed version. |
package pipelines PACKAGE [--version V] |
GET /packages/{package}/{version}/pipelines |
The pipelines a version registered (default: the newest): per name, hash, worstCaseFuel, the modules it pins and the canonical pipeline. |
app release [DIR] --version V [pack's flags] [--install-org ORG] [--publish [--registry URL] [--registry-api-key KEY] [--org ORG] [--cloud URL] [--public]] |
GET /packages/{package}, then POST /packages or (--publish) POST /packages/install |
Ship a release in one step: app pack (DIR defaults to . when no --wasm, --compute or --service names the components; --version is its --app-version), then, with --publish, app publish to the registry (--registry-api-key is app publish’s --api-key, CALIMERO_REGISTRY_API_KEY), then the install, for --install-org (a cluster organization, as package install --org; default: your only one): from the cluster’s registry after --publish, else an upload of the .mpk (development clusters). Before anything is built, a version that is not semver, or not newer than every release of the package the cluster has installed, is refused. Answers package, version, mpk, published (the registry’s answer, or null) and installed. With --publish, a version the registry already lists for the package (registry versions) is refused before anything is built too; a private package the key cannot see (an --org key never reads the registry; the saved registry login key does) is left to the registry’s own refusal (version_not_allowed). |
package uninstall PACKAGE [--version V] |
DELETE /packages/{package}[/{version}] |
Uninstall one version or the whole package. Refused while an instance runs it, unless another installed release ships the same code: then the uninstall is allowed and the instance keeps running, and its next update is approved with instance update or instance approve-update (updates the log cannot classify). |
package watch --path FILE --dev-passkey FILE [-i INSTANCE]... [--once] [--interval-ms MS] [--org ORG] |
uploads, then POST /apps/{app}/upgrade |
Push a build now, then on every save. A .mpk is installed (for --org, default: your only organization) and this account’s instances of its package (or the --instances named) are updated to its version; a raw .wasm updates only the --instances named. --interval-ms defaults to 500. |
package origins list PACKAGE (ls) |
GET /package-origins/{package} |
The web origins registered for the package: each origin, its rpId, addedBy, addedAt and served (whether the cluster serves the frontend there). Its manager’s only. |
package origins add PACKAGE ORIGIN [--rp-id ID] [--served] [--dev-passkey FILE] |
POST /package-origins/{package} |
Register a web origin whose pages may sign people in to the package’s frontend (registered origins). ORIGIN is https://host[:port] as a browser writes it (http only on a localhost name, on a --dev node). --rp-id is the passkey relying party there: the origin’s host (the default) or a parent domain of it, never the cluster’s rp-id or a parent of it; passkeys made there belong to that domain. A package registers at most 8. --served makes it a custom domain: the cluster also serves the package’s frontend there from its signed bundle (https://host, no port; not under the apps domain or the cluster’s rp-id; at most 4 per package and 64 per cluster). The node refuses it 400 NOT_SERVING without --apps-domain and 409 CLUSTER_NOT_UPGRADED while a node runs an older release; an origin held with the other served is 409 ORIGIN_TAKEN (remove it first). TLS for it ends in front of merod (custom domains). |
package origins remove PACKAGE ORIGIN [--dev-passkey FILE] (rm) |
DELETE /package-origins/{package} |
Remove a registered origin; the sessions opened there end. |
The package’s manager handles its origins: where its signing key is bound
to a publisher organization, that organization’s org-wide MANAGE_APPLICATION
holders (the capability to manage apps), else the account that installed it first. Each change carries the
manager’s passkey consent (package:{package} / __add_origin / { origin, rpId },
{ origin, rpId, served: true } for a served one,
__remove_origin / { origin }): --dev-passkey on a development cluster;
without it the node answers 412 CONFIRM_REQUIRED and nothing changes, and on
a real cluster the manager makes the change in the console (Web addresses),
where the browser holds their passkey. A frontend the cluster serves from the
bundle needs no origin here.
Calimero Cloud’s manager API (mdma). It takes one of two credentials, which
cloud login checks and keeps in {home}/meroctl/cloud.json (mode 0600):
- a console session (Google sign-in), the token a signed-in console sends;
meroctl saves the fresh one the manager sends back on each answer
(
X-MDMA-Session-Refresh); - an organization API key (
ck_live_…) for an agent or CI, made withcloud keys create. It acts only in its organization and within its scopes, never renews, and is refused (401) on a route the manager keeps for a person, such as making keys.CALIMERO_CLOUD_API_KEYuses one withoutloginand wins over what is saved; nothing is written.
No node. The manager (and, for app publish, the
registry) is called at /api/... only; one that serves nothing but
/api/v2/... answers 404.
| Command | Route | Meaning |
|---|---|---|
cloud login --token TOKEN [--url URL] |
GET /api/orgs |
Check and keep the session. CALIMERO_CLOUD_TOKEN and CALIMERO_CLOUD_URL (default https://cloud.calimero.network) work too. |
cloud login --api-key KEY [--url URL] |
GET /api/clusters |
Check and keep an organization’s API key instead (it needs clusters:read). |
cloud logout |
Forget the saved credential. | |
cloud keys list [--org ORG] (ls) |
GET /api/orgs/{org}/api-keys |
The organization’s live keys (default: your personal one): name, prefix, scopes, creator, last use. Never the secret. |
cloud keys create NAME --scope S[,S...] [--expires-in-days N] [--org ORG] |
POST /api/orgs/{org}/api-keys |
A new key (an organization admin, with a session), acting as you in that organization only. The secret is in this answer only. clusters:read lists the organization’s dedicated clusters, clusters:create creates them (billed to you, within its quota) and clusters:scale adds and removes their nodes (adding only within the node quota); no scope deletes a cluster or reaches the operator’s routes. A scope the Cloud does not offer is refused with the list it does. Without --expires-in-days (1 to 3650) the key works until revoked. |
cloud keys revoke ID [--org ORG] |
DELETE /api/orgs/{org}/api-keys/{id} |
Revoke a key: every request with it is refused from now on. |
cloud orgs |
GET /api/orgs |
Your organizations, the personal one first. |
cloud clusters list (ls) |
GET /api/clusters |
Your dedicated clusters, each with its nodes’ public_url. |
cloud clusters create NAME --size SIZE [--org ORG] [--region R] |
POST /api/clusters |
A new dedicated cluster: an organization admin, within quota, with a payment method (402 otherwise). |
cloud clusters add-nodes CLUSTER [--count N] [--role replica|job] [--zone Z] |
POST /api/dedicated/{id}/nodes |
More nodes for a dedicated cluster (its id, or its name, looked up with GET /api/clusters), billed per hour as extra nodes. A job node runs compute only. Only within the nodes Calimero approved for it (the organization’s node quota, node_quota in clusters list), with a session or an API key (clusters:scale): past it the Cloud answers 409, and more nodes need Calimero’s approval. |
cloud clusters remove-node CLUSTER NODE |
DELETE /api/dedicated/{id}/nodes/{node} |
Remove a node added to the cluster: its app replicas move to the other nodes, then its VM is deleted and its billing stops. A founding node stays (409). |
cloud use CLUSTER [--as NAME] |
GET /api/clusters |
Save the cluster’s node as a meroctl node (default: named after the cluster) and make it the default, attested as a real node (no --allow-mock). |
cloud compute pipeline
Section titled “cloud compute pipeline”The old top-level pipeline is the same command.
An instance’s pipeline runs: DAGs of compute steps over sealed files, which a
package’s release registers and job nodes run. APP is an instance (alias or
id).
| Command | Route | Meaning |
|---|---|---|
cloud compute pipeline validate FILE [--package P --version V] |
POST /pipelines/validate |
Check a pipeline file and print every error with its path and code; exit code 1 when it is not valid. With a release, check it as that release would install it. Writes nothing. |
cloud compute pipeline estimate APP NAME [--input NAME=ID[,ID...]]... [--count NAME=N]... |
POST /apps/{app}/pipelines/{name}/estimate |
Runs, fuel and cost per step for the given input file counts, maxItems for an input not given. Starts nothing. |
cloud compute pipeline run APP NAME [--input NAME=ID[,ID...]]... [--param NAME=VALUE]... [--max-cost MICRO_UNITS] [--idempotency-key KEY] [--wait] |
POST /apps/{app}/pipelines/{name}/runs |
Start a run of a pipeline the instance’s release registers; prints { run }, or with --wait the run once it is no longer running. --max-cost caps what the run may owe under the operator’s price table, and is required with an API key. --idempotency-key makes a repeat of the command the same run, such as a CI job retried after a timeout. |
cloud compute pipeline get APP RUN |
GET /apps/{app}/pipeline-runs/{run} |
A run’s state and each step’s status, runs, outputs and reason. |
cloud compute pipeline runs APP |
GET /apps/{app}/pipeline-runs |
The instance’s recent runs, newest first. |
cloud compute pipeline watch APP RUN |
GET /apps/{app}/pipeline-runs/{run}/events |
One JSON line per snapshot, run and step event, then the end event as the answer. |
cloud compute pipeline cancel APP RUN |
POST /apps/{app}/pipeline-runs/{run}/cancel |
Cancel a run. |
cloud compute pipeline retry APP RUN [--limit STEP.FIELD=N]... [--max-cost MICRO_UNITS] [--idempotency-key KEY] [--wait] |
POST /apps/{app}/pipeline-runs/{run}/retry |
Start a new run of an ended run’s pipeline, release, inputs and params with some step limits raised (fuel, memoryMib, wallSecs, each within the method’s caps); what already succeeded is answered from the step cache. --idempotency-key as on run. |
cloud compute pipeline receipt APP RUN [--verify] [--out FILE] |
GET /apps/{app}/pipeline-runs/{run}/receipt |
The node-signed receipt of an ended run; with --verify, check it under the node’s attested key and compare each downloaded output with its hash. |
cloud compute pipeline logs APP RUN --step STEP [--index I] |
GET /apps/{app}/pipeline-runs/{run}, then GET /apps/{app}/runs/{run}/logs |
Print the module log of a step’s compute run (--index, default 0, is its item’s place), as cloud compute logs does: a current cluster keeps none. |
cloud compute pipeline download APP RUN [--out DIR] |
POST /apps/{app}/pipeline-runs/{run}/export, the segment route |
Download the files of an ended run that may leave it (the outputs of the steps its pipeline’s outputs names) as STEP-INDEX.bin. |
meroctl cloud compute pipeline validate ./pipelines/ingest.yaml --package com.example.docs --version 1.2.0meroctl file upload ./report.pdf -i docs # prints { id, size, sha256, index }meroctl cloud compute pipeline estimate docs ingest --input pages=<file-id>meroctl cloud compute pipeline run docs ingest --input pages=<file-id> --param lang=en --max-cost 5000000 --waitmeroctl cloud compute pipeline receipt docs <run> --verifymeroctl cloud compute pipeline download docs <run> --out ./outputscloud compute logs
Section titled “cloud compute logs”The old run logs is the same command.
| Command | Route | Meaning |
|---|---|---|
cloud compute logs APP RUN [--attempt N] |
GET /apps/{app}/runs/{run}/logs, then the file export routes |
Print a compute run’s module log (stdout, stderr and log lines) to standard output: attempt N, else the latest that kept a log. The app’s owner and its organization’s members only. A cluster keeps no run’s log (an app’s log lines may hold user data), so against a current one it says the run kept no log; run the method locally with meroctl local compute run to see its lines. |
instance
Section titled “instance”App instances (v1’s contexts).
| Command | Route | Meaning |
|---|---|---|
instance create --name NAME (--package P [--version V] | --bundle HASH | --path FILE) [options] |
POST /apps |
Create an instance. --path installs a .mpk (or a development .wasm) first. See the options below. |
instance list [--package P] (ls) |
GET /apps[?package=P] |
Instances this account reaches. |
instance get INSTANCE |
GET /apps/{app} |
One instance. |
instance delete INSTANCE (del) |
DELETE /apps/{app} |
Delete an instance (its owner or an org admin). |
instance move INSTANCE ORG [--bring-members] [--dev-passkey F] |
POST /apps/{app}/move |
Move the instance to another org, its data where it is (whoever manages it now, as an admin of the target org, with a passkey); --bring-members adds the members who reach it. |
instance transfer INSTANCE ACCOUNT [--dev-passkey F] |
POST /apps/{app}/transfer |
Hand the instance to another account (its owner, or for an org’s instance its owner while a member or an org admin, with a passkey; an org’s instance only to a member of the org). |
instance update INSTANCE [--version V] [--package P] [--service S] [--bundle HASH] [--migrate EXPORT] [--dev-passkey FILE] |
POST /apps/{app}/upgrade |
Move to another release or bundle; the state stays as it is and the new code reads it. --migrate is refused (422 UPGRADE_FAILED, MigrationsNotSupported: no migrations in this version). --bundle conflicts with --version and --package. The owner approves. Use it when the consent page cannot open the update because the release the instance runs was uninstalled while another release ships its code. |
| `instance upgrade-policy INSTANCE [–second-approver BOOL] [–auto-apply never | no-destinations] [–hold-hours N] [–clear] [–dev-passkey FILE]` | GET|POST /apps/{app}/upgrade-policy |
instance approve-update INSTANCE --version V [--unit] [--dev-passkey FILE] |
POST /apps/{app}/upgrade-approvals |
The first of two approvals of a red update where the instance’s policy asks for a second approver (--unit: with the apps it created); another owner or admin then applies it with instance update (or the unit’s upgrade). |
instance undo INSTANCE [--yes] [--dev-passkey FILE] |
GET|POST /apps/{app}/undo |
Without --yes: what undoing the instance’s last upgrade would revert (with the members its unit’s upgrade moved) and lose (lostWrites), or why it cannot. With it: undo it within a week of the upgrade (an owner or admin, with a passkey): back to the release it ran and its restore point’s state; what it wrote since is gone. |
instance watch INSTANCE [--from N] [--limit N] (ws) |
GET /apps/{app}/events |
Print committed events from index --from (default 0), then live ones, as JSON lines; stop after --limit. |
instance alias add ALIAS INSTANCE (new, create) |
PUT /auth/aliases/{alias} |
Name an instance for this account. |
instance alias remove ALIAS (rm, del, delete) |
DELETE /auth/aliases/{alias} |
Remove an alias. |
instance alias get [ALIAS] |
GET /auth/aliases/{alias} |
Resolve an alias (default default). |
instance alias list (ls) |
GET /auth/aliases |
This account’s aliases. |
instance use INSTANCE |
PUT /auth/aliases/default |
Make an instance the default (the alias default). |
instance access INSTANCE [--grant GRANT]... |
POST /apps/{app}/access |
Replace the instance’s grants: each --grant is org, team:TEAM, account:ID (a member or a guest), account:ID=SCOPE (with the app’s JSON scope) anyone (any signed-in account; nobody signed out) or site (sessions opened on the instance’s own registered origins). No --grant: only its owner. |
instance metadata INSTANCE JSON |
POST /apps/{app}/metadata |
Set the instance’s metadata; null clears it. |
instance storage INSTANCE |
GET /apps/{app}/storage |
Keys, bytes and blobs the instance holds. |
instance outbound-log INSTANCE |
GET /apps/{app}/outbound-log |
Its recent outbound HTTPS requests, newest first: host, path (no query), status or failure, secret names, sizes; never a value or body. Its owner and its organization’s admins only. |
instance abi INSTANCE |
GET /apps/{app}/abi |
The ABI of the bundle it runs. |
instance origins list INSTANCE (ls) |
GET /apps/{app}/origins |
The web origins registered for the instance, each with its rpId. Its managers’ only. |
instance origins add INSTANCE ORIGIN [--rp-id ID] [--dev-passkey FILE] |
POST /apps/{app}/origins |
Register a site of the instance’s own whose pages sign people in; their sessions reach this instance alone (an instance’s origins). By its owner or an admin of its organization, though the package is someone else’s. ORIGIN and --rp-id as for package origins add; at most 4 per instance. |
instance origins remove INSTANCE ORIGIN [--dev-passkey FILE] (rm) |
DELETE /apps/{app}/origins |
Remove it; the sessions opened there end. |
instance presence list INSTANCE (ls) |
GET /apps/{app}/presence |
Who is present now (ephemeral, never stored). |
instance presence publish INSTANCE --seq N [--state HEX] |
POST /apps/{app}/presence |
Publish this device’s presence; no --state retracts it. |
instance presence stream INSTANCE [--limit N] |
GET /apps/{app}/presence/stream |
The snapshot, then each change, as JSON lines. |
instance create options:
| Flag | Meaning |
|---|---|
--name NAME |
Required. The instance’s name. |
--package P |
An installed package. Conflicts with --bundle and --path. |
--version V |
With --package: the release; default the newest installed. |
--service S |
The service, for a multi-service package. |
--bundle HASH |
A raw bundle’s hash (development clusters). Conflicts with --path. |
--path FILE |
A .mpk, or a development .wasm, installed first (a .mpk for --org). |
--params JSON |
Arguments for the app’s init. |
--org ORG |
Create it in this organization. |
--team TEAM |
With --org: reached by this team’s members (a team grant). |
--alias ALIAS |
Also name it with this alias. |
meroctl call -i INSTANCE METHOD [--args JSON] [--view [--min-index N | --watch [--limit N]]] [--idempotency-key KEY] [--dev-passkey FILE]| Flag | Default | Meaning |
|---|---|---|
-i, --instance INSTANCE |
required | The instance. |
METHOD |
required | The method. |
--args JSON |
{} |
JSON arguments. |
--view |
off | Read only (POST /apps/{app}/views): no write, answered by the leader. |
--min-index N |
none | With --view: any replica that has applied index N may answer (a stale read). |
--watch |
off | With --view, for a view the app marks #[app::view(subscribable)]: print it, then again (read at the notice’s index) each time something it read changes, one JSON line each; {"ended":true} when the node drops the watch. |
--limit N |
none | With --watch: stop after N re-reads. |
--idempotency-key KEY |
none | Retries with the same key are answered once. |
--dev-passkey FILE |
none | For a method that needs a passkey confirmation per call (development clusters). |
A call without --view is POST /apps/{app}/intents. Both answers carry a
receipt signed by the answering node.
An instance’s blobs. -i is --instance and -o is --output.
| Command | Route | Meaning |
|---|---|---|
blob list -i INSTANCE (ls) |
GET /apps/{app}/blobs |
The instance’s blobs. |
blob upload FILE -i INSTANCE |
POST /apps/{app}/blobs |
Upload a file; prints its id. |
blob download ID -i INSTANCE [-o FILE] |
GET /apps/{app}/blobs/{id} |
Write a blob to --output, or to standard output. |
blob info ID -i INSTANCE |
GET /apps/{app}/blobs/{id}/info |
A blob’s size. |
blob delete ID -i INSTANCE (rm) |
DELETE /apps/{app}/blobs/{id} |
Forget a blob (its owner or an org admin); its bytes go once no other instance holds them. |
blob revoke ID -i INSTANCE |
POST /apps/{app}/blobs/{id}/revoke |
Invalidate the download grants made so far for a published blob (its owner or an org admin). |
An instance’s sealed files.
| Command | Route | Meaning |
|---|---|---|
file upload FILE -i INSTANCE |
POST /apps/{app}/files, or a session under /apps/{app}/files/uploads |
Upload a sealed file (its owner or an org member): one request up to 16 MiB, else parts that resume after a dropped connection; prints its id, size, sha256 and index. |
file download APP ID (-o|--out) PATH |
POST /apps/{app}/files/{id}/export, GET /apps/{app}/files/{id}/segments/{k} |
Download a sealed file’s plaintext: the node sends ciphertext and the file key wrapped to a key made for the call, and every byte is checked before anything is written. |
Organizations (v1’s namespaces). ROLE is guest, member,
admin or owner; JOIN is open (whoever reaches the parent is a member)
or restricted (only the members added).
| Command | Route | Meaning |
|---|---|---|
org create NAME |
POST /orgs |
Create an organization. |
org get ORG |
GET /orgs/{org} |
One organization. |
org list (ls) |
GET /auth/me |
The organizations this account belongs to, with its role. |
org delete ORG [--dev-passkey FILE] |
DELETE /orgs/{org} |
Delete it with its teams, invites and instances (the owner’s). |
org invite ORG [--role ROLE] [--team TEAM]... [--ttl-secs N] [--uses N] [--dev-passkey FILE] |
POST /orgs/{org}/invites |
Make an invitation token. --role defaults to member; --team adds teams the invitee joins. |
org join TOKEN |
POST /invites/{token}/redeem |
Join with an invitation token. |
org leave ORG |
DELETE /orgs/{org}/members/{me} |
Leave the organization. |
org teams ORG |
GET /orgs/{org} |
The organization’s teams. |
org create-team ORG NAME [--parent TEAM] [--join JOIN] |
POST /orgs/{org}/teams |
Create a team; --join defaults to restricted. |
org members list ORG [--security] (ls) |
GET /orgs/{org} |
Its members. --security (owners and admins, GET /orgs/{org}/members?detail=security): each member’s passkeys held (to 3+), recovery code set, last active day and live sessions. |
org members add ORG ACCOUNT [--role ROLE] (set-role) |
POST /orgs/{org}/members |
Add a member or change their role (default member). owner moves ownership. |
org members remove ORG ACCOUNT (rm) |
DELETE /orgs/{org}/members/{account} |
Remove a member. |
org metadata get ORG |
GET /orgs/{org} |
The organization’s metadata. |
org metadata set ORG JSON |
POST /orgs/{org}/metadata |
Replace it. |
org member-metadata ORG ACCOUNT JSON |
POST /orgs/{org}/members/{account}/metadata |
Set a member’s metadata (theirs, or an admin’s); null clears it. |
org capabilities ORG BITS [--account ID | --team TEAM] |
POST /orgs/{org}/capabilities |
Set the capability bits of a member, of a team’s members, or (neither) the organization’s default. |
org outbound ORG --package P [--prefix URL]... [--replace] [--dev-passkey FILE] |
POST /orgs/{org}/outbound |
Approve URL prefixes the package’s publisher may call out to from the organization’s instances (default: every prefix the newest release you read declares). --replace sets exactly these, which is how one is revoked. Where the owner holds outbound approvals. |
org egress ORG [off|on] [--app APP] [--return-to URL] [--dev-passkey FILE] |
GET /orgs/{org}, POST /orgs/{org}/egress, POST /apps/{app}/egress, POST /consent/requests |
Without a state, show the organization’s egress switch (with --app, the instance’s: egress, offBy, its destinations). off turns it off at once (the owner or an admin): no app it covers sends anything out of the cluster, whatever was approved. on asks the consent page (setEgress, a red change made only there; --return-to one of the cluster’s origins) and prints the page to open. |
org approve-release ORG VERSION [--dev-passkey FILE] |
POST /orgs/{org}/releases |
Approve a mero-tee release to hold the organization’s instances. Where the owner holds release approvals. |
| `org upgrade-policy ORG [–second-approver BOOL] [–auto-apply never | no-destinations] [–hold-hours N] [–clear] [–dev-passkey FILE]` | GET|POST /orgs/{org}/upgrade-policy |
org updates ORG [--after INSTANCE] |
GET /orgs/{org}/updates |
The organization’s instances with an update available or a first approval waiting, each with its class, the approvals it needs and the policy in force (its owner and admins; 50 a page). |
An organization’s teams. ROLE is lead, member or
read-only.
| Command | Route | Meaning |
|---|---|---|
team get ORG TEAM |
GET /orgs/{org}/teams/{team} |
One team. |
team update ORG TEAM [--name NAME] [--join JOIN] |
POST /orgs/{org}/teams/{team} |
Rename it or change who may join. |
team delete ORG TEAM [--keep-apps] [--dev-passkey FILE] |
DELETE /orgs/{org}/teams/{team} |
Delete it with the teams below it and the instances only they admit; with instances there, approved with a passkey (412 names them). --keep-apps keeps those instances without the team’s grants (their other grants stay; with none left, only the owner reaches them). |
team reparent ORG TEAM (PARENT | --top) |
POST /orgs/{org}/teams/{team} |
Move it under another team, or to the top. |
team subteams ORG TEAM |
GET /orgs/{org} |
The teams directly below it. |
team members list ORG TEAM (ls) |
GET /orgs/{org}/teams/{team} |
Its members and read-only members. |
team members add ORG TEAM ACCOUNT [--role ROLE] [--capabilities BITS] (set-role) |
POST /orgs/{org}/teams/{team}/members |
Add a member or change their role (default member) or capabilities. |
team members remove ORG TEAM ACCOUNT (rm) |
DELETE /orgs/{org}/teams/{team}/members/{account} |
Remove a member, from the teams below it too. |
team metadata ORG TEAM JSON |
POST /orgs/{org}/teams/{team} |
Set the team’s metadata. |
team settings ORG TEAM --capabilities BITS |
POST /orgs/{org}/capabilities |
The capabilities every member of the team gets. |
team leave ORG TEAM |
DELETE /orgs/{org}/teams/{team}/members/{me} |
Leave the team. |
team upgrade trigger ORG --package P --version V [--team TEAM [--cascade]] [--migrate EXPORT] [--dev-passkey FILE] |
POST /orgs/{org}/upgrade |
Move the organization’s instances of P (or one team’s, with --cascade its subtree) to a release, as one run the owner approves once. |
team upgrade status ORG RUN |
GET /orgs/{org}/upgrades/{run} |
Follow a run. |
team upgrade retry ORG RUN [--dev-passkey FILE] |
POST /orgs/{org}/upgrades/{run}/retry |
Run its failed instances again, as a new run. |
account
Section titled “account”The signed-in account.
| Command | Route | Meaning |
|---|---|---|
account show |
GET /auth/me |
The account, its devices, organizations and approvals. |
account usage |
GET /auth/usage |
What it uses against its quotas. |
account device list (ls) |
GET /auth/me |
Its devices (passkeys) and the current one. |
account device add --dev-passkey FILE --approve-with EXISTING [--origin URL] |
/auth/passkeys/add/* |
Add a device: a new file passkey (development clusters), approved with a passkey file the account already has. FILE must not exist. |
account device label CREDENTIAL LABEL |
POST /auth/passkeys/{cred} |
Name a device; "" clears the name. |
account device revoke CREDENTIAL [--dev-passkey FILE] |
DELETE /auth/passkeys/{cred} |
Remove a device; its sessions end. Approved with a passkey. |
account session list (ls) |
GET /auth/sessions |
Its live sessions: the device each was opened with, the package and origin it is bound to, when it opened and was last active (to within about an hour), and the current one. |
account session revoke SESSION |
DELETE /auth/sessions/{session} |
End one session. |
account activity [--after T] |
GET /auth/activity |
What its devices did, newest first: the packages and origins each signed in to, and the changes each approved (needs a passkey session). |
account api-key create [--label L] [--instance C]... [--methods M,...] [--pipelines N,...] [--read-only] [--ttl-secs N] [--dev-passkey FILE] |
POST /auth/apikeys |
Create an API key (needs a passkey session). --label defaults to meroctl; --instance limits it to those instances; --methods (comma-separated or repeated, * for any) to those methods, with or without --instance. --pipelines (with --instance) makes a pipeline key, which starts, reads and cancels runs of those pipelines of those instances and calls no method --methods does not name. The key is printed once. |
account api-key create --upgrades INSTANCE [--package P] [--label L] [--ttl-secs N] [--dev-passkey FILE] |
POST /auth/apikeys (upgrades) |
An upgrade key, for CI: it moves that one instance to signed releases of its package (P, default the one it runs) with instance update --version, signing in place of the passkey step-up, and is refused everywhere else (403 UPGRADE_KEY_ONLY). Conflicts with --instance, --methods, --pipelines and --read-only. |
account api-key list (ls) |
GET /auth/apikeys |
Its API keys. |
account api-key revoke KEY_ID [--dev-passkey FILE] |
DELETE /auth/apikeys/{key} |
Revoke one, approved with a passkey. |
account approve-release VERSION [--dev-passkey FILE] |
POST /orgs/{org}/releases |
Approve a mero-tee release to hold the account’s own instances (its only organization’s). |
account outbound --package P [--prefix URL]... [--replace] [--dev-passkey FILE] |
POST /orgs/{org}/outbound |
Approve outbound prefixes for the account’s own instances (its only organization’s). |
deployment
Section titled “deployment”A developer’s deployments: the apps each offers to
other organizations, one installed release per app name, the secret values the
instances made from it use, and the customer organizations that made them. A
DEPLOYMENT argument is its id, or the name of one this account manages
(GET /deployments; a name two of them share is refused with their ids).
Every change is approved with a passkey: --dev-passkey FILE on a development
cluster; without it the node answers 412 CONFIRM_REQUIRED and nothing changes.
| Command | Route | Meaning |
|---|---|---|
deployment list (ls) |
GET /deployments |
The deployments this account manages: its own, and those of organizations where it holds MANAGE_APPLICATION org-wide; under offered, those offered to it, waiting for deployment accept. |
deployment get DEPLOYMENT |
GET /deployments/{id} |
Its name, its owner’s kind and name, the release each app it offers runs; public, so without a session DEPLOYMENT is an id. |
deployment create NAME --owner account|account:ID|org:ID [--dev-passkey FILE] |
POST /deployments |
Create one owned by this account (account), or by an organization where it holds MANAGE_APPLICATION and which holds a recovery key (409 RECOVERY_KEY_REQUIRED otherwise). Answers its id and frontend host. |
deployment delete DEPLOYMENT [--dev-passkey FILE] (rm) |
DELETE /deployments/{id} |
Delete one that offers nothing. |
deployment transfer DEPLOYMENT --to account:ID|org:ID [--dev-passkey FILE] |
POST /deployments/{id}/transfer |
Offer it to another owner, who accepts within 7 days. One offer waits at a time. |
deployment accept ID --to account|account:ID|org:ID [--dev-passkey FILE] |
POST /deployments/{id}/transfer/accept |
Accept a deployment offered to this account or to an organization where it holds MANAGE_APPLICATION (with a recovery key, a deployer grant of its own and the use of every release it offers). The previous owner’s secret values are dropped. |
deployment cancel-transfer DEPLOYMENT [--dev-passkey FILE] |
DELETE /deployments/{id}/transfer |
Drop the waiting offer, from either side. |
deployment offer DEPLOYMENT APP VERSION [--package P] [--dev-passkey FILE] |
POST /deployments/{id}/apps |
Offer an installed release under the app name APP (meroctl app release installs it): new instances get it, and the instances made from the deployment are offered it as their update, which each owner approves. --package is required for an app the deployment does not offer yet; after that it defaults to the one it offers. |
deployment withdraw DEPLOYMENT APP [--dev-passkey FILE] |
DELETE /deployments/{id}/apps/{app} |
Stop offering an app; refused while an instance made from the deployment runs it. |
deployment secret list DEPLOYMENT (ls) |
GET /deployments/{id}/secrets |
Each secret its offered releases (or the releases they use) declare, or it holds: set, and when set its fingerprint, setBy and setAt. Never a value. |
deployment secret set DEPLOYMENT NAME [--dev-passkey FILE] |
PUT /deployments/{id}/secrets/{name} |
Set the value every instance made from it uses unless it set its own. The value is read from stdin (one trailing newline dropped: printf %s "$KEY" | meroctl ... or < key.txt), or typed at a prompt that does not echo it; it is never an argument, never printed, and the answer carries its fingerprint only. |
deployment secret clear DEPLOYMENT NAME [--dev-passkey FILE] (rm) |
DELETE /deployments/{id}/secrets/{name} |
Remove its value: the instances fall back to the operator’s. |
deployment orgs DEPLOYMENT |
GET /deployments/{id}/orgs |
The customer organizations with instances made from it: how many, the releases they run, memberCount and activeMembers30d; never who. |
deployment usage DEPLOYMENT --by org [--csv] |
GET /deployments/{id}/orgs |
The same per customer organization, as JSON or, with --csv, one row each (org_id,name,instances,members,active_members_30d,releases,first_created_at; a name a spreadsheet would run as a formula is prefixed with '). The node meters fuel and writes per developer (the deployment’s owner, over all its deployments, today only: account usage, GET /orgs/{org}/usage), not per customer organization, so this is counts, not metered use; --since is refused as not supported by the node yet. |
registry
Section titled “registry”The app registry app publish publishes to (--registry, CALIMERO_REGISTRY_URL,
default https://apps.calimero.network; https://, or http:// to loopback
only). Every read is the registry’s GET /api/bundles, the listing its website
browses, asked fresh=1 so a release just published is seen. The registry has
no search route: search filters the listing here, as the website does. With
an API key (--api-key, CALIMERO_REGISTRY_API_KEY, else the one registry login saved for the registry) every request carries it as a bearer token and
asks include_private=1, so your organizations’ private packages are listed
too; without one, they are hidden. No node.
| Command | Route | Meaning |
|---|---|---|
registry login [--api-key KEY] |
GET /api/bundles?mine=1 |
Check a registry API key (the registry’s Organizations page, CLI Access; from --api-key, stdin, or a prompt that does not echo it) and save it for this registry in {home}/meroctl/registry.json (mode 0600). The registry commands, app publish, app release --publish and a version-less package install then use it. A key the registry refuses is not saved. |
registry logout |
Forget the saved key for this registry. | |
registry list [--mine] (ls) |
GET /api/bundles |
Every package with its latest version that is not yanked: package, version, name, description, author, category, tags, downloads, verified, visibility, publishedAt. --mine (?mine=1) only the packages you own, which needs a key. |
registry search TERM... [--category C] [--mine] |
GET /api/bundles |
The packages whose id, name, tags, category, author or description hold every word of TERM, case-insensitive; the package id ranks first, then the name, the tags and category, the author and description. |
registry versions PACKAGE |
GET /api/bundles?package=P&all_versions=true |
Every published version, newest first by semver, each with yanked, publishedAt and minRuntimeVersion; latest is the newest not yanked. |
registry get PACKAGE[@VERSION] |
GET /api/bundles?package=P[&version=V] |
One release’s manifest as the registry lists it (with downloads, verified, yanked); without a version, the latest not yanked. |
A development cluster on this machine: merod local (mock attestation, a
development storage key; never for real data) in the background, its state
under --dir (default {home}/meroctl/local, ~/.calimero/meroctl/local, the
same from any directory) kept across restarts. down and status also find a
cluster an older meroctl started in ./.merod-local.
| Command | Meaning |
|---|---|
local up [--nodes N] [--base-port P] [--dir DIR] [--fresh] [--local] [--image IMG] [--registry-url URL] |
Start the cluster (one node unless --nodes; node i on 127.0.0.1:P+i, from 2501) and wait until it serves, then save it as the node local (mock quotes trusted), the default when there is none. It runs in the release’s image (ghcr.io/calimero-network/merod:<release>, merod local --bind 0.0.0.0 with its ports published on 127.0.0.1 and its state in a Docker volume named after DIR; macOS and Linux), so Docker must be installed and running; --local (or MEROD) runs the merod on PATH (or in MEROD) instead. Its log is DIR/merod.log; it prints the URLs and the ops token. A cluster already running from DIR is answered as is. The cluster installs packages from --registry-url (MEROD_REGISTRY_URL; default the public registry, https://apps.calimero.network; empty for none), so package install PACKAGE@VERSION works on it. |
local down [--dir DIR] |
Stop it; its state stays for the next up. |
local status [--dir DIR] |
Whether it runs, its URLs and ops token. |
local dev [DIR] [--no-frontend] [cluster flags] |
Develop an app (DIR holds logic/ and app/, as app new lays it out, or is the crate): start the cluster unless it runs, sign up a deployer, build the crate and upload it as a raw bundle, write DIR/app/.env.development.local (VITE_CALIMERO_TARGET, VITE_CALIMERO_NODES, VITE_CALIMERO_BUNDLE), run the frontend’s dev server on http://localhost:5173 (pnpm dev, the origin the cluster trusts), then rebuild and upload on every save. Ctrl-C stops the frontend, and the cluster when dev started it. |
local test [DIR] [-- CARGO_ARGS] |
cargo test of the app’s crate, which runs every scenarios/*.json on core’s engine (the apps template’s harness). |
local compute run COMPONENT --method M [--args JSON|@FILE] [--input FILE]... --out DIR [--seed HEX] [--twice] |
Run one compute method of a compute component alone, with the engine, caps and determinism of a job node and plain files in place of sealed ones; --twice fails if two runs differ (crates/meroctl/compute/README.md). |
local dev’s predecessor, for a build you push yourself.
| Command | Meaning |
|---|---|
dev start --path FILE --dev-passkey FILE [--name NAME] [-p JSON] [-w] [--org ORG] |
Install a build (.mpk, or a development .wasm) for --org (default: your only organization), create an instance from it there (--name, default dev; --params for init) and, with --watch, push every later save to it. |
dev watch --path FILE --dev-passkey FILE [-i INSTANCE]... [--once] [--interval-ms MS] [--org ORG] |
package watch under another name. |
network
Section titled “network”| Command | Route | Meaning |
|---|---|---|
network status |
GET /health |
This node’s id, its release, and who leads the system group. |
The operator’s commands. Every one needs --ops-token (or
CALIMERO_OPS_TOKEN). The Ops API has no read path into apps’ data. Decisions
the deployment gave the operator are made here, signed with
--operator-key-file (Operator); the
node answers 403 for the others.
| Command | Route | Meaning |
|---|---|---|
ops cluster |
GET /ops/cluster |
The cluster’s name and identity key (hex), which merod run --job-node --cluster-identity takes. |
ops status |
GET /ops/status |
This node, the system group’s and hosted groups’ Raft status, governance, fleet and counts. |
ops metrics |
GET /ops/metrics |
Prometheus text. |
ops placement |
GET /ops/placement |
Each instance’s app group and replica node ids, each node’s zone, release and instance count. Ids and counts only. |
ops add-node ID ADDR [--zone Z] [--role replica|job] [--pool P] |
POST /ops/nodes |
Register a node so the system group admits it as a learner (and a voter while fewer than 3 voters are left). ADDR is its URL. --role job registers a job node (merod run --job-node): it is never admitted, placed or sent the cluster key. A node’s role is fixed until it is removed. |
ops remove-node ID |
DELETE /ops/nodes/{id} |
Remove a node no app keeps a replica on; run against the system leader. |
ops move INSTANCE --replicas ID,... |
POST /ops/apps/{app}/replicas |
Move an instance to these replica node ids. A follower answers 421 NOT_LEADER; meroctl retries at the leader it names. The set it already has answers unchanged: true; another move of it running, 409 MOVE_IN_PROGRESS. |
ops backup [--all] |
POST /ops/backup[?all=true] |
Write sealed snapshots, into the node’s --backup-dir, of the instances this node leads now and of the system group when it leads it; --all: every group it holds, leader or not (a survivor of a lost majority). |
ops restore INSTANCE [--backup NAME] |
POST /ops/apps/{app}/restore |
Restore an instance from a sealed backup in this node’s --backup-dir ({backup-dir}/{app}/{name}, the newest without --backup); this node seeds it and becomes its first replica, and what the instance wrote after the backup is lost. Signed. |
ops restore INSTANCE --recovery-key-file FILE [--recovery-file NAME] |
GET /ops/recovery-files, then POST /ops/apps/{app}/restore { recovery } |
Restore it from the node’s recovery disk (--recover-from, else --recovery-dir) with the operator’s backup key: meroctl checks each file’s signature and attestation, opens the file’s data key on this machine and sends only that. The instance’s newest file without --recovery-file. Signed. |
ops backup-key [--public-key HEX] |
GET, POST /ops/backup-key |
The operator’s backup key ({ holder, key, apps }), or set it (64 hex, an X25519 public key; signed): every instance’s recovery-disk files are sealed to it where the operator upgrades apps. |
ops recovery-keygen --out FILE |
none (local) | Make a backup key pair: the private half (hex) into FILE (mode 0600; keep it off every node), the public half printed as publicKey for ops backup-key --public-key. |
ops recover --key-file FILE |
GET /ops/recovery-files, POST /ops/recover |
Found the cluster again from its recovery disk, on a founder started with merod run --bootstrap --recover-from DIR: the newest system file and every code file in DIR/operator/, each checked and opened on this machine with the backup key. Then ops restore INSTANCE --recovery-key-file each instance. |
ops quotas |
GET /ops/quotas |
The per-account quotas. |
ops set-quotas JSON |
POST /ops/quotas |
Replace them. |
ops pools |
GET /ops/pools |
The compute pools and the runs each takes at once. |
ops set-pools JSON |
POST /ops/pools |
Set the pools, { name: { runsPerNode, maxMemoryMib } }; a job node joins one with add-node --pool. |
ops prices |
GET /ops/prices |
The price table, {} until one is set. |
ops set-prices JSON |
POST /ops/prices |
Set it, { version, fuelPerVcpuSecond, vcpuSecond, gibSecond, connectorGib, storageGibMonth, egressGib } in micro-units; the version must be the current one plus one. |
ops release VERSION [--withdraw] |
POST /ops/releases |
Approve (or withdraw) a mero-tee release for every app, where the operator holds release approvals. |
ops outbound --package P [--prefix URL]... [--replace] |
POST /ops/outbound |
Approve outbound prefixes cluster-wide, where the operator holds outbound approvals. |
ops packages |
GET /ops/packages |
The packages the operator installed (not the accounts’). |
ops install PACKAGE[@VERSION] [--version V] / ops install --path FILE |
POST /ops/packages/install, POST /ops/packages |
Install a release for the operator’s upgrades, from the registry or a signed .mpk. |
ops uninstall PACKAGE [--version V] |
DELETE /ops/packages/{package}[/{version}] |
Uninstall what the operator installed. |
ops upgrade INSTANCE [--version V] [--package P] [--service S] [--bundle HASH] [--migrate EXPORT] |
POST /ops/apps/{app}/upgrade |
Update an instance to an installed release, where the operator holds app upgrades. |
ops upgrade-org ORG --package P --version V [--team TEAM [--cascade]] [--migrate EXPORT] |
POST /ops/orgs/{org}/upgrade |
Update an organization’s instances (or one team’s) to a release; follow it with team upgrade status. |
meroctl [--node ALIAS|URL] proxy [--listen 127.0.0.1:2580] [--allow-remote] [--openapi FILE]Serves the node’s API as plain HTTP on this machine, for curl, scripts and
clients generated from the node API’s OpenAPI document (node API): every
request is sent to the node through the same attested, sealed client every
other command uses, so it attests the node with the same --allow-mock,
--tee-profiles and --min-release, before it takes any request. Method, path,
query, headers and body go to the node as they came; the node’s status, headers
and body come back as they come, and an event stream (/apps/{app}/events,
/apps/{app}/presence/stream) stays a stream. A refusal is the node’s own
({ error, message, details }), a 412 CONFIRM_REQUIRED included: the caller
signs the challenge and sends the request again with confirm. On start it
prints one JSON line, { "listening": "http://127.0.0.1:2580", "node": URL },
and one line per request on stderr (method, path, status).
| Flag | Default | Meaning |
|---|---|---|
--listen ADDR |
127.0.0.1:2580 |
Where to serve (:0 picks a free port). A non-loopback address is refused without --allow-remote. |
--allow-remote |
off | Serve on a non-loopback address and take requests for any Host, with a warning: anyone who reaches the port acts as you. |
--openapi FILE |
none | Serve this document at GET /openapi.json. Without it, the node’s own if it serves one, else 404 with a note. Either way servers is set to the proxy. |
Which credential a request carries: its own Authorization, passed through as
given and never refreshed; else --api-key; else the session login saved for
the node, refreshed on a 401 and saved again; else none.
What it refuses, because it holds your credential:
- a
Hostthat is notlocalhostor a loopback address (DNS rebinding), unless--allow-remote:403 HOST_REFUSED; - a request a browser sent for a web page (it carries
Origin, orSec-Fetch-Siteother thannone), since any page you open could otherwise act as you:403 BROWSER_REFUSED. The proxy sends no CORS headers; - a body over 64 MiB, the sealed envelope’s cap:
413 TOO_LARGE; - a request when the node cannot be reached, attested or understood:
502 UPSTREAM, and nothing is sent in the clear.
It never logs a header, a query or a body. See Use any HTTP tool.
meroctl raw METHOD PATH [BODY] [--dev-passkey FILE]Any API route, through the same attested, sealed client. METHOD is get,
post, put or delete; BODY is JSON (default {} for post and put).
Use it for what no command covers, such as POST /auth/apikeys with
methods or allowConfirm. With --dev-passkey FILE (development
clusters) it answers a 412 CONFIRM_REQUIRED on a post, put or delete with
that passkey and sends the request again; without it, the 412 is printed. It
does not sign operator decisions (428 OPERATOR_SIGNATURE_REQUIRED): use the
ops command. See the node API reference.
meroctl raw get /auth/memeroctl raw post /auth/apikeys '{"label":"ci","methods":["get"],"readOnly":true}' --dev-passkey ./dev-passkey.jsonmeroctl raw delete /auth/aliases/notesExample session
Section titled “Example session”From an empty directory to a call, then a release:
meroctl app new my-app && cd my-apppnpm installmeroctl local dev apps/kv-store # cluster, build, upload, frontend on :5173By hand, against the same cluster:
meroctl local up # saves the node `local`, the defaultmeroctl login --dev-passkey ./dev-passkey.json --name adameroctl app pack apps/kv-store/logic --app-version 0.1.0 --out kv-store.mpkmeroctl package install --path ./kv-store.mpkmeroctl instance create --package com.calimero.kv-store --name notes --alias notesmeroctl call -i notes set --args '{"key":"a","value":"1"}'meroctl call -i notes get --args '{"key":"a"}' --viewmeroctl --ops-token "$TOKEN" ops status # the token `local up` printedmeroctl local downA release:
meroctl app signer new release.key # once; keep it safemeroctl app pack apps/kv-store/logic --key release.key --previous last.mpk --out release.mpkmeroctl app check --mpk release.mpk --against last.mpk --fail-on egress # what users will seemeroctl app publish release.mpk --public # CALIMERO_REGISTRY_API_KEYThe same in one step, installed on the cluster and offered to customers:
meroctl app release apps/kv-store/logic --version 1.4.0 --key release.key --publishmeroctl deployment create acme-apps --owner org:<org-id> # oncemeroctl deployment offer acme-apps notes 1.4.0 --package com.calimero.kv-storemeroctl deployment secret set acme-apps NEAR_AI_API_KEY < near-ai.keymeroctl deployment usage acme-apps --by org --csv > customers.csv