Skip to content

CLI Reference

Mero DevTools ships two independent CLIs. calimero-abi-codegen (from @calimero-network/abi-codegen) generates a typed client from an ABI manifest; create-mero-app scaffolds a new project from the KV Store reference app.

Parses a WASM-ABI v1 manifest and generates a fully-typed TypeScript client. It runs in one of two modes: code generation (the default) or validation (--validate).

Terminal window
# Install
npm install @calimero-network/abi-codegen
# …or run without installing
npx @calimero-network/abi-codegen -i abi.json -o src/generated
Flag Description Default
-i, --input <file> Input ABI JSON file. abi.json
-o, --output <dir> Output directory for the generated file (created if missing). src
--client-name <Name> Explicit client class name; sanitized to a valid identifier. derived (see below)
--name-from <path> Derive the client name from a file path (e.g. the .wasm file). —
--import-path <path> Import path for the runtime dependency in generated code. @calimero-network/mero-react
--validate Validate the manifest only; generate nothing. Exits 0 on success. —
-h, --help Print usage help. —

When code-generating, the client class name is resolved in strict priority order:

  1. --client-name <Name> — highest priority. Passed through sanitizeClassName: split on non-alphanumeric characters, capitalize the first letter of each part, keep the rest. "Task Board" → TaskBoard, "kv-store" → KvStore, an already-valid TestClient stays TestClient.
  2. --name-from <path> — derived with deriveClientNameFromPath: take the file basename, strip its extension, split on non-alphanumerics, and append Client. Segments of one or two characters are upper-cased whole.
  3. Input basename — falls back to deriving from the -i file name with the same deriveClientNameFromPath rule.
Terminal window
# Generate into src/generated/ (name derived from abi.json → AbiClient)
calimero-abi-codegen -i abi.json -o src/generated
# Explicit client class name
calimero-abi-codegen -i abi.json -o src/generated --client-name TodoClient
# Derive the name from the WASM binary path
calimero-abi-codegen -i abi.json -o src/generated --name-from kv_store.wasm

On a successful generation the tool prints a summary and the path it wrote:

✅ Code generation completed successfully!
📊 Summary:
Methods: 5
Events: 2
Types: 8
Client: TodoClient
📁 Generated files:
/abs/path/src/generated/TodoClient.ts

If the input file does not exist, or the manifest fails validation, the tool prints an error and exits with a non-zero status without writing anything.

Scaffolds a new Calimero application from the KV Store reference app in the calimero-network/apps monorepo.

Terminal window
npx create-mero-app my-app
# …or the npm-init form
npm create mero-app my-app
create-mero-app [project-name] [options]
Argument / flag Description
[project-name] Directory to scaffold into. Omit to use the current directory; its basename must be a valid npm package name.
-t, --template <name> Template to use. rust is the only one, and the default, so this flag is optional.
Name Source Contents
rust calimero-network/apps → apps/kv-store Rust WASM contract + React frontend

The template is a directory inside the apps monorepo, not a repository of its own. The standalone calimero-network/kv-store and calimero-network/kv-store-js repos this CLI used to clone were archived when every app moved into that monorepo.

There is no javascript template. kv-store-js was archived with no replacement — for a JavaScript contract, see the examples in calimero-sdk-js.

  1. Validates the project name as an npm package name; refuses a non-empty existing directory.
  2. Sparse-checks-out apps/kv-store from calimero-network/apps into a temp directory. Cone mode also brings the repo-root files, which the next step needs.
  3. Copies the app into your project, excluding .git, .github, .gitignore, .gitattributes, .gitmodules, and node_modules.
  4. Detaches it from the monorepo — see below.
  5. Writes a project root (package.json, pnpm-workspace.yaml) and a README describing the standalone commands.
  6. Prints next steps: cd, pnpm install, pnpm logic:build, pnpm dev.

An app in apps is deliberately not self-contained: shared versions live at the repo root so one edit moves the whole fleet. Copying the directory alone would produce a project that cannot install and cannot build, so three kinds of inherited reference are resolved against the checkout it came from:

Inherited Resolved from Becomes
"react": "catalog:" pnpm-workspace.yaml the concrete version range
edition.workspace = true root Cargo.toml the concrete value
calimero-sdk.workspace = true root Cargo.toml the pinned git dependency
extends: ../../../tsconfig.base.json root tsconfig.base.json the file, hoisted into the project

Nothing is hardcoded in the CLI: the values come from the commit that was cloned, so a core bump or a frontend release in apps reaches newly scaffolded projects with no change here. The crate also gains its own [workspace] table, without which cargo would search parent directories and either fail or adopt an unrelated workspace above your project.