@calimero-network/agent-skills 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/README.md +137 -17
  2. package/SKILL.md +31 -23
  3. package/package.json +2 -2
  4. package/scripts/install.js +3 -3
  5. package/scripts/test.js +6 -15
  6. package/skills/calimero-abi-codegen/SKILL.md +121 -22
  7. package/skills/calimero-abi-codegen/references/abi-format.md +3 -5
  8. package/skills/calimero-abi-codegen/references/generated-output.md +12 -4
  9. package/skills/calimero-abi-codegen/rules/schema-version.md +11 -4
  10. package/skills/calimero-abi-codegen/rules/unique-names.md +2 -6
  11. package/skills/calimero-client-js/SKILL.md +127 -22
  12. package/skills/calimero-client-js/references/auth.md +18 -10
  13. package/skills/calimero-client-js/references/rpc-calls.md +15 -21
  14. package/skills/calimero-client-js/references/sso.md +9 -9
  15. package/skills/calimero-client-js/references/websocket-events.md +73 -59
  16. package/skills/calimero-client-js/rules/camelcase-api.md +10 -7
  17. package/skills/calimero-client-js/rules/token-refresh.md +59 -21
  18. package/skills/calimero-client-py/SKILL.md +26 -10
  19. package/skills/calimero-client-py/references/api.md +41 -43
  20. package/skills/calimero-client-py/references/auth.md +7 -7
  21. package/skills/calimero-client-py/rules/async-usage.md +27 -31
  22. package/skills/calimero-client-py/rules/stable-node-name.md +7 -7
  23. package/skills/calimero-core/SKILL.md +135 -0
  24. package/skills/calimero-core/references/architecture.md +101 -0
  25. package/skills/calimero-core/references/jsonrpc-protocol.md +192 -0
  26. package/skills/calimero-core/references/namespaces-groups.md +94 -0
  27. package/skills/calimero-core/references/storage-types.md +118 -0
  28. package/skills/calimero-core/references/websocket-events.md +142 -0
  29. package/skills/calimero-core/rules/context-is-not-app.md +35 -0
  30. package/skills/calimero-core/rules/crdt-types-only.md +55 -0
  31. package/skills/calimero-desktop/SKILL.md +25 -14
  32. package/skills/calimero-desktop/references/sso-integration.md +49 -22
  33. package/skills/calimero-desktop/rules/sso-fallback.md +3 -2
  34. package/skills/calimero-merobox/SKILL.md +255 -28
  35. package/skills/calimero-merobox/references/ci-integration.md +3 -2
  36. package/skills/calimero-merobox/references/workflow-files.md +7 -5
  37. package/skills/calimero-merobox/rules/docker-required.md +7 -6
  38. package/skills/calimero-meroctl/SKILL.md +68 -0
  39. package/skills/calimero-meroctl/references/commands.md +177 -0
  40. package/skills/calimero-meroctl/references/scripting.md +80 -0
  41. package/skills/calimero-meroctl/rules/call-view-flag.md +28 -0
  42. package/skills/calimero-meroctl/rules/register-node-once.md +34 -0
  43. package/skills/calimero-merod/SKILL.md +49 -0
  44. package/skills/calimero-merod/references/health-endpoints.md +90 -0
  45. package/skills/calimero-merod/references/init-flags.md +84 -0
  46. package/skills/calimero-merod/rules/init-before-run.md +40 -0
  47. package/skills/calimero-merod/rules/port-assignments.md +33 -0
  48. package/skills/calimero-node/SKILL.md +52 -35
  49. package/skills/calimero-node/references/context-lifecycle.md +34 -17
  50. package/skills/calimero-node/references/meroctl-commands.md +89 -99
  51. package/skills/calimero-node/rules/app-vs-context.md +4 -4
  52. package/skills/calimero-registry/SKILL.md +110 -31
  53. package/skills/calimero-registry/references/bundle-and-push.md +99 -34
  54. package/skills/calimero-registry/references/manifest-format.md +56 -35
  55. package/skills/calimero-registry/references/mero-sign.md +10 -9
  56. package/skills/calimero-registry/rules/key-security.md +3 -2
  57. package/skills/calimero-registry/rules/sign-before-pack.md +5 -5
  58. package/skills/calimero-rust-sdk/SKILL.md +154 -44
  59. package/skills/calimero-rust-sdk/references/blob-api.md +119 -0
  60. package/skills/calimero-rust-sdk/references/event-handlers.md +122 -0
  61. package/skills/calimero-rust-sdk/references/events.md +2 -1
  62. package/skills/calimero-rust-sdk/references/examples.md +81 -29
  63. package/skills/calimero-rust-sdk/references/migrations.md +123 -0
  64. package/skills/calimero-rust-sdk/references/nested-crdts.md +113 -0
  65. package/skills/calimero-rust-sdk/references/private-storage.md +76 -34
  66. package/skills/calimero-rust-sdk/references/state-collections.md +106 -21
  67. package/skills/calimero-rust-sdk/references/user-and-frozen-storage.md +169 -0
  68. package/skills/calimero-rust-sdk/rules/app-macro-placement.md +5 -2
  69. package/skills/calimero-rust-sdk/rules/no-std-collections.md +5 -2
  70. package/skills/calimero-rust-sdk/rules/state-derives.md +45 -0
  71. package/skills/calimero-rust-sdk/rules/wasm-constraints.md +12 -10
  72. package/skills/calimero-sdk-js/SKILL.md +145 -0
  73. package/skills/calimero-sdk-js/references/build-pipeline.md +98 -0
  74. package/skills/calimero-sdk-js/references/collections.md +132 -0
  75. package/skills/calimero-sdk-js/references/events.md +63 -0
  76. package/skills/calimero-sdk-js/rules/crdt-only-state.md +47 -0
  77. package/skills/calimero-sdk-js/rules/no-console-log.md +38 -0
  78. package/skills/calimero-sdk-js/rules/view-decorator.md +48 -0
