Skip to content

Quickstart

Terminal window
# in core
cargo build -p kv-store --target wasm32-unknown-unknown --profile app-release
cargo run -p merod -- local

merod local starts three nodes on http://127.0.0.1:2501-2503/ in one process, with mock attestation and a development storage key, keeping state in .merod-local/ (--fresh starts over). It prints an Ops token. Browser apps on http://localhost:3000 and http://localhost:5173 may call it (--origins). On macOS, run a node in Docker instead (Install) and use its URL below.

2. Install, create and call from the terminal

Section titled “2. Install, create and call from the terminal”
Terminal window
cargo install --path crates/meroctl
# --allow-mock trusts the local cluster's mock attestation; `node add` keeps it
# for this node only, so it cannot carry over to a real cluster.
meroctl node add local http://127.0.0.1:2501/ --allow-mock
meroctl login --dev-passkey ./dev-passkey.json --name ada
meroctl app install --path target/wasm32-unknown-unknown/app-release/kv_store.wasm # a dev bundle; a signed .mpk installs a package
meroctl context create --bundle <hash> --name kv --alias kv
meroctl call --context kv set --args '{"key":"a","value":"1"}'
meroctl call --context kv get --args '{"key":"a"}' --view
meroctl context watch kv
meroctl account api-key create --context kv --read-only

In meroctl, an app is a signed package, a context an app instance, a namespace an organization, a group one of its teams, account you (each passkey is one of your devices) and ops the operator (glossary). --dev-passkey keeps a passkey in a file, which only a development cluster accepts. Against a real cluster, use an API key made in the console (CALIMERO_API_KEY) and name the images you trust: --tee-profiles <profile> [--min-release <version>]. The release floor defaults to the client’s DEFAULT_MIN_RELEASE, and debug profiles are refused unless you pass --allow-debug-profiles. Install apps there as signed packages (meroctl app install PACKAGE@VERSION); raw bundles are for development clusters.

import { CalimeroClient, browserPasskey } from '@calimero-network/mero-js';
const client = new CalimeroClient({ baseUrl: 'http://127.0.0.1:2501', policy: { allowMock: true } });
await client.signUp(browserPasskey(), 'ada');
const bundle = await client.uploadBundle(wasm);
const app = await client.createApp('kv', bundle, { initArgs: {} });
await client.call(app, 'set', { key: 'a', value: '1' });
for await (const ev of client.events(app)) console.log(ev.kind, ev.data);
from calimero_client_py import CloudClient
client = CloudClient("http://127.0.0.1:2501", allow_mock=True)
client.use_api_key("cal_...")
print(client.view(app_id, "get", {"key": "a"})["result"])

The apps repo’s apps/kv-store/app-cloud is a complete browser frontend (passkey sign-in, a store per user, live events) with a Playwright test that drives a real passkey ceremony through Chromium’s virtual authenticator.