ape-claw 0.1.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 (114) hide show
  1. package/.cursor/skills/ape-claw/SKILL.md +322 -0
  2. package/LICENSE +21 -0
  3. package/README.md +826 -0
  4. package/allowlists/opensea-slug-overrides.json +13 -0
  5. package/allowlists/recommended.apechain.json +322 -0
  6. package/config/clawbots.example.json +3 -0
  7. package/config/policy.example.json +27 -0
  8. package/data/starter-pack-bundle.json +1 -0
  9. package/data/starter-pack.json +495 -0
  10. package/docs/ACP_BOUNTIES.md +108 -0
  11. package/docs/APECLAW_V2_ALPHA.md +206 -0
  12. package/docs/AUTONOMY_AND_SUBSTRATE.md +69 -0
  13. package/docs/CLAWBOTS_AND_INVITES.md +102 -0
  14. package/docs/CLI_GUIDE.md +124 -0
  15. package/docs/CONTRIBUTING.md +130 -0
  16. package/docs/DASHBOARD_GUIDE.md +108 -0
  17. package/docs/GLOBAL_BACKEND.md +145 -0
  18. package/docs/ONCHAIN_V2_GUIDE.md +140 -0
  19. package/docs/PRODUCT_OVERVIEW.md +127 -0
  20. package/docs/README.md +40 -0
  21. package/docs/SKILLCARDS_AND_IMPORTER.md +147 -0
  22. package/docs/STARTER_PACK.md +297 -0
  23. package/docs/SUPPORTED_NETWORKS.md +58 -0
  24. package/docs/TELEMETRY_AND_EVENTS.md +103 -0
  25. package/docs/THE_POD_RUNNER.md +198 -0
  26. package/docs/V1_WORKFLOWS.md +108 -0
  27. package/docs/V2_ONCHAIN_SKILLS.md +157 -0
  28. package/docs/WEB4_PLAN_STATUS.md +95 -0
  29. package/docs/WEB4_SWARM_MODEL.md +104 -0
  30. package/docs/archive/AUTONOMY_AND_SUBSTRATE.md +66 -0
  31. package/docs/archive/WEB4_PLAN_STATUS.md +93 -0
  32. package/docs/archive/WEB4_SWARM_MODEL.md +98 -0
  33. package/docs/developer/01-architecture.md +345 -0
  34. package/docs/developer/02-contracts.md +1034 -0
  35. package/docs/developer/03-writing-modules.md +513 -0
  36. package/docs/developer/04-skillcard-spec.md +336 -0
  37. package/docs/developer/05-backend-api.md +1079 -0
  38. package/docs/developer/06-telemetry.md +798 -0
  39. package/docs/developer/07-testing.md +546 -0
  40. package/docs/developer/08-contributing.md +211 -0
  41. package/docs/operator/01-quickstart.md +49 -0
  42. package/docs/operator/02-dashboard.md +174 -0
  43. package/docs/operator/03-cli-reference.md +818 -0
  44. package/docs/operator/04-skills-library.md +169 -0
  45. package/docs/operator/05-pod-operations.md +314 -0
  46. package/docs/operator/06-deployment.md +299 -0
  47. package/docs/operator/07-safety-and-policy.md +311 -0
  48. package/docs/operator/08-troubleshooting.md +457 -0
  49. package/docs/operator/09-env-reference.md +238 -0
  50. package/docs/social/STARTER_PACK_THREAD.md +209 -0
  51. package/package.json +77 -0
  52. package/skillcards/import-sources.json +93 -0
  53. package/skillcards/seed/acp-bounty-poll.v1.json +38 -0
  54. package/skillcards/seed/acp-bounty-post.v1.json +55 -0
  55. package/skillcards/seed/acp-browse.v1.json +41 -0
  56. package/skillcards/seed/acp-fulfill-and-route.v1.json +56 -0
  57. package/skillcards/seed/apeclaw-bridge-relay.v1.json +46 -0
  58. package/skillcards/seed/apeclaw-nft-autobuy.v1.json +60 -0
  59. package/skillcards/seed/apeclaw-receipt-recorder.v1.json +64 -0
  60. package/skillcards/seed/humanizer.v1.json +74 -0
  61. package/skillcards/seed/otherside-navigator.v1.json +116 -0
  62. package/skillcards/seed/stonkbrokers-launcher.v1.json +280 -0
  63. package/skillcards/seed/walkie-p2p.v1.json +66 -0
  64. package/src/cli/index.mjs +8 -0
  65. package/src/cli.mjs +1929 -0
  66. package/src/lib/bridge-relay.mjs +294 -0
  67. package/src/lib/clawbots.mjs +94 -0
  68. package/src/lib/io.mjs +36 -0
  69. package/src/lib/market.mjs +233 -0
  70. package/src/lib/nft-opensea.mjs +159 -0
  71. package/src/lib/paths.mjs +17 -0
  72. package/src/lib/pod-init.mjs +40 -0
  73. package/src/lib/policy.mjs +112 -0
  74. package/src/lib/rpc.mjs +49 -0
  75. package/src/lib/telemetry.mjs +92 -0
  76. package/src/lib/v2-onchain-abi.mjs +294 -0
  77. package/src/lib/v2-skillcard.mjs +27 -0
  78. package/src/server/index.mjs +169 -0
  79. package/src/server/logger.mjs +21 -0
  80. package/src/server/middleware/auth.mjs +90 -0
  81. package/src/server/middleware/body-limit.mjs +35 -0
  82. package/src/server/middleware/cors.mjs +33 -0
  83. package/src/server/middleware/rate-limit.mjs +44 -0
  84. package/src/server/routes/chat.mjs +178 -0
  85. package/src/server/routes/clawbots.mjs +182 -0
  86. package/src/server/routes/events.mjs +95 -0
  87. package/src/server/routes/health.mjs +72 -0
  88. package/src/server/routes/pod.mjs +64 -0
  89. package/src/server/routes/quotes.mjs +161 -0
  90. package/src/server/routes/skills.mjs +239 -0
  91. package/src/server/routes/static.mjs +161 -0
  92. package/src/server/routes/v2.mjs +48 -0
  93. package/src/server/sse.mjs +73 -0
  94. package/src/server/storage/file-backend.mjs +295 -0
  95. package/src/server/storage/index.mjs +37 -0
  96. package/src/server/storage/sqlite-backend.mjs +380 -0
  97. package/src/telemetry-server.mjs +1604 -0
  98. package/ui/css/dashboard.css +792 -0
  99. package/ui/css/skills.css +689 -0
  100. package/ui/docs.html +840 -0
  101. package/ui/favicon-180.png +0 -0
  102. package/ui/favicon-192.png +0 -0
  103. package/ui/favicon-32.png +0 -0
  104. package/ui/favicon-lobster.png +0 -0
  105. package/ui/favicon.svg +10 -0
  106. package/ui/index.html +2957 -0
  107. package/ui/js/dashboard.js +1766 -0
  108. package/ui/js/skills.js +1621 -0
  109. package/ui/pod.html +909 -0
  110. package/ui/shared/motion.css +286 -0
  111. package/ui/shared/motion.js +170 -0
  112. package/ui/shared/sidebar-nav.css +379 -0
  113. package/ui/shared/sidebar-nav.js +137 -0
  114. package/ui/skills.html +2879 -0