@@ -5,17 +5,39 @@ Full CLI for managing a running Calimero node.
5
5
  ## Global flags
6
6
 
7
7
  ```bash
8
- meroctl --node-url http://localhost:2428 <command> # connect to specific node
9
- meroctl --home ~/.calimero <command> # alternate config path
8
+ meroctl --node node1 <command> # use registered node by name
9
+ meroctl --api http://localhost:2428 <command> # connect directly by URL
10
+ meroctl --home ~/.calimero <command> # alternate config path
11
+ ```
12
+
13
+ Register a node once, then use by name:
14
+
15
+ ```bash
16
+ meroctl node add node1 /path/to/home # local node
17
+ meroctl node add mynode http://node.com # remote node
18
+ meroctl node use node1 # set as active (default)
10
19
  ```
11
20
 
12
21
  ---
13
22
 
14
- ## Node commands
23
+ ## Node management commands
15
24
 
16
25
  ```bash
17
- # Check node health (returns "alive" when running)
18
- meroctl --node-url http://localhost:2428 node health
26
+ # Add / connect to a node
27
+ meroctl node add node1 /path/to/calimero/home
28
+ meroctl node add remote1 http://node.example.com
29
+
30
+ # Set active node
31
+ meroctl node use node1
32
+
33
+ # List configured nodes
34
+ meroctl node ls
35
+
36
+ # Remove a node connection
37
+ meroctl node remove node1
38
+
39
+ # Show node peer identity
40
+ meroctl node identity
19
41
  ```
20
42
 
21
43
  ---
@@ -23,22 +45,22 @@ meroctl --node-url http://localhost:2428 node health
23
45
  ## App commands
24
46
 
