Quickstart
This runs a three-node development cluster on your machine, deploys the key-value example, and calls it. You need a Rust toolchain and a checkout of calimero-network/core.
1. Start a local cluster
Section titled “1. Start a local cluster”# in your core checkoutcargo build -p kv-store --target wasm32-unknown-unknown --profile app-releasecargo run -p merod -- localmerod local starts three nodes on http://127.0.0.1:2501-2503/ in one process, with mock attestation and a
development storage key, and keeps their state in .merod-local/ (--fresh starts over). It prints an operator
token. Browser apps on http://localhost:3000 and http://localhost:5173 may call it.
2. Deploy and call from the terminal
Section titled “2. Deploy and call from the terminal”-
Install
meroctland point it at the local cluster:Terminal window cargo install --path crates/meroctlmeroctl node add local http://127.0.0.1:2501/ --allow-mock -
Sign up. On a development cluster a passkey can live in a file:
Terminal window meroctl login --dev-passkey ./dev-passkey.json --name ada -
Install the app and create an instance of it:
Terminal window meroctl app install --path target/wasm32-unknown-unknown/app-release/kv_store.wasmmeroctl context create --bundle <hash> --name kv --alias kvmeroctlcalls an app instance a context. A raw WASM bundle installs only on a development cluster; a real cluster installs signed packages (meroctl app install PACKAGE@VERSION). -
Call a method, read a view, and watch the instance’s events:
Terminal window meroctl call --context kv set --args '{"key":"a","value":"1"}'meroctl call --context kv get --args '{"key":"a"}' --viewmeroctl context watch kv
3. Call it from code
Section titled “3. Call it from code”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); // a raw WASM module: development clusters onlyconst 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 Client
client = Client("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 repository’s apps/kv-store/app-cloud is a complete browser frontend for this app: passkey sign-in, a store
per user and live events.
- Your first app: write and test your own.
- Package & publish: sign it and publish it to the registry.
- Deploy & instances: run it on Calimero Cloud, one instance per organization.