@calimero-network/registry-cli 1.15.6 โ 1.17.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.
- package/README.md +74 -641
- package/dist/index.js +473 -1247
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,699 +1,132 @@
|
|
|
1
|
-
#
|
|
1
|
+
# calimero-registry
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Command-line access to the Calimero App Registry: organizations, bundle metadata, and a local registry for development.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
> **Building and publishing bundles is not this tool's job.** Use [`cargo mero`](https://github.com/calimero-network/core/tree/master/tools/cargo-mero) - `cargo mero bundle` to build and sign, `cargo mero publish` to upload. See [PUBLISHING.md](../../PUBLISHING.md).
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
- **JSON Output**: Structured JSON output for scripting
|
|
9
|
-
- **Table Format**: Human-readable table output
|
|
10
|
-
- **Color-coded Output**: Syntax highlighting and status indicators
|
|
11
|
-
- **Auto-completion**: Command and option auto-completion
|
|
12
|
-
- **Configuration Management**: Persistent configuration storage
|
|
13
|
-
- **Batch Operations**: Support for bulk operations
|
|
14
|
-
- **Progress Indicators**: Visual progress bars for long operations
|
|
15
|
-
- **๐ Local Registry**: Complete local development environment with file-based storage and artifact serving
|
|
16
|
-
|
|
17
|
-
## ๐ฆ Installation
|
|
18
|
-
|
|
19
|
-
### Global Installation
|
|
7
|
+
## Install
|
|
20
8
|
|
|
21
9
|
```bash
|
|
22
|
-
# Install globally from npm
|
|
23
10
|
npm install -g @calimero-network/registry-cli
|
|
24
|
-
|
|
25
|
-
# Or using pnpm
|
|
26
|
-
pnpm add -g @calimero-network/registry-cli
|
|
27
|
-
|
|
28
|
-
# Or using yarn
|
|
29
|
-
yarn global add @calimero-network/registry-cli
|
|
11
|
+
# or: pnpm add -g @calimero-network/registry-cli
|
|
30
12
|
```
|
|
31
13
|
|
|
32
|
-
|
|
14
|
+
From a clone:
|
|
33
15
|
|
|
34
16
|
```bash
|
|
35
|
-
|
|
36
|
-
git clone https://github.com/calimero-network/app-registry.git
|
|
37
|
-
cd app-registry/packages/cli
|
|
38
|
-
|
|
39
|
-
# Install dependencies
|
|
40
|
-
pnpm install
|
|
41
|
-
|
|
42
|
-
# Build the CLI
|
|
43
|
-
pnpm build
|
|
44
|
-
|
|
45
|
-
# Link locally for development
|
|
46
|
-
pnpm link
|
|
17
|
+
pnpm install && pnpm build && pnpm link
|
|
47
18
|
```
|
|
48
19
|
|
|
49
|
-
##
|
|
20
|
+
## Configuration
|
|
50
21
|
|
|
51
|
-
|
|
22
|
+
Two settings, resolved in this order: command flags, then environment, then the config file at `~/.calimero-registry/remote-config.json`, then the public registry.
|
|
52
23
|
|
|
53
24
|
```bash
|
|
54
|
-
|
|
55
|
-
calimero-registry config set api-
|
|
56
|
-
calimero-registry config set api-key your-api-key
|
|
57
|
-
|
|
58
|
-
# View current configuration
|
|
25
|
+
calimero-registry config set registry-url https://apps.calimero.network
|
|
26
|
+
calimero-registry config set api-key <token>
|
|
59
27
|
calimero-registry config list
|
|
28
|
+
calimero-registry config get registry-url
|
|
29
|
+
calimero-registry config reset [--force]
|
|
60
30
|
```
|
|
61
31
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
calimero-registry config set api-url https://your-api-url.com
|
|
67
|
-
|
|
68
|
-
# Set API key for authentication
|
|
69
|
-
calimero-registry config set api-key your-api-key
|
|
70
|
-
|
|
71
|
-
# Set output format (json, table, yaml)
|
|
72
|
-
calimero-registry config set output-format json
|
|
73
|
-
|
|
74
|
-
# Set default limit for list commands
|
|
75
|
-
calimero-registry config set default-limit 20
|
|
76
|
-
|
|
77
|
-
# Enable/disable color output
|
|
78
|
-
calimero-registry config set color-output true
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
## ๐ Local Registry for Development
|
|
82
|
-
|
|
83
|
-
The CLI now includes a complete local registry for development purposes. This allows you to test app submissions, manage applications, and serve artifacts locally without requiring a remote registry server.
|
|
84
|
-
|
|
85
|
-
### Quick Start with Local Registry
|
|
86
|
-
|
|
87
|
-
```bash
|
|
88
|
-
# Start local registry
|
|
89
|
-
calimero-registry local start
|
|
90
|
-
|
|
91
|
-
# Use local registry with existing commands
|
|
92
|
-
calimero-registry apps list --local
|
|
93
|
-
calimero-registry apps submit manifest.json --local
|
|
94
|
-
calimero-registry health --local
|
|
95
|
-
|
|
96
|
-
# Stop local registry
|
|
97
|
-
calimero-registry local stop
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
### Local Registry Management
|
|
101
|
-
|
|
102
|
-
```bash
|
|
103
|
-
# Check status
|
|
104
|
-
calimero-registry local status
|
|
105
|
-
|
|
106
|
-
# Seed with sample data
|
|
107
|
-
calimero-registry local seed
|
|
108
|
-
|
|
109
|
-
# Reset all data
|
|
110
|
-
calimero-registry local reset --force
|
|
111
|
-
|
|
112
|
-
# Backup data
|
|
113
|
-
calimero-registry local backup
|
|
114
|
-
|
|
115
|
-
# Restore from backup
|
|
116
|
-
calimero-registry local restore backup.json
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
### Key Benefits
|
|
120
|
-
|
|
121
|
-
- **๐ Offline Development**: Work without internet connection
|
|
122
|
-
- **โก Fast Iteration**: No network delays
|
|
123
|
-
- **๐ File-Based Storage**: No database required
|
|
124
|
-
- **๐ง Local Artifacts**: Serve files locally instead of IPFS
|
|
125
|
-
- **๐ก๏ธ Data Isolation**: Safe development without affecting production
|
|
126
|
-
- **๐ฅ Team Collaboration**: Share local registry configurations
|
|
127
|
-
|
|
128
|
-
### Local vs Remote Registry
|
|
129
|
-
|
|
130
|
-
| Feature | Remote Registry | Local Registry |
|
|
131
|
-
| ------------ | --------------- | -------------- |
|
|
132
|
-
| Storage | Database | JSON Files |
|
|
133
|
-
| Artifacts | IPFS | Local Files |
|
|
134
|
-
| Network | Required | Offline |
|
|
135
|
-
| Setup | Complex | Simple |
|
|
136
|
-
| Data Control | Limited | Full Control |
|
|
137
|
-
|
|
138
|
-
For detailed local registry documentation, see [LOCAL_REGISTRY.md](./LOCAL_REGISTRY.md).
|
|
139
|
-
|
|
140
|
-
## ๐ Command Reference
|
|
141
|
-
|
|
142
|
-
### Applications
|
|
143
|
-
|
|
144
|
-
#### List Applications
|
|
145
|
-
|
|
146
|
-
```bash
|
|
147
|
-
# List all applications
|
|
148
|
-
calimero-registry apps list
|
|
149
|
-
|
|
150
|
-
# List with filters
|
|
151
|
-
calimero-registry apps list --search wallet --verified --limit 10
|
|
152
|
-
|
|
153
|
-
# Output in JSON format
|
|
154
|
-
calimero-registry apps list --output json
|
|
155
|
-
|
|
156
|
-
# Show specific fields
|
|
157
|
-
calimero-registry apps list --fields name,version,developer
|
|
158
|
-
|
|
159
|
-
# Use local registry
|
|
160
|
-
calimero-registry apps list --local
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
#### Get Application Details
|
|
164
|
-
|
|
165
|
-
```bash
|
|
166
|
-
# Get application by ID
|
|
167
|
-
calimero-registry apps get app-id
|
|
168
|
-
|
|
169
|
-
# Get with full details
|
|
170
|
-
calimero-registry apps get app-id --full
|
|
171
|
-
|
|
172
|
-
# Get manifest only
|
|
173
|
-
calimero-registry apps get app-id --manifest
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
#### Create Application
|
|
32
|
+
| Key | Environment | Default |
|
|
33
|
+
| -------------- | ----------------------- | ------------------------------- |
|
|
34
|
+
| `registry-url` | `CALIMERO_REGISTRY_URL` | `https://apps.calimero.network` |
|
|
35
|
+
| `api-key` | `CALIMERO_API_KEY` | none |
|
|
177
36
|
|
|
178
|
-
|
|
179
|
-
# Interactive creation
|
|
180
|
-
calimero-registry apps create
|
|
37
|
+
`registry-url` and `api-key` are the only keys. Get a token from the registry's Organizations page, under **CLI Access**; `cargo mero` reads the same two variables.
|
|
181
38
|
|
|
182
|
-
|
|
183
|
-
calimero-registry apps create --file app-manifest.json
|
|
184
|
-
|
|
185
|
-
# Create with inline data
|
|
186
|
-
calimero-registry apps create \
|
|
187
|
-
--name "My self-sovereign application" \
|
|
188
|
-
--description "A smart contract application" \
|
|
189
|
-
--version "1.0.0" \
|
|
190
|
-
--developer-id "developer-id"
|
|
191
|
-
|
|
192
|
-
# Submit to local registry
|
|
193
|
-
calimero-registry apps submit manifest.json --local
|
|
194
|
-
```
|
|
39
|
+
## Organizations
|
|
195
40
|
|
|
196
|
-
|
|
41
|
+
The main reason to use this CLI. Every write needs an API token; `org get` and `org members list` are public.
|
|
197
42
|
|
|
198
43
|
```bash
|
|
199
|
-
#
|
|
200
|
-
calimero-registry
|
|
44
|
+
calimero-registry org list # resolves your email from the token
|
|
45
|
+
calimero-registry org create -n "My Org" -s "my-org" # both flags required
|
|
46
|
+
calimero-registry org get <orgId> # id or slug
|
|
47
|
+
calimero-registry org update <orgId> [-n <name>] [-m <json>]
|
|
48
|
+
calimero-registry org delete <orgId> [-y] # irreversible
|
|
201
49
|
|
|
202
|
-
|
|
203
|
-
calimero-registry
|
|
50
|
+
calimero-registry org members list <orgId>
|
|
51
|
+
calimero-registry org members add <orgId> <email> [-r admin|member]
|
|
52
|
+
calimero-registry org members update <orgId> <email> -r admin|member
|
|
53
|
+
calimero-registry org members remove <orgId> <email>
|
|
204
54
|
|
|
205
|
-
|
|
206
|
-
calimero-registry
|
|
55
|
+
calimero-registry org packages link <orgId> <package>
|
|
56
|
+
calimero-registry org packages unlink <orgId> <package>
|
|
207
57
|
```
|
|
208
58
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
```bash
|
|
212
|
-
# Delete application
|
|
213
|
-
calimero-registry apps delete app-id
|
|
214
|
-
|
|
215
|
-
# Force delete (skip confirmation)
|
|
216
|
-
calimero-registry apps delete app-id --force
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
### Developers
|
|
220
|
-
|
|
221
|
-
#### List Developers
|
|
59
|
+
Members are identified by email, so removing someone takes effect on their next request with no key rotation involved. Linking a package to an org lets any member publish new versions of it **through the browser upload**; a `cargo mero publish` still has to be signed by the key that owns the package. See the [ownership rules](../../README.md#ownership-and-publishing-rights).
|
|
222
60
|
|
|
223
|
-
|
|
224
|
-
# List all developers
|
|
225
|
-
calimero-registry developers list
|
|
226
|
-
|
|
227
|
-
# List with filters
|
|
228
|
-
calimero-registry developers list --search john --verified
|
|
229
|
-
|
|
230
|
-
# Show developer apps
|
|
231
|
-
calimero-registry developers list --include-apps
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
#### Get Developer Details
|
|
61
|
+
## Bundles
|
|
235
62
|
|
|
236
63
|
```bash
|
|
237
|
-
#
|
|
238
|
-
calimero-registry
|
|
64
|
+
# edit published metadata: fetch with changes applied, sign, then PATCH back
|
|
65
|
+
calimero-registry bundle edit <package> <version> --remote \
|
|
66
|
+
[--name <name>] [--description <text>] [--author <author>] \
|
|
67
|
+
[--frontend <url>] [--github <url>] [--docs <url>] \
|
|
68
|
+
[-o <path>] # where to write the manifest to sign (default manifest.json)
|
|
69
|
+
[--manifest <path>] # PATCH this already-signed manifest instead
|
|
70
|
+
[--url <registry-url>] [--api-key <key>]
|
|
239
71
|
|
|
240
|
-
#
|
|
241
|
-
calimero-registry
|
|
242
|
-
```
|
|
72
|
+
# read a manifest
|
|
73
|
+
calimero-registry bundle get <package> <version> [--local]
|
|
243
74
|
|
|
244
|
-
|
|
75
|
+
# push a pre-built .mpk
|
|
76
|
+
calimero-registry bundle push <bundle-file> [--local | --remote]
|
|
245
77
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
# Create with data
|
|
251
|
-
calimero-registry developers create \
|
|
252
|
-
--name "John Doe" \
|
|
253
|
-
--email "john@example.com" \
|
|
254
|
-
--public-key "ed25519:..."
|
|
78
|
+
# assemble a bundle from a bare wasm (predates cargo mero)
|
|
79
|
+
calimero-registry bundle create <wasm-file> [package] [version] \
|
|
80
|
+
[-o <path>] [--name <name>] [--description <text>] [--author <author>] \
|
|
81
|
+
[--frontend <url>] [--github <url>] [--docs <url>] [--abi <path>]
|
|
255
82
|
```
|
|
256
83
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
#### List Attestations
|
|
84
|
+
`bundle edit` is a three-step flow, because the registry only accepts a signed manifest:
|
|
260
85
|
|
|
261
86
|
```bash
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
# List by developer
|
|
269
|
-
calimero-registry attestations list --developer-id developer-id
|
|
87
|
+
calimero-registry bundle edit com.example.my-app 1.2.4 --remote \
|
|
88
|
+
--name "New Name" -o manifest.json # 1. fetch with changes applied
|
|
89
|
+
cargo mero sign manifest.json --key my-key.json # 2. sign
|
|
90
|
+
calimero-registry bundle edit com.example.my-app 1.2.4 --remote \
|
|
91
|
+
--manifest manifest.json # 3. PATCH back
|
|
270
92
|
```
|
|
271
93
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
```bash
|
|
275
|
-
# Create attestation
|
|
276
|
-
calimero-registry attestations create \
|
|
277
|
-
--app-id app-id \
|
|
278
|
-
--type verification \
|
|
279
|
-
--data '{"verified": true, "reason": "Security audit passed"}'
|
|
280
|
-
```
|
|
94
|
+
`bundle create` and `bundle push` predate `cargo mero` and know nothing about multi-service bundles, icons, or embedded ABIs. Use them only for a bundle built outside the Rust toolchain; anything built from a Calimero app crate should go through `cargo mero bundle` and `cargo mero publish`.
|
|
281
95
|
|
|
282
|
-
|
|
96
|
+
## Local registry
|
|
283
97
|
|
|
284
|
-
|
|
98
|
+
A file-backed registry for development, storing data under `~/.calimero-registry/`.
|
|
285
99
|
|
|
286
100
|
```bash
|
|
287
|
-
|
|
288
|
-
calimero-registry local start
|
|
289
|
-
|
|
290
|
-
# Start on specific port
|
|
291
|
-
calimero-registry local start --port 8083
|
|
292
|
-
|
|
293
|
-
# Stop local registry
|
|
294
|
-
calimero-registry local stop
|
|
295
|
-
|
|
296
|
-
# Check status
|
|
101
|
+
calimero-registry local start [-p <port>] [-h <host>]
|
|
297
102
|
calimero-registry local status
|
|
298
|
-
```
|
|
299
|
-
|
|
300
|
-
#### Data Management
|
|
301
|
-
|
|
302
|
-
```bash
|
|
303
|
-
# Seed with sample data
|
|
304
|
-
calimero-registry local seed
|
|
305
|
-
|
|
306
|
-
# Reset all data
|
|
307
|
-
calimero-registry local reset --force
|
|
308
|
-
|
|
309
|
-
# Backup data
|
|
310
|
-
calimero-registry local backup
|
|
311
|
-
|
|
312
|
-
# Restore from backup
|
|
313
|
-
calimero-registry local restore backup.json
|
|
314
|
-
```
|
|
315
|
-
|
|
316
|
-
### Utility Commands
|
|
317
|
-
|
|
318
|
-
#### Configuration
|
|
319
|
-
|
|
320
|
-
```bash
|
|
321
|
-
# List configuration
|
|
322
|
-
calimero-registry config list
|
|
323
|
-
|
|
324
|
-
# Set configuration value
|
|
325
|
-
calimero-registry config set key value
|
|
326
|
-
|
|
327
|
-
# Get configuration value
|
|
328
|
-
calimero-registry config get key
|
|
329
|
-
|
|
330
|
-
# Reset configuration
|
|
331
|
-
calimero-registry config reset
|
|
332
|
-
```
|
|
333
|
-
|
|
334
|
-
#### Health Check
|
|
335
|
-
|
|
336
|
-
```bash
|
|
337
|
-
# Check API health
|
|
338
|
-
calimero-registry health
|
|
339
|
-
|
|
340
|
-
# Detailed health check
|
|
341
|
-
calimero-registry health --detailed
|
|
342
|
-
|
|
343
|
-
# Check local registry health
|
|
344
|
-
calimero-registry health --local
|
|
345
|
-
```
|
|
346
|
-
|
|
347
|
-
## ๐ฏ Usage Examples
|
|
348
|
-
|
|
349
|
-
### Complete Application Workflow
|
|
350
|
-
|
|
351
|
-
```bash
|
|
352
|
-
# 1. Create a new application
|
|
353
|
-
calimero-registry apps create \
|
|
354
|
-
--name "DeFi Wallet" \
|
|
355
|
-
--description "A decentralized finance wallet" \
|
|
356
|
-
--version "1.0.0" \
|
|
357
|
-
--developer-id "my-developer-id"
|
|
358
|
-
|
|
359
|
-
# 2. List applications to verify creation
|
|
360
|
-
calimero-registry apps list --search "DeFi Wallet"
|
|
361
|
-
|
|
362
|
-
# 3. Get application details
|
|
363
|
-
calimero-registry apps get app-id --full
|
|
364
|
-
|
|
365
|
-
# 4. Update the application
|
|
366
|
-
calimero-registry apps update app-id \
|
|
367
|
-
--description "Updated DeFi wallet with new features" \
|
|
368
|
-
--version "1.1.0"
|
|
369
|
-
|
|
370
|
-
# 5. Create an attestation
|
|
371
|
-
calimero-registry attestations create \
|
|
372
|
-
--app-id app-id \
|
|
373
|
-
--type verification \
|
|
374
|
-
--data '{"verified": true, "audit": "passed"}'
|
|
375
|
-
|
|
376
|
-
# 6. List attestations
|
|
377
|
-
calimero-registry attestations list --app-id app-id
|
|
378
|
-
```
|
|
379
|
-
|
|
380
|
-
### Local Development Workflow
|
|
381
|
-
|
|
382
|
-
```bash
|
|
383
|
-
# 1. Start local registry
|
|
384
|
-
calimero-registry local start
|
|
385
|
-
|
|
386
|
-
# 2. Seed with sample data
|
|
387
|
-
calimero-registry local seed
|
|
388
|
-
|
|
389
|
-
# 3. List apps from local registry
|
|
390
|
-
calimero-registry apps list --local
|
|
391
|
-
|
|
392
|
-
# 4. Submit new app to local registry
|
|
393
|
-
calimero-registry apps submit my-manifest.json --local
|
|
394
|
-
|
|
395
|
-
# 5. Get app manifest from local registry
|
|
396
|
-
calimero-registry apps manifest my-app 1.0.0 --local
|
|
397
|
-
|
|
398
|
-
# 6. Check local registry health
|
|
399
|
-
calimero-registry health --local
|
|
400
|
-
|
|
401
|
-
# 7. Backup local data
|
|
402
|
-
calimero-registry local backup
|
|
403
|
-
|
|
404
|
-
# 8. Stop local registry
|
|
405
103
|
calimero-registry local stop
|
|
406
|
-
```
|
|
407
|
-
|
|
408
|
-
### Batch Operations
|
|
409
|
-
|
|
410
|
-
```bash
|
|
411
|
-
# Create multiple applications from a file
|
|
412
|
-
cat apps.json | calimero-registry apps create --batch
|
|
413
|
-
|
|
414
|
-
# Update multiple applications
|
|
415
|
-
calimero-registry apps list --output json | \
|
|
416
|
-
jq -r '.apps[].id' | \
|
|
417
|
-
xargs -I {} calimero-registry apps update {} --version "1.1.0"
|
|
418
|
-
|
|
419
|
-
# Delete all applications by a developer
|
|
420
|
-
calimero-registry apps list --developer-id dev-id --output json | \
|
|
421
|
-
jq -r '.apps[].id' | \
|
|
422
|
-
xargs -I {} calimero-registry apps delete {} --force
|
|
423
|
-
```
|
|
424
|
-
|
|
425
|
-
### Scripting Examples
|
|
426
|
-
|
|
427
|
-
#### Bash Script
|
|
428
|
-
|
|
429
|
-
```bash
|
|
430
|
-
#!/bin/bash
|
|
431
|
-
|
|
432
|
-
# Create application and get ID
|
|
433
|
-
APP_ID=$(calimero-registry apps create \
|
|
434
|
-
--name "My App" \
|
|
435
|
-
--version "1.0.0" \
|
|
436
|
-
--output json | jq -r '.id')
|
|
437
104
|
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
# Get app details
|
|
444
|
-
calimero-registry apps get "$APP_ID" --output json
|
|
445
|
-
```
|
|
446
|
-
|
|
447
|
-
#### Node.js Script
|
|
448
|
-
|
|
449
|
-
```javascript
|
|
450
|
-
const { execSync } = require('child_process');
|
|
451
|
-
|
|
452
|
-
// Create application
|
|
453
|
-
const createResult = JSON.parse(
|
|
454
|
-
execSync(
|
|
455
|
-
'calimero-registry apps create --name "My App" --output json'
|
|
456
|
-
).toString()
|
|
457
|
-
);
|
|
458
|
-
|
|
459
|
-
const appId = createResult.id;
|
|
460
|
-
console.log('Created app:', appId);
|
|
461
|
-
|
|
462
|
-
// Get application details
|
|
463
|
-
const appDetails = JSON.parse(
|
|
464
|
-
execSync(`calimero-registry apps get ${appId} --output json`).toString()
|
|
465
|
-
);
|
|
466
|
-
|
|
467
|
-
console.log('App details:', appDetails);
|
|
468
|
-
```
|
|
469
|
-
|
|
470
|
-
## ๐ง Advanced Features
|
|
471
|
-
|
|
472
|
-
### Output Formats
|
|
473
|
-
|
|
474
|
-
#### JSON Output
|
|
475
|
-
|
|
476
|
-
```bash
|
|
477
|
-
calimero-registry apps list --output json
|
|
105
|
+
calimero-registry local seed # sample data
|
|
106
|
+
calimero-registry local reset [-f]
|
|
107
|
+
calimero-registry local backup [-o <file>]
|
|
108
|
+
calimero-registry local restore <backup-file>
|
|
478
109
|
```
|
|
479
110
|
|
|
480
|
-
|
|
481
|
-
{
|
|
482
|
-
"apps": [
|
|
483
|
-
{
|
|
484
|
-
"id": "app-1",
|
|
485
|
-
"name": "My App",
|
|
486
|
-
"version": "1.0.0",
|
|
487
|
-
"developer": {
|
|
488
|
-
"id": "dev-1",
|
|
489
|
-
"name": "John Doe"
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
],
|
|
493
|
-
"total": 1,
|
|
494
|
-
"limit": 20,
|
|
495
|
-
"offset": 0
|
|
496
|
-
}
|
|
497
|
-
```
|
|
111
|
+
Commands that accept `--local` (`bundle get`, `bundle push`) then work against it instead of the remote registry.
|
|
498
112
|
|
|
499
|
-
|
|
113
|
+
## Other
|
|
500
114
|
|
|
501
115
|
```bash
|
|
502
|
-
calimero-registry
|
|
116
|
+
calimero-registry health # check the API is reachable
|
|
117
|
+
calimero-registry ipfs upload <file>
|
|
118
|
+
calimero-registry ipfs download <cid> [output]
|
|
503
119
|
```
|
|
504
120
|
|
|
505
|
-
|
|
506
|
-
โโโโโโโโโโโฌโโโโโโโโโโโฌโโโโโโโโโโฌโโโโโโโโโโโโโโ
|
|
507
|
-
โ ID โ Name โ Version โ Developer โ
|
|
508
|
-
โโโโโโโโโโโผโโโโโโโโโโโผโโโโโโโโโโผโโโโโโโโโโโโโโค
|
|
509
|
-
โ app-1 โ My App โ 1.0.0 โ John Doe โ
|
|
510
|
-
โโโโโโโโโโโดโโโโโโโโโโโดโโโโโโโโโโดโโโโโโโโโโโโโโ
|
|
511
|
-
```
|
|
512
|
-
|
|
513
|
-
#### YAML Output
|
|
121
|
+
## Development
|
|
514
122
|
|
|
515
123
|
```bash
|
|
516
|
-
|
|
124
|
+
pnpm build # tsup
|
|
125
|
+
pnpm test # vitest
|
|
126
|
+
pnpm lint # eslint, zero warnings
|
|
127
|
+
pnpm type-check # tsc --noEmit
|
|
517
128
|
```
|
|
518
129
|
|
|
519
|
-
|
|
520
|
-
apps:
|
|
521
|
-
- id: app-1
|
|
522
|
-
name: My App
|
|
523
|
-
version: 1.0.0
|
|
524
|
-
developer:
|
|
525
|
-
id: dev-1
|
|
526
|
-
name: John Doe
|
|
527
|
-
total: 1
|
|
528
|
-
limit: 20
|
|
529
|
-
offset: 0
|
|
530
|
-
```
|
|
531
|
-
|
|
532
|
-
### Interactive Mode
|
|
533
|
-
|
|
534
|
-
```bash
|
|
535
|
-
# Start interactive mode
|
|
536
|
-
calimero-registry interactive
|
|
537
|
-
|
|
538
|
-
# Available commands in interactive mode:
|
|
539
|
-
# > apps list
|
|
540
|
-
# > apps create
|
|
541
|
-
# > developers list
|
|
542
|
-
# > help
|
|
543
|
-
# > exit
|
|
544
|
-
```
|
|
545
|
-
|
|
546
|
-
### Auto-completion
|
|
547
|
-
|
|
548
|
-
```bash
|
|
549
|
-
# Enable auto-completion for bash
|
|
550
|
-
calimero-registry completion bash > ~/.bash_completion
|
|
551
|
-
|
|
552
|
-
# Enable auto-completion for zsh
|
|
553
|
-
calimero-registry completion zsh > ~/.zsh_completion
|
|
554
|
-
|
|
555
|
-
# Enable auto-completion for fish
|
|
556
|
-
calimero-registry completion fish > ~/.config/fish/completions/calimero-registry.fish
|
|
557
|
-
```
|
|
558
|
-
|
|
559
|
-
## ๐งช Testing
|
|
560
|
-
|
|
561
|
-
### Running Tests
|
|
562
|
-
|
|
563
|
-
```bash
|
|
564
|
-
# Run all tests
|
|
565
|
-
pnpm test
|
|
566
|
-
|
|
567
|
-
# Run tests in watch mode
|
|
568
|
-
pnpm test:watch
|
|
569
|
-
|
|
570
|
-
# Run tests with coverage
|
|
571
|
-
pnpm test:coverage
|
|
572
|
-
|
|
573
|
-
# Run specific test file
|
|
574
|
-
pnpm test src/commands/apps.test.ts
|
|
575
|
-
```
|
|
576
|
-
|
|
577
|
-
### Test Examples
|
|
578
|
-
|
|
579
|
-
#### Command Test
|
|
580
|
-
|
|
581
|
-
```typescript
|
|
582
|
-
import { describe, it, expect } from 'vitest';
|
|
583
|
-
import { AppsCommand } from '../src/commands/apps';
|
|
584
|
-
|
|
585
|
-
describe('AppsCommand', () => {
|
|
586
|
-
it('should list applications', async () => {
|
|
587
|
-
const command = new AppsCommand();
|
|
588
|
-
const result = await command.list({ limit: 10 });
|
|
589
|
-
|
|
590
|
-
expect(result.apps).toBeDefined();
|
|
591
|
-
expect(Array.isArray(result.apps)).toBe(true);
|
|
592
|
-
});
|
|
593
|
-
});
|
|
594
|
-
```
|
|
595
|
-
|
|
596
|
-
#### Integration Test
|
|
597
|
-
|
|
598
|
-
```typescript
|
|
599
|
-
describe('CLI Integration', () => {
|
|
600
|
-
it('should create and delete application', async () => {
|
|
601
|
-
// Create app
|
|
602
|
-
const createResult = await cli.run([
|
|
603
|
-
'apps',
|
|
604
|
-
'create',
|
|
605
|
-
'--name',
|
|
606
|
-
'Test App',
|
|
607
|
-
'--version',
|
|
608
|
-
'1.0.0',
|
|
609
|
-
'--output',
|
|
610
|
-
'json',
|
|
611
|
-
]);
|
|
612
|
-
|
|
613
|
-
const appId = JSON.parse(createResult).id;
|
|
614
|
-
expect(appId).toBeDefined();
|
|
615
|
-
|
|
616
|
-
// Delete app
|
|
617
|
-
await cli.run(['apps', 'delete', appId, '--force']);
|
|
618
|
-
});
|
|
619
|
-
});
|
|
620
|
-
```
|
|
621
|
-
|
|
622
|
-
## ๐ Build & Distribution
|
|
623
|
-
|
|
624
|
-
### Building the CLI
|
|
625
|
-
|
|
626
|
-
```bash
|
|
627
|
-
# Build the CLI
|
|
628
|
-
pnpm build
|
|
629
|
-
|
|
630
|
-
# Build with shebang for direct execution
|
|
631
|
-
pnpm build:cli
|
|
632
|
-
|
|
633
|
-
# Build for different platforms
|
|
634
|
-
pnpm build:linux
|
|
635
|
-
pnpm build:macos
|
|
636
|
-
pnpm build:windows
|
|
637
|
-
```
|
|
638
|
-
|
|
639
|
-
### Publishing
|
|
640
|
-
|
|
641
|
-
```bash
|
|
642
|
-
# Publish to npm
|
|
643
|
-
pnpm publish
|
|
644
|
-
|
|
645
|
-
# Publish with specific tag
|
|
646
|
-
pnpm publish --tag beta
|
|
647
|
-
```
|
|
648
|
-
|
|
649
|
-
## ๐ง Development
|
|
650
|
-
|
|
651
|
-
### Development Commands
|
|
652
|
-
|
|
653
|
-
```bash
|
|
654
|
-
# Install dependencies
|
|
655
|
-
pnpm install
|
|
656
|
-
|
|
657
|
-
# Build the CLI
|
|
658
|
-
pnpm build
|
|
659
|
-
|
|
660
|
-
# Run tests
|
|
661
|
-
pnpm test
|
|
662
|
-
|
|
663
|
-
# Run tests in watch mode
|
|
664
|
-
pnpm test:watch
|
|
665
|
-
|
|
666
|
-
# Lint code
|
|
667
|
-
pnpm lint
|
|
668
|
-
|
|
669
|
-
# Fix linting issues
|
|
670
|
-
pnpm lint:fix
|
|
671
|
-
|
|
672
|
-
# Format code
|
|
673
|
-
pnpm format
|
|
674
|
-
|
|
675
|
-
# Type checking
|
|
676
|
-
pnpm type-check
|
|
677
|
-
```
|
|
678
|
-
|
|
679
|
-
### Code Quality
|
|
680
|
-
|
|
681
|
-
- **ESLint**: Code linting with TypeScript rules
|
|
682
|
-
- **Prettier**: Code formatting
|
|
683
|
-
- **TypeScript**: Static type checking
|
|
684
|
-
- **Vitest**: Unit testing framework
|
|
685
|
-
- **Coverage**: Test coverage reporting
|
|
686
|
-
|
|
687
|
-
## ๐ License
|
|
688
|
-
|
|
689
|
-
This package is licensed under the MIT License - see the [LICENSE](../../LICENSE) file for details.
|
|
690
|
-
|
|
691
|
-
## ๐ค Contributing
|
|
692
|
-
|
|
693
|
-
See the main [CONTRIBUTING](../../CONTRIBUTING.md) guide for details on how to contribute to this package.
|
|
694
|
-
|
|
695
|
-
## ๐ Support
|
|
130
|
+
## License
|
|
696
131
|
|
|
697
|
-
|
|
698
|
-
- **Documentation**: Check the command help with `--help`
|
|
699
|
-
- **Examples**: Review the test suite for usage examples
|
|
132
|
+
MIT. See [LICENSE.md](../../LICENSE.md).
|