25
47
  ```bash
26
- # Install app from local bundle (.mpk or .wasm)
27
- meroctl --node-url http://localhost:2428 app install --path myapp.mpk
28
- meroctl --node-url http://localhost:2428 app install --path target/wasm32-unknown-unknown/release/myapp.wasm
48
+ # Install app from local file (.wasm or .mpk)
49
+ meroctl --node node1 app install --path myapp.wasm
50
+ meroctl --node node1 app install --path myapp.mpk
29
51
 
30
52
  # Install app from registry URL
31
- meroctl --node-url http://localhost:2428 app install \
32
- --url https://registry.calimero.network/com.yourorg.myapp/1.0.0
53
+ meroctl --node node1 app install \
54
+ --url https://apps.calimero.network/com.yourorg.myapp/1.0.0
33
55
 
34
56
  # List installed apps
35
- meroctl --node-url http://localhost:2428 app ls
57
+ meroctl --node node1 app ls
36
58
 
37
59
  # Get details of a specific app
38
- meroctl --node-url http://localhost:2428 app get <app-id>
60
+ meroctl --node node1 app get <application-id>
39
61
 
40
- # Remove an app (only works if no active contexts reference it)
41
- meroctl --node-url http://localhost:2428 app remove <app-id>
62
+ # Remove an app
63
+ meroctl --node node1 app remove <application-id>
42
64
  ```
43
65
 
44
66
  ---
@@ -47,44 +69,23 @@ meroctl --node-url http://localhost:2428 app remove <app-id>
47
69
 
48
70
  ```bash
49
71
  # Create a context (instantiates the app — calls init())
50
- meroctl --node-url http://localhost:2428 context create --app-id <app-id>
72
+ meroctl --node node1 context create --application-id <application-id>
51
73
  # Returns: context-id
52
74
 
75
+ # Dev mode — watch a WASM file for changes and hot-reload
76
+ meroctl --node node1 context create --watch path/to/app.wasm
77
+
53
78
  # List all contexts on this node
54
- meroctl --node-url http://localhost:2428 context ls
79
+ meroctl --node node1 context ls
55
80
 
56
81
  # Get details of a specific context
57
- meroctl --node-url http://localhost:2428 context get <context-id>
58
-
59
- # Delete a context (wipes all state and storage for this context)
60
- meroctl --node-url http://localhost:2428 context delete <context-id>
82
+ meroctl --node node1 context get <context-id>
61
83
 
62
- # List members of a context
63
- meroctl --node-url http://localhost:2428 context members <context-id>
84
+ # Delete a context (wipes all state and storage)
85
+ meroctl --node node1 context delete <context-id>
64
86
 
65
- # Invite a member to a context (generates an invitation payload)
66
- meroctl --node-url http://localhost:2428 context invite \
67
- <context-id> --identity <identity>
68
- # Returns: invitation payload JSON — share this with the invitee
69
-
70
- # Join a context using an invitation payload (run on the joining node)
71
- meroctl --node-url http://localhost:2428 context join \
72
- --invitation '<invitation-payload-json>'
73
- # After this, the node syncs state from the inviting node
74
- ```
75
-
76
- ### Full invite + join example
77
-
78
- ```bash
79
- # ── Node A (inviter) ──
80
- meroctl --node-url http://localhost:2428 context invite \
81
- abc123ctx --identity ed25519:AAAA...
82
- # Prints: {"payload":"..."}
83
-
84
- # ── Node B (joiner) ──
85
- meroctl --node-url http://localhost:2429 context join \
86
- --invitation '{"payload":"..."}'
87
- # Node B now participates in the context and syncs CRDT state
87
+ # Sync a context with peers
88
+ meroctl --node node1 context sync <context-id>
88
89
  ```
89
90
 
90
91
  ---
@@ -92,16 +93,16 @@ meroctl --node-url http://localhost:2429 context join \
92
93
  ## Calling app methods
93
94
 