@@ -0,0 +1,818 @@
1
+ # CLI Reference
2
+
3
+ Complete reference for all `ape-claw` CLI commands.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install -g openclaw
9
+ npx --yes github:simplefarmer69/ape-claw doctor --json
10
+ ```
11
+
12
+ ## Global Flags
13
+
14
+ | Flag | Description | Environment Variable |
15
+ |------|-------------|---------------------|
16
+ | `--json` | Output as JSON (recommended) | — |
17
+ | `--agent-id <id>` | Clawbot agent ID | `APE_CLAW_AGENT_ID` |
18
+ | `--agent-token <token>` | Clawbot auth token | `APE_CLAW_AGENT_TOKEN` |
19
+
20
+ ## Commands
21
+
22
+ ### System
23
+
24
+ #### `doctor`
25
+
26
+ Check chain access and configuration.
27
+
28
+ **Synopsis:**
29
+ ```bash
30
+ ape-claw doctor --json
31
+ ```
32
+
33
+ **Required arguments:** None
34
+
35
+ **Optional arguments:** None
36
+
37
+ **Example:**
38
+ ```bash
39
+ ape-claw doctor --json
40
+ ```
41
+
42
+ **Output:** Returns configuration status, chain access, agent verification, bridge/market setup, execution readiness, policy paths, and next steps.
43
+
44
+ ---
45
+
46
+ #### `quickstart`
47
+
48
+ Guided first-run setup with personalized onboarding steps.
49
+
50
+ **Synopsis:**
51
+ ```bash
52
+ ape-claw quickstart --json
53
+ ```
54
+
55
+ **Required arguments:** None
56
+
57
+ **Optional arguments:** None
58
+
59
+ **Example:**
60
+ ```bash
61
+ ape-claw quickstart --json
62
+ ```
63
+
64
+ **Output:** Returns status summary, recommended commands, and next steps based on current configuration.
65
+
66
+ ---
67
+
68
+ #### `chain info`
69
+
70
+ Get chain information including latest block.
71
+
72
+ **Synopsis:**
73
+ ```bash
74
+ ape-claw chain info --json
75
+ ```
76
+
77
+ **Required arguments:** None
78
+
79
+ **Optional arguments:** None
80
+
81
+ **Example:**
82
+ ```bash
83
+ ape-claw chain info --json
84
+ ```
85
+
86
+ **Output:** Returns chainId, nativeGasToken, bridgeProvider, marketDataSource, latestBlock, and rpcOk status.
87
+
88
+ ---
89
+
90
+ ### Clawbot Management
91
+
92
+ #### `clawbot register`
93
+
94
+ Register a new clawbot agent.
95
+
96
+ **Synopsis:**
97
+ ```bash
98
+ ape-claw clawbot register --agent-id <id> [--name <name>] [--api <url>] [--invite <token>] [--registration-key <key>] --json
99
+ ```
100
+
101
+ **Required arguments:**
102
+ - `--agent-id <id>` — Unique agent identifier
103
+
104
+ **Optional arguments:**
105
+ - `--name <name>` — Display name (defaults to agent-id)
106
+ - `--api <url>` — Remote API base URL (or `APE_CLAW_API_BASE` / `APE_CLAW_TELEMETRY_URL`)
107
+ - `--invite <token>` — Invitation token (or `APE_CLAW_INVITE`)
108
+ - `--registration-key <key>` — Registration key (or `APE_CLAW_REGISTRATION_KEY`)
109
+
110
+ **Example:**
111
+ ```bash
112
+ ape-claw clawbot register --agent-id my-bot --name "My Bot" --json
113
+ ```
114
+
115
+ **Output:** Returns registration status, agentId, name, token (save this — shown only once), and remote/local status.
116
+
117
+ ---
118
+
119
+ #### `clawbot list`
120
+
121
+ List all registered clawbots.
122
+
123
+ **Synopsis:**
124
+ ```bash
125
+ ape-claw clawbot list --json
126
+ ```
127
+
128
+ **Required arguments:** None
129
+
130
+ **Optional arguments:** None
131
+
132
+ **Example:**
133
+ ```bash
134
+ ape-claw clawbot list --json
135
+ ```
136
+
137
+ **Output:** Returns count and array of registered clawbots.
138
+
139
+ ---
140
+
141
+ ### Authentication
142
+
143
+ #### `auth set`
144
+
145
+ Persist credentials in local auth profile (`~/.ape-claw/auth.json`).
146
+
147
+ **Synopsis:**
148
+ ```bash
149
+ ape-claw auth set [--agent-id <id>] [--agent-token <token>] [--opensea-api-key <key>] [--private-key <pk>] --json
150
+ ```
151
+
152
+ **Required arguments:** At least one of the optional arguments must be provided.
153
+
154
+ **Optional arguments:**
155
+ - `--agent-id <id>` — Clawbot agent ID
156
+ - `--agent-token <token>` — Clawbot auth token
157
+ - `--opensea-api-key <key>` — OpenSea API key
158
+ - `--private-key <pk>` — Wallet private key (0x-prefixed hex)
159
+
160
+ **Example:**
161
+ ```bash
162
+ ape-claw auth set --agent-id my-bot --agent-token claw_... --json
163
+ ```
164
+
165
+ **Output:** Returns ok status, saved flag, path, and masked field indicators. Note: secrets stored with mode 600.
166
+
167
+ ---
168
+
169
+ #### `auth show`
170
+
171
+ Display current auth profile (with masked secrets).
172
+
173
+ **Synopsis:**
174
+ ```bash
175
+ ape-claw auth show --json
176
+ ```
177
+
178
+ **Required arguments:** None
179
+
180
+ **Optional arguments:** None
181
+
182
+ **Example:**
183
+ ```bash
184
+ ape-claw auth show --json
185
+ ```
186
+
187
+ **Output:** Returns path and auth object with masked secrets (first 4 + last 4 chars).
188
+
189
+ ---
190
+
191
+ #### `auth clear`
192
+
193
+ Remove a credential from the auth profile.
194
+
195
+ **Synopsis:**
196
+ ```bash
197
+ ape-claw auth clear [--field <field>] [--all] --json
198
+ ```
199
+
200
+ **Required arguments:** Either `--field` or `--all` must be provided.
201
+
202
+ **Optional arguments:**
203
+ - `--field <field>` — Field to clear: `agent-id`, `agent-token`, `opensea-api-key`, or `private-key`
204
+ - `--all` — Clear all credentials
205
+
206
+ **Example:**
207
+ ```bash
208
+ ape-claw auth clear --field agent-token --json
209
+ ```
210
+
211
+ **Output:** Returns ok status, cleared field name, and path.
212
+
213
+ ---
214
+
215
+ ### Market & NFT
216
+
217
+ #### `market collections`
218
+
219
+ List recommended collections from the allowlist.
220
+
221
+ **Synopsis:**
222
+ ```bash
223
+ ape-claw market collections [--recommended] --json
224
+ ```
225
+
226
+ **Required arguments:** None
227
+
228
+ **Optional arguments:**
229
+ - `--recommended` — Filter to enabled collections only (default: all collections)
230
+
231
+ **Example:**
232
+ ```bash
233
+ ape-claw market collections --recommended --json
234
+ ```
235
+
236
+ **Output:** Returns count, collections array (with name, slug, contractAddress, enabled status), and source.
237
+
238
+ ---
239
+
240
+ #### `market listings`
241
+
242
+ List available NFTs for a collection.
243
+
244
+ **Synopsis:**
245
+ ```bash
246
+ ape-claw market listings --collection <slug> [--tokenId <id>] [--maxPrice <n>] [--dataSource <source>] --json
247
+ ```
248
+
249
+ **Required arguments:**
250
+ - `--collection <slug>` — Collection slug or name
251
+
252
+ **Optional arguments:**
253
+ - `--tokenId <id>` — Filter to specific token ID
254
+ - `--maxPrice <n>` — Maximum price in APE (default: from policy `nftBuy.maxPricePerTx`)
255
+ - `--dataSource <source>` — Market data source (default: from policy `market.dataSource`)
256
+
257
+ **Example:**
258
+ ```bash
259
+ ape-claw market listings --collection boredapeyachtclub --maxPrice 100 --json
260
+ ```
261
+
262
+ **Output:** Returns count, listings array, source, and notes.
263
+
264
+ ---
265
+
266
+ #### `nft autobuy`
267
+
268
+ Automated buying with policy gates. Scans collections, selects candidates, generates quotes, and optionally executes purchases.
269
+
270
+ **Synopsis:**
271
+ ```bash
272
+ ape-claw nft autobuy --count <n> [--minPrice <n>] --maxPrice <n> [--budget <n>] [--scan <n>] [--collections <slugs>] [--all] [--execute] [--autonomous] --json
273
+ ```
274
+
275
+ **Required arguments:**
276
+ - `--maxPrice <n>` — Maximum price per NFT in APE (must be > 0)
277
+
278
+ **Optional arguments:**
279
+ - `--count <n>` — Number of NFTs to buy (default: 1)
280
+ - `--minPrice <n>` — Minimum price per NFT (default: 0)
281
+ - `--budget <n>` — Total budget in APE (default: unlimited)
282
+ - `--scan <n>` — Maximum collections to scan (default: max(10, count * 4))
283
+ - `--collections <slugs>` — Comma-separated collection slugs to filter
284
+ - `--all` — Include disabled collections
285
+ - `--execute` — Execute purchases (requires `--autonomous`)
286
+ - `--autonomous` — Skip confirmation prompts (required for `--execute`)
287
+ - `--allow-unsafe` — Allow unsafe collections (bypasses policy checks)
288
+ - `--currency <currency>` — Currency (default: APE, currently only APE supported)
289
+ - `--dataSource <source>` — Market data source (default: from policy)
290
+
291
+ **Example (dry run):**
292
+ ```bash
293
+ ape-claw nft autobuy --count 3 --maxPrice 50 --budget 100 --json
294
+ ```
295
+
296
+ **Example (execute):**
297
+ ```bash
298
+ ape-claw nft autobuy --count 2 --maxPrice 50 --execute --autonomous --json
299
+ ```
300
+
301
+ **Output:** Returns constraints, scannedCollections, candidateCount, selectedCount, planned quotes (or executions), and skipped items.
302
+
303
+ ---
304
+
305
+ #### `nft quote-buy`
306
+
307
+ Get a purchase quote for a specific NFT.
308
+
309
+ **Synopsis:**
310
+ ```bash
311
+ ape-claw nft quote-buy --collection <slug> --tokenId <id> --maxPrice <n> [--currency <currency>] [--allow-unsafe] [--dataSource <source>] --json
312
+ ```
313
+
314
+ **Required arguments:**
315
+ - `--collection <slug>` — Collection slug or name
316
+ - `--tokenId <id>` — Token ID
317
+ - `--maxPrice <n>` — Maximum price in APE (must be > 0)
318
+
319
+ **Optional arguments:**
320
+ - `--currency <currency>` — Currency (default: APE)
321
+ - `--allow-unsafe` — Allow unsafe collections
322
+ - `--dataSource <source>` — Market data source (default: from policy)
323
+
324
+ **Example:**
325
+ ```bash
326
+ ape-claw nft quote-buy --collection boredapeyachtclub --tokenId 1234 --maxPrice 100 --json
327
+ ```
328
+
329
+ **Output:** Returns quoteId, collection, collectionTarget, tokenId, currency, priceApe, maxPrice, expiresAt, listingId, orderHash, routeHash, source, protocolAddress, assetContractAddress, chainId. Quote is saved to local state.
330
+
331
+ ---
332
+
333
+ #### `nft simulate`
334
+
335
+ Simulate an execution (check quote validity).
336
+
337
+ **Synopsis:**
338
+ ```bash
339
+ ape-claw nft simulate --quote <quoteId> --json
340
+ ```
341
+
342
+ **Required arguments:**
343
+ - `--quote <quoteId>` — Quote ID from `nft quote-buy`
344
+
345
+ **Optional arguments:** None
346
+
347
+ **Example:**
348
+ ```bash
349
+ ape-claw nft simulate --quote q_abc123 --json
350
+ ```
351
+
352
+ **Output:** Returns quoteId, ok status, and reason (simulation_passed or quote_expired). Updates quote with simulation result.
353
+
354
+ ---
355
+
356
+ #### `nft buy`
357
+
358
+ Execute a purchase using a quote.
359
+
360
+ **Synopsis:**
361
+ ```bash
362
+ ape-claw nft buy --quote <quoteId> [--execute] [--autonomous] [--confirm "<phrase>"] [--user <address>] --json
363
+ ```
364
+
365
+ **Required arguments:**
366
+ - `--quote <quoteId>` — Quote ID from `nft quote-buy`
367
+
368
+ **Optional arguments:**
369
+ - `--execute` — Execute transaction (default: dry run)
370
+ - `--autonomous` — Skip confirmation prompts (auto-generates confirm phrase)
371
+ - `--confirm "<phrase>"` — Confirmation phrase (required if `--execute` without `--autonomous`). Format: `BUY <collection> #<tokenId> <priceApe> APE`
372
+ - `--user <address>` — Fulfiller address (optional)
373
+
374
+ **Example (dry run):**
375
+ ```bash
376
+ ape-claw nft buy --quote q_abc123 --json
377
+ ```
378
+
379
+ **Example (execute with confirmation):**
380
+ ```bash
381
+ ape-claw nft buy --quote q_abc123 --execute --confirm "BUY boredapeyachtclub #1234 50.5 APE" --json
382
+ ```
383
+
384
+ **Example (autonomous execute):**
385
+ ```bash
386
+ ape-claw nft buy --quote q_abc123 --execute --autonomous --json
387
+ ```
388
+
389
+ **Output:** Returns ok status, quoteId, txHash, chainId, and quote details. Updates quote with executed status and transaction hash.
390
+
391
+ ---
392
+
393
+ ### Bridging
394
+
395
+ #### `bridge quote`
396
+
397
+ Get a bridge quote for transferring tokens to ApeChain.
398
+
399
+ **Synopsis:**
400
+ ```bash
401
+ ape-claw bridge quote --from <chain> --amount <n> [--to <chain>] [--token <token>] --json
402
+ ```
403
+
404
+ **Required arguments:**
405
+ - `--from <chain>` — Source chain identifier
406
+ - `--amount <n>` — Amount to bridge (must be > 0)
407
+
408
+ **Optional arguments:**
409
+ - `--to <chain>` — Destination chain (default: `apechain` from policy)
410
+ - `--token <token>` — Token symbol (default: `APE` from policy)
411
+
412
+ **Example:**
413
+ ```bash
414
+ ape-claw bridge quote --from ethereum --amount 100 --json
415
+ ```
416
+
417
+ **Output:** Returns requestId, from, to, token, amount, feeBps, feeAmount, totalAmount, expiresAt, and other bridge-specific fields. Request is saved to local state.
418
+
419
+ ---
420
+
421
+ #### `bridge execute`
422
+
423
+ Execute a bridge transaction using a quote.
424
+
425
+ **Synopsis:**
426
+ ```bash
427
+ ape-claw bridge execute --request <requestId> [--execute] [--autonomous] [--confirm "<phrase>"] --json
428
+ ```
429
+
430
+ **Required arguments:**
431
+ - `--request <requestId>` — Bridge request ID from `bridge quote`
432
+
433
+ **Optional arguments:**
434
+ - `--execute` — Execute bridge (default: dry run)
435
+ - `--autonomous` — Skip confirmation prompts (auto-generates confirm phrase)
436
+ - `--confirm "<phrase>"` — Confirmation phrase (required if `--execute` without `--autonomous`). Format: `BRIDGE <amount> <token> <from>-><to>`
437
+
438
+ **Example (dry run):**
439
+ ```bash
440
+ ape-claw bridge execute --request br_abc123 --json
441
+ ```
442
+
443
+ **Example (execute with confirmation):**
444
+ ```bash
445
+ ape-claw bridge execute --request br_abc123 --execute --confirm "BRIDGE 100 APE ethereum->apechain" --json
446
+ ```
447
+
448
+ **Example (autonomous execute):**
449
+ ```bash
450
+ ape-claw bridge execute --request br_abc123 --execute --autonomous --json
451
+ ```
452
+
453
+ **Output:** Returns request status, transaction details, and bridge execution result. Updates request with confirmed status.
454
+
455
+ ---
456
+
457
+ #### `bridge status`
458
+
459
+ Check bridge status and update from relay service.
460
+
461
+ **Synopsis:**
462
+ ```bash
463
+ ape-claw bridge status --request <requestId> --json
464
+ ```
465
+
466
+ **Required arguments:**
467
+ - `--request <requestId>` — Bridge request ID
468
+
469
+ **Optional arguments:** None
470
+
471
+ **Example:**
472
+ ```bash
473
+ ape-claw bridge status --request br_abc123 --json
474
+ ```
475
+
476
+ **Output:** Returns request details with updated status, relayStatus, destinationTxHash, and lastStatusCheckAt.
477
+
478
+ ---
479
+
480
+ ### Allowlist
481
+
482
+ #### `allowlist audit`
483
+
484
+ Audit the allowlist for unresolved collections and slug collisions.
485
+
486
+ **Synopsis:**
487
+ ```bash
488
+ ape-claw allowlist audit --json
489
+ ```
490
+
491
+ **Required arguments:** None
492
+
493
+ **Optional arguments:** None
494
+
495
+ **Example:**
496
+ ```bash
497
+ ape-claw allowlist audit --json
498
+ ```
499
+
500
+ **Output:** Returns total count, unresolvedCount, unresolved array, and slugCollisions array.
501
+
502
+ ---
503
+
504
+ ### Skill Installation
505
+
506
+ #### `skill install`
507
+
508
+ Install the ape-claw skill for Cursor/OpenClaw.
509
+
510
+ **Synopsis:**
511
+ ```bash
512
+ ape-claw skill install [--scope <local|global>] [--skills-dir <path>] --json
513
+ ```
514
+
515
+ **Required arguments:** None
516
+
517
+ **Optional arguments:**
518
+ - `--scope <local|global>` — Installation scope (default: `local`)
519
+ - `--skills-dir <path>` — Explicit skills directory path
520
+
521
+ **Example:**
522
+ ```bash
523
+ ape-claw skill install --scope local --json
524
+ ```
525
+
526
+ **Output:** Returns installed status, scope, sourceSkillPath, skillsRoot, skillPath, openclawAvailable, openclawCheckOk, and next steps.
527
+
528
+ ---
529
+
530
+ ### v2: Onchain Skills
531
+
532
+ #### `v2 skill mint`
533
+
534
+ Mint a new SkillNFT.
535
+
536
+ **Synopsis:**
537
+ ```bash
538
+ ape-claw v2 skill mint --rpc <url> --privateKey <pk> --skillNft <address> --registry <address> [--parentId <id>] [--royalty-receiver <address>] [--royalty-bps <n>] --json
539
+ ```
540
+
541
+ **Required arguments:**
542
+ - `--rpc <url>` — RPC URL (or `APE_CLAW_V2_RPC_URL` / `RPC_URL_33139`)
543
+ - `--privateKey <pk>` — Private key (or `APE_CLAW_V2_PRIVATE_KEY`)
544
+ - `--skillNft <address>` — SkillNFT contract address (or `APE_CLAW_V2_SKILL_NFT`)
545
+ - `--registry <address>` — SkillRegistry contract address (or `APE_CLAW_V2_SKILL_REGISTRY`)
546
+
547
+ **Optional arguments:**
548
+ - `--parentId <id>` — Parent skill ID (default: 0)
549
+ - `--royalty-receiver <address>` — Royalty receiver address (requires `--royalty-bps`)
550
+ - `--royalty-bps <n>` — Royalty basis points (requires `--royalty-receiver`)
551
+
552
+ **Example:**
553
+ ```bash
554
+ ape-claw v2 skill mint --rpc https://rpc.apechain.ai --privateKey 0x... --skillNft 0x... --registry 0x... --json
555
+ ```
556
+
557
+ **Output:** Returns ok status, skillId, txHash, and optional royalty fields.
558
+
559
+ ---
560
+
561
+ #### `v2 skill publish`
562
+
563
+ Publish a skill version to the registry.
564
+
565
+ **Synopsis:**
566
+ ```bash
567
+ ape-claw v2 skill publish --rpc <url> --privateKey <pk> --registry <address> --skillId <id> --file <skillcard.json> [--uri <uri>] [--riskTier <n>] --json
568
+ ```
569
+
570
+ **Required arguments:**
571
+ - `--rpc <url>` — RPC URL (or `APE_CLAW_V2_RPC_URL` / `RPC_URL_33139`)
572
+ - `--privateKey <pk>` — Private key (or `APE_CLAW_V2_PRIVATE_KEY`)
573
+ - `--registry <address>` — SkillRegistry contract address (or `APE_CLAW_V2_SKILL_REGISTRY`)
574
+ - `--skillId <id>` — Skill ID to publish
575
+ - `--file <skillcard.json>` — Path to skillcard JSON file
576
+
577
+ **Optional arguments:**
578
+ - `--uri <uri>` — URI for skill version (default: `file://<resolved-file-path>`)
579
+ - `--riskTier <n>` — Risk tier (default: 1)
580
+
581
+ **Example:**
582
+ ```bash
583
+ ape-claw v2 skill publish --rpc https://rpc.apechain.ai --privateKey 0x... --registry 0x... --skillId 1 --file ./skillcard.json --json
584
+ ```
585
+
586
+ **Output:** Returns ok status, skillId, versionHash, contentHash, uri, and txHash.
587
+
588
+ ---
589
+
590
+ ### v2: Intents
591
+
592
+ #### `v2 intent create`
593
+
594
+ Create an intent onchain.
595
+
596
+ **Synopsis:**
597
+ ```bash
598
+ ape-claw v2 intent create --rpc <url> --privateKey <pk> --intents <address> --payload <json-string> [--expiresAt <unixSec>] --json
599
+ ```
600
+
601
+ **Required arguments:**
602
+ - `--rpc <url>` — RPC URL (or `APE_CLAW_V2_RPC_URL` / `RPC_URL_33139`)
603
+ - `--privateKey <pk>` — Private key (or `APE_CLAW_V2_PRIVATE_KEY`)
604
+ - `--intents <address>` — IntentRegistry contract address (or `APE_CLAW_V2_INTENT_REGISTRY`)
605
+ - `--payload <json-string>` — Stringified intent payload
606
+
607
+ **Optional arguments:**
608
+ - `--expiresAt <unixSec>` — Expiration timestamp in Unix seconds (default: 0)
609
+
610
+ **Example:**
611
+ ```bash
612
+ ape-claw v2 intent create --rpc https://rpc.apechain.ai --privateKey 0x... --intents 0x... --payload '{"action":"buy","collection":"boredapeyachtclub"}' --json
613
+ ```
614
+
615
+ **Output:** Returns ok status, intentHash, txHash, and expiresAt.
616
+
617
+ ---
618
+
619
+ #### `v2 intent cancel`
620
+
621
+ Cancel an intent.
622
+
623
+ **Synopsis:**
624
+ ```bash
625
+ ape-claw v2 intent cancel --rpc <url> --privateKey <pk> --intents <address> --intentId <id> --json
626
+ ```
627
+
628
+ **Required arguments:**
629
+ - `--rpc <url>` — RPC URL (or `APE_CLAW_V2_RPC_URL` / `RPC_URL_33139`)
630
+ - `--privateKey <pk>` — Private key (or `APE_CLAW_V2_PRIVATE_KEY`)
631
+ - `--intents <address>` — IntentRegistry contract address (or `APE_CLAW_V2_INTENT_REGISTRY`)
632
+ - `--intentId <id>` — Intent ID to cancel
633
+
634
+ **Optional arguments:** None
635
+
636
+ **Example:**
637
+ ```bash
638
+ ape-claw v2 intent cancel --rpc https://rpc.apechain.ai --privateKey 0x... --intents 0x... --intentId 1 --json
639
+ ```
640
+
641
+ **Output:** Returns ok status, intentId, and txHash.
642
+
643
+ ---
644
+
645
+ ### v2: Receipts
646
+
647
+ #### `v2 receipt record`
648
+
649
+ Record an onchain receipt.
650
+
651
+ **Synopsis:**
652
+ ```bash
653
+ ape-claw v2 receipt record --rpc <url> --privateKey <pk> --receipts <address> --traceId <trace> [--subject <string>] [--payload <json-string>] [--uri <uri>] --json
654
+ ```
655
+
656
+ **Required arguments:**
657
+ - `--rpc <url>` — RPC URL (or `APE_CLAW_V2_RPC_URL` / `RPC_URL_33139`)
658
+ - `--privateKey <pk>` — Private key (or `APE_CLAW_V2_PRIVATE_KEY`)
659
+ - `--receipts <address>` — ReceiptRegistry contract address (or `APE_CLAW_V2_RECEIPT_REGISTRY`)
660
+ - `--traceId <trace>` — Trace identifier (or `--trace`)
661
+
662
+ **Optional arguments:**
663
+ - `--subject <string>` — Subject string (default: `agent:<agentId>`)
664
+ - `--payload <json-string>` — JSON payload string
665
+ - `--uri <uri>` — URI for receipt
666
+
667
+ **Example:**
668
+ ```bash
669
+ ape-claw v2 receipt record --rpc https://rpc.apechain.ai --privateKey 0x... --receipts 0x... --traceId trace_123 --subject "agent:my-bot" --payload '{"action":"buy"}' --json
670
+ ```
671
+
672
+ **Output:** Returns ok status, traceId, traceIdHash, contentHash, subject, subjectHash, uri, and txHash.
673
+
674
+ ---
675
+
676
+ #### `v2 receipt get`
677
+
678
+ Read a receipt from the registry.
679
+
680
+ **Synopsis:**
681
+ ```bash
682
+ ape-claw v2 receipt get --rpc <url> --receipts <address> --traceId <trace> --json
683
+ ```
684
+
685
+ **Required arguments:**
686
+ - `--rpc <url>` — RPC URL (or `APE_CLAW_V2_RPC_URL` / `RPC_URL_33139`)
687
+ - `--receipts <address>` — ReceiptRegistry contract address (or `APE_CLAW_V2_RECEIPT_REGISTRY`)
688
+ - `--traceId <trace>` — Trace identifier (or `--trace`)
689
+
690
+ **Optional arguments:** None
691
+
692
+ **Example:**
693
+ ```bash
694
+ ape-claw v2 receipt get --rpc https://rpc.apechain.ai --receipts 0x... --traceId trace_123 --json
695
+ ```
696
+
697
+ **Output:** Returns ok status, traceId, traceIdHash, isRecorded flag, and receipt data (if recorded).
698
+
699
+ ---
700
+
701
+ ### v2: PodVault
702
+
703
+ #### `v2 vault status`
704
+
705
+ Show PodVault state including members and pending revenue.
706
+
707
+ **Synopsis:**
708
+ ```bash
709
+ ape-claw v2 vault status --rpc <url> --vault <address> --json
710
+ ```
711
+
712
+ **Required arguments:**
713
+ - `--rpc <url>` — RPC URL (or `APE_CLAW_V2_RPC_URL`)
714
+ - `--vault <address>` — PodVault contract address (or `APE_CLAW_V2_POD_VAULT`)
715
+
716
+ **Optional arguments:** None
717
+
718
+ **Example:**
719
+ ```bash
720
+ ape-claw v2 vault status --rpc https://rpc.apechain.ai --vault 0x... --json
721
+ ```
722
+
723
+ **Output:** Returns ok status, podVault address, totalShares, totalReleasedNative, balance, memberCount, and members array with address, shares, and pendingNative.
724
+
725
+ ---
726
+
727
+ #### `v2 vault release`
728
+
729
+ Claim pending revenue from PodVault.
730
+
731
+ **Synopsis:**
732
+ ```bash
733
+ ape-claw v2 vault release --rpc <url> --privateKey <pk> --vault <address> --member <address> --json
734
+ ```
735
+
736
+ **Required arguments:**
737
+ - `--rpc <url>` — RPC URL (or `APE_CLAW_V2_RPC_URL`)
738
+ - `--privateKey <pk>` — Private key (or `APE_CLAW_V2_PRIVATE_KEY`)
739
+ - `--vault <address>` — PodVault contract address (or `APE_CLAW_V2_POD_VAULT`)
740
+ - `--member <address>` — Member address to release funds for
741
+
742
+ **Optional arguments:** None
743
+
744
+ **Example:**
745
+ ```bash
746
+ ape-claw v2 vault release --rpc https://rpc.apechain.ai --privateKey 0x... --vault 0x... --member 0x... --json
747
+ ```
748
+
749
+ **Output:** Returns ok status, tx hash, member address, and action (releaseNative).
750
+
751
+ ---
752
+
753
+ ### v2: Agent Execution
754
+
755
+ #### `v2 agent execute`
756
+
757
+ Execute a skill via AgentAccount.
758
+
759
+ **Synopsis:**
760
+ ```bash
761
+ ape-claw v2 agent execute --rpc <url> --privateKey <pk> --agentAccount <address> --module <address> [--input <hex>] [--value <n>] [--traceId <trace>] [--subject <string>] [--uri <uri>] --json
762
+ ```
763
+
764
+ **Required arguments:**
765
+ - `--rpc <url>` — RPC URL (or `APE_CLAW_V2_RPC_URL`)
766
+ - `--privateKey <pk>` — Private key (or `APE_CLAW_V2_PRIVATE_KEY`)
767
+ - `--agentAccount <address>` — AgentAccount contract address (or `APE_CLAW_V2_AGENT_ACCOUNT`)
768
+ - `--module <address>` — Module contract address to execute
769
+
770
+ **Optional arguments:**
771
+ - `--input <hex>` — Input data as hex string (default: `0x`)
772
+ - `--value <n>` — Native value to send (default: `0`)
773
+ - `--traceId <trace>` — Trace identifier (default: `agent_exec_<timestamp>`)
774
+ - `--subject <string>` — Subject string (default: `agent:<agentId>`)
775
+ - `--uri <uri>` — URI for execution
776
+
777
+ **Example:**
778
+ ```bash
779
+ ape-claw v2 agent execute --rpc https://rpc.apechain.ai --privateKey 0x... --agentAccount 0x... --module 0x... --input 0x... --json
780
+ ```
781
+
782
+ **Output:** Returns ok status, tx hash, module address, traceId, traceIdHash, and subjectHash.
783
+
784
+ ---
785
+
786
+ ### Pod
787
+
788
+ #### `pod init`
789
+
790
+ Initialize a pod workspace.
791
+
792
+ **Synopsis:**
793
+ ```bash
794
+ ape-claw pod init [--dir <path>] --json
795
+ ```
796
+
797
+ **Required arguments:** None
798
+
799
+ **Optional arguments:**
800
+ - `--dir <path>` — Target directory (default: `./pod-workspace`)
801
+
802
+ **Example:**
803
+ ```bash
804
+ ape-claw pod init --dir ./my-pod --json
805
+ ```
806
+
807
+ **Output:** Returns initialization result with workspace details.
808
+
809
+ ---
810
+
811
+ ## Notes
812
+
813
+ - **JSON Output**: Always use `--json` flag for deterministic parsing and agent integration.
814
+ - **Confirmation Phrases**: When `policy.execution.confirmPhraseRequired` is enabled, use `--autonomous` to auto-generate confirm phrases, or provide exact phrases via `--confirm`.
815
+ - **Daily Spend Cap**: Both NFT purchases and bridge transactions count toward the daily spend cap configured in policy.
816
+ - **Policy Enforcement**: All buy and bridge operations are gated by policy checks. Use `--allow-unsafe` to bypass (not recommended).
817
+ - **Environment Variables**: Many arguments can be provided via environment variables. Check each command's documentation for specific env var names.
818
+ - **State Files**: Quotes and bridge requests are persisted locally in state files for tracking and audit purposes.