94
95
  ```bash
95
- # Mutation — changes shared state (no --view flag)
96
- meroctl --node-url http://localhost:2428 call <context-id> <method> \
96
+ # Mutation — changes shared state
97
+ meroctl --node node1 call <context-id> set \
97
98
  --args '{"key":"hello","value":"world"}'
98
99
 
99
100
  # View — read-only, does NOT change state
100
- meroctl --node-url http://localhost:2428 call <context-id> <method> \
101
+ meroctl --node node1 call <context-id> get \
101
102
  --args '{"key":"hello"}' --view
102
103
 
103
104
  # Method with no arguments
104
- meroctl --node-url http://localhost:2428 call <context-id> list_all \
105
+ meroctl --node node1 call <context-id> list_all \
105
106
  --args '{}' --view
106
107
  ```
107
108
 
@@ -110,74 +111,63 @@ meroctl --node-url http://localhost:2428 call <context-id> list_all \
110
111
  ## Identity commands
111
112
 
112
113
  ```bash
113
- # Create a new identity (root keypair for this node)
114
- meroctl --node-url http://localhost:2428 identity create
114
+ # Create a new identity
115
+ meroctl --node node1 identity create
115
116
 
116
- # List all identities on this node
117
- meroctl --node-url http://localhost:2428 identity ls
117
+ # List all identities
118
+ meroctl --node node1 identity ls
118
119
 
119
120
  # Get details of a specific identity
120
- meroctl --node-url http://localhost:2428 identity get <identity>
121
+ meroctl --node node1 identity get <identity>
121
122
  ```
122
123
 
123
124
  ---
124
125
 
125
- ## Step-by-step: full local development flow
126
+ ## Multi-node context sharing (namespace + group model)
126
127
 
127
- ```bash
128
- # 1. Build the WASM app
129
- cargo build --target wasm32-unknown-unknown --release
128
+ Multi-node participation uses namespaces (root groups) and group membership.
130
129
 
131
- # 2. Start the node (in a separate terminal)
132
- merod --home ~/.calimero run
130
+ ```bash
131
+ # ── Node A: create a namespace and context ──
132
+ meroctl --node node1 namespace create
133
+ # → <namespace-id>
133
134
 
134
- # 3. Install the app
135
- meroctl --node-url http://localhost:2428 app install \
136
- --path target/wasm32-unknown-unknown/release/myapp.wasm
137
- # Copy the app-id from output
135
+ meroctl --node node1 context create --application-id <app-id>
136
+ # → <context-id>
138
137
 
139
- # 4. Create a context
140
- meroctl --node-url http://localhost:2428 context create --app-id <app-id>
141
- # Copy the context-id from output
138
+ # Generate an invitation for another node to join
139
+ meroctl --node node1 namespace invite <namespace-id>
140
+ # invitation JSON payload
142
141
 
143
- # 5. Interact with the app
144
- meroctl --node-url http://localhost:2428 call <context-id> set \
145
- --args '{"key":"foo","value":"bar"}'
142
+ # ── Node B: join via invitation ──
143
+ meroctl --node node2 namespace join <namespace-id> '<invitation-json>'
146
144
 
147
- meroctl --node-url http://localhost:2428 call <context-id> get \
148
- --args '{"key":"foo"}' --view
145
+ # ── Node B: join the context (after joining namespace/group) ──
146
+ meroctl --node node2 group join-context <context-id>
149
147
  ```
150
148
 
151
149
  ---
152
150
 
153
- ## Step-by-step: multi-node context sharing
151
+ ## Step-by-step: full local development flow
154
152
 
155
153
  ```bash
156
- # ── Node A (port 2428) ──
157
- # Install app and create context
158
- meroctl --node-url http://localhost:2428 app install --path myapp.mpk
159
- meroctl --node-url http://localhost:2428 context create --app-id <app-id>
160
- # <context-id>
154
+ # 1. Initialize and start a node
155
+ merod --node node1 init --server-port 2428 --swarm-port 2528
156
+ merod --node node1 run & # run in background
157
+
158
+ # 2. Register the node in meroctl
159
+ meroctl node add node1 ~/.calimero/node1
160
+ meroctl node use node1
161
+
162
+ # 3. Install the app
163
+ meroctl app install --path target/wasm32-unknown-unknown/release/myapp.wasm
164
+ # → copy the application-id
161
165
 
162
- # Create identity for node B to use
163
- meroctl --node-url http://localhost:2428 identity create
164
- # → <identity-b>
165
-
166
- # Generate invitation
167
- meroctl --node-url http://localhost:2428 context invite \
168
- <context-id> --identity <identity-b>
169
- # → <invitation-payload>
170
-
171
- # ── Node B (port 2429) ──
172
- # Accept invitation
173
- meroctl --node-url http://localhost:2429 context join \
174
- --invitation '<invitation-payload>'
175
- # Node B syncs all existing state from node A
176
-
177
- # Both nodes can now call methods and see each other's mutations:
178
- meroctl --node-url http://localhost:2428 call <context-id> set \
179
- --args '{"key":"shared","value":"data"}'
180
- meroctl --node-url http://localhost:2429 call <context-id> get \
181
- --args '{"key":"shared"}' --view
182
- # → "data" (synced from node A)
166
+ # 4. Create a context
167
+ meroctl context create --application-id <application-id>
168
+ # → copy the context-id
169
+
170
+ # 5. Interact with the app
171
+ meroctl call <context-id> set --args '{"key":"foo","value":"bar"}'
172
+ meroctl call <context-id> get --args '{"key":"foo"}' --view
183
173
  ```
@@ -26,8 +26,8 @@ meroctl call <context-id> get --args '{"key":"hello"}' --view
26
26
 
27
27
  ## Why this matters
28
28
 
29
- API calls take a `context-id`, not an `app-id`. If you try to call a method with an
30
- `app-id` instead of a `context-id` you will get a "context not found" error.
29
+ API calls take a `context-id`, not an `app-id`. If you try to call a method with an `app-id` instead
30
+ of a `context-id` you will get a "context not found" error.
31
31
 
32
- One app can have multiple independent contexts — each with its own members and state.
33
- For example, a chat app might have one context per chat room.
32
+ One app can have multiple independent contexts — each with its own members and state. For example, a
33
+ chat app might have one context per chat room.
@@ -1,51 +1,130 @@
1
1
  # calimero-registry — Agent Instructions
2
2
 
3
- You are helping a developer **sign and publish a Calimero app bundle** to the App Registry.
3
+ You are helping a developer **build and publish a Calimero app bundle** to the App Registry.
4
4
 
5
- ## Two tools required
5
+ ## Two tools
6
6
 
7
- | Tool | Install | Purpose |
8
- | --- | --- | --- |
9
- | `mero-sign` | `cargo install mero-sign` | Ed25519 key management and manifest signing |
10
- | `calimero-registry` | `npm install -g calimero-registry` | Bundle creation and registry push |
7
+ | Tool | Install | Purpose |
8
+ | ------------------- | ----------------------------------------------- | ----------------------------------------------------------- |
9
+ | `calimero-registry` | `npm install -g @calimero-network/registry-cli` | Bundle creation and registry push |
10
+ | `mero-sign` | `cargo install mero-sign` | Ed25519 key management and manifest signing (for ownership) |
11
11
 
12
- ## Critical: sign BEFORE bundling
12
+ ## Quick workflow
13
13
 
14
- mero-sign operates on `manifest.json` **before** it is packed. The registry verifies the
15
- signature on upload signing after bundling will fail.
14
+ ```bash
15
+ # 1. Install registry CLI
16
+ npm install -g @calimero-network/registry-cli
16
17
 
17
- **Correct order:**
18
- 1. Build WASM
19
- 2. Write `manifest.json`
20
- 3. `mero-sign sign manifest.json --key key.json` ← sign first
21
- 4. `calimero-registry bundle create ...` ← bundle second
22
- 5. `calimero-registry bundle push ...` ← then push
18
+ # 2. Configure registry (one-time)
19
+ calimero-registry config set registry-url https://apps.calimero.network
20
+ calimero-registry config set api-key your-api-key
23
21
 
24
- ## Quick reference
22
+ # 3. Build WASM (your app's build script)
23
+ ./build.sh
25
24
 
26
- ```bash
27
- # 1. Install tools
28
- cargo install mero-sign
29
- npm install -g calimero-registry
25
+ # 4. Create bundle (WASM + metadata → .mpk)
26
+ calimero-registry bundle create \
27
+ --output myapp-1.0.0.mpk \
28
+ --name "My App" \
29
+ --description "Does something useful" \
30
+ --author "Your Name" \
31
+ --frontend "https://my-app.com" \
32
+ --github "https://github.com/yourorg/myapp" \
33
+ path/to/app.wasm \
34
+ com.yourorg.myapp \
35
+ 1.0.0
36
+
37
+ # 5. Push to registry
38
+ calimero-registry bundle push myapp-1.0.0.mpk --remote
39
+ ```
40
+
41
+ ## Signing for ownership (optional but recommended)
42
+
43
+ The registry tracks package ownership via Ed25519 signatures. If you sign the manifest, your key
44
+ becomes the package owner — only your key (or keys in `manifest.owners`) can push future versions.
30
45
 
31
- # 2. Generate signing key (one-time per developer)
46
+ ```bash
47
+ # Generate signing key (one-time)
32
48
  mero-sign generate-key --output my-key.json
33
49
  echo "my-key.json" >> .gitignore
34
50
 
35
- # 3. Sign
36
- mero-sign sign dist/myapp/manifest.json --key my-key.json
51
+ # After bundle create, sign the manifest inside the bundle:
52
+ mero-sign sign path/to/manifest.json --key my-key.json
53
+
54
+ # Then push
55
+ calimero-registry bundle push myapp-1.0.0.mpk --remote
56
+ ```
57
+
58
+ ## Bundle create flags
59
+
60
+ | Flag | Required | Description |
61
+ | ----------------------- | -------- | ------------------------------------------------------ |
62
+ | `<wasm-file>` | Yes | Path to WASM binary (positional) |
63
+ | `[package]` | Yes | Reverse-domain package name (e.g. `com.yourorg.myapp`) |
64
+ | `[version]` | Yes | SemVer version (e.g. `1.0.0`) |
65
+ | `-o, --output <path>` | No | Output `.mpk` filename |
66
+ | `-m, --manifest <path>` | No | Read config from a manifest JSON file |
67
+ | `--name <name>` | No | App display name |
68
+ | `--description <text>` | No | Short description |
69
+ | `--author <name>` | No | Author name |
70
+ | `--frontend <url>` | No | Frontend URL (used by Desktop to open the app) |
71
+ | `--github <url>` | No | Source repository URL |
72
+ | `--docs <url>` | No | Documentation URL |
73
+
74
+ ## Bundle push flags
75
+
76
+ ```bash
77
+ # Push to local registry (default)
78
+ calimero-registry bundle push myapp-1.0.0.mpk --local
37
79
 
38
- # 4. Bundle
80
+ # Push to remote registry (uses config file)
81
+ calimero-registry bundle push myapp-1.0.0.mpk --remote
82
+
83
+ # Override config with flags
84
+ calimero-registry bundle push myapp-1.0.0.mpk \
85
+ --remote \
86
+ --url https://apps.calimero.network \
87
+ --api-key your-api-key
88
+ ```
89
+
90
+ ## Configuration
91
+
92
+ ```bash
93
+ # Set defaults (stored in ~/.calimero-registry/remote-config.json)
94
+ calimero-registry config set registry-url https://apps.calimero.network
95
+ calimero-registry config set api-key your-api-key
96
+ calimero-registry config list
97
+
98
+ # Or use environment variables
99
+ export CALIMERO_REGISTRY_URL=https://apps.calimero.network
100
+ export CALIMERO_API_KEY=your-api-key
101
+ ```
102
+
103
+ ## Package naming rules
104
+
105
+ - Must be reverse-domain format: `com.yourorg.appname`
106
+ - Version must be SemVer without `v` prefix: `1.0.0` not `v1.0.0`
107
+
108
+ ## Updating an existing app (new version)
109
+
110
+ ```bash
39
111
  calimero-registry bundle create \
40
- --output myapp-1.0.0.mpk \
41
- dist/myapp/app.wasm \
42
- com.yourorg.myapp
112
+ --output myapp-1.1.0.mpk \
113
+ --name "My App" \
114
+ path/to/app.wasm \
115
+ com.yourorg.myapp \
116
+ 1.1.0
43
117
 
44
- # 5. Push
45
- calimero-registry bundle push myapp-1.0.0.mpk --key my-key.json
118
+ calimero-registry bundle push myapp-1.1.0.mpk --remote
46
119
  ```
47
120
 
121
+ ## Related skills
122
+
123
+ - **`calimero-rust-sdk`** — building the WASM app that gets published
124
+ - **`calimero-core`** — application/context model and how the registry integrates with node app
125
+ install
126
+
48
127
  ## References
49
128
 
50
- See `references/` for manifest format, signing details, and push workflow.
51
- See `rules/` for hard constraints.
129
+ See `references/` for manifest format, signing details, and push workflow. See `rules/` for hard
130
+ constraints.
@@ -1,16 +1,31 @@
1
1
  # Bundle Create & Push
2
2
 
3
- ## calimero-registry CLI
3
+ ## Install
4
4
 
5
5
  ```bash
6
- npm install -g calimero-registry
6
+ npm install -g @calimero-network/registry-cli
7
7
  # or
8
- pnpm add -g calimero-registry
8
+ pnpm add -g @calimero-network/registry-cli
9
+ ```
10
+
11
+ ## One-time configuration
12
+
13
+ ```bash
14
+ calimero-registry config set registry-url https://apps.calimero.network
15
+ calimero-registry config set api-key your-api-key
16
+ calimero-registry config list
17
+ ```
18
+
19
+ Or use environment variables:
20
+
21
+ ```bash
22
+ export CALIMERO_REGISTRY_URL=https://apps.calimero.network
23
+ export CALIMERO_API_KEY=your-api-key
9
24
  ```
10
25
 
11
26
  ## Bundle create
12
27
 
13
- Packages the signed manifest and WASM binary into a `.mpk` file:
28
+ Creates an `.mpk` bundle from a WASM file:
14
29
 
15
30
  ```bash
16
31
  calimero-registry bundle create \
@@ -18,52 +33,102 @@ calimero-registry bundle create \
18
33
  --name "My App" \
19
34
  --description "Does something useful" \
20
35
  --author "Your Name" \
21
- --frontend "https://my-app-frontend.com" \
22
- --github "https://github.com/yourorg/your-app" \
36
+ --frontend "https://my-app.com" \
37
+ --github "https://github.com/yourorg/myapp" \
23
38
  path/to/app.wasm \
24
- com.yourorg.myapp
39
+ com.yourorg.myapp \
40
+ 1.0.0
25
41
  ```
26
42
 
27
- | Flag | Required | Description |
28
- | --- | --- | --- |
29
- | `--output` | Yes | Output `.mpk` filename |
30
- | `--name` | Yes | App display name |
31
- | `--description` | Yes | Short description |
32
- | `--author` | Yes | Author name |
33
- | `--frontend` | No | Frontend URL (used by Desktop) |
34
- | `--github` | No | Source repository URL |
43
+ Positional arguments: `<wasm-file> [package] [version]`
44
+
45
+ | Flag | Required | Description |
46
+ | ----------------------- | -------- | ------------------------------------------------ |
47
+ | `-o, --output <path>` | No | Output `.mpk` filename |
48
+ | `-m, --manifest <path>` | No | Read metadata from a manifest JSON file |
49
+ | `--name <name>` | No | App display name |
50
+ | `--description <text>` | No | Short description |
51
+ | `--author <name>` | No | Author name |
52
+ | `--frontend <url>` | No | Frontend URL (Desktop uses this to open the app) |
53
+ | `--github <url>` | No | Source repository URL |
54
+ | `--docs <url>` | No | Documentation URL |
35
55
 
36
- The positional args are: `<wasm-path>` `<app-id>` (reverse-domain, e.g. `com.yourorg.appname`).
56
+ After creating, the CLI prints sign instructions:
57
+
58
+ ```text
59
+ 1. Sign the manifest: mero-sign sign <output>/manifest.json --key key.json
60
+ 2. Push the bundle: calimero-registry bundle push <output> --remote
61
+ ```
37
62
 
38
63
  ## Bundle push
39
64
 
40
65
  ```bash
41
- calimero-registry bundle push myapp-1.0.0.mpk --key my-key.json
66
+ # Push to remote registry (uses config file values)
67
+ calimero-registry bundle push myapp-1.0.0.mpk --remote
68
+
69
+ # Push to local registry
70
+ calimero-registry bundle push myapp-1.0.0.mpk --local
71
+
72
+ # Override config
73
+ calimero-registry bundle push myapp-1.0.0.mpk \
74
+ --remote \
75
+ --url https://apps.calimero.network \
76
+ --api-key your-api-key
42
77
  ```
43
78
 
44
- The registry will:
45
- 1. Unpack the `.mpk`
46
- 2. Verify the Ed25519 signature against the manifest
47
- 3. Validate your authenticated email against org membership (if publishing to an org)
48
- 4. Store the bundle and make it discoverable
79
+ ## Full publish workflow
49
80
 
50
- ## On signature mismatch
81
+ ```bash
82
+ # 1. Build WASM
83
+ ./build.sh
51
84
 
52
- If the manifest was modified after signing, the push returns:
53
- ```
54
- 400 invalid_signature
55
- ```
85
+ # 2. Create bundle
86
+ calimero-registry bundle create \
87
+ --output myapp-1.0.0.mpk \
88
+ --name "My App" \
89
+ --frontend "https://my-app.com" \
90
+ path/to/app.wasm \
91
+ com.yourorg.myapp \
92
+ 1.0.0
56
93
 
57
- Re-sign the manifest and recreate the bundle.
94
+ # 3. (Optional) Sign manifest for ownership
95
+ mero-sign sign myapp-1.0.0/manifest.json --key my-key.json
96
+
97
+ # 4. Push
98
+ calimero-registry bundle push myapp-1.0.0.mpk --remote
99
+ ```
58
100
 
59
101
  ## Updating an existing app (new version)
60
102
 
61
103
  ```bash
62
- # Bump version in manifest.json
63
- mero-sign sign dist/myapp-1.1.0/manifest.json --key my-key.json
64
- calimero-registry bundle create --output myapp-1.1.0.mpk ...
65
- calimero-registry bundle push myapp-1.1.0.mpk --key my-key.json
104
+ calimero-registry bundle create \
105
+ --output myapp-1.1.0.mpk \
106
+ --name "My App" \
107
+ path/to/app.wasm \
108
+ com.yourorg.myapp \
109
+ 1.1.0
110
+
111
+ calimero-registry bundle push myapp-1.1.0.mpk --remote
66
112
  ```
67
113
 
68
- The registry accepts any new semver version. The first publisher of an app name becomes
69
- the owner; only org members can push subsequent versions (validated by email).
114
+ ## CI/CD (GitHub Actions)
115
+
116
+ ```yaml
117
+ - name: Install Registry CLI
118
+ run: npm install -g @calimero-network/registry-cli
119
+
120
+ - name: Create Bundle
121
+ run: |
122
+ calimero-registry bundle create \
123
+ --output app-${{ github.event.release.tag_name }}.mpk \
124
+ --name "My Application" \
125
+ ./app.wasm \
126
+ com.yourorg.myapp \
127
+ ${{ github.event.release.tag_name }}
128
+
129
+ - name: Publish Bundle
130
+ env:
131
+ CALIMERO_API_KEY: ${{ secrets.CALIMERO_API_KEY }}
132
+ run: |
133
+ calimero-registry bundle push app-${{ github.event.release.tag_name }}.mpk --remote
134
+ ```