@ariestools/cli 0.1.6

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 ADDED
@@ -0,0 +1,1251 @@
1
+ # @ariestools/cli
2
+
3
+ Aries Tools CLI — a suite by Arie Trouw for AI-client tooling, Claude/Codex audit trails, sandboxed command execution, XL1 datalake provisioning, content hashing (strict + fuzzy + perceptual), XL1 wallet management, payload witnessing, and XYO protocol utilities.
4
+
5
+ ## Installation
6
+
7
+ ```sh
8
+ npm install -g @ariestools/cli
9
+ # or
10
+ pnpm add -g @ariestools/cli
11
+ ```
12
+
13
+ ## Quick start
14
+
15
+ ```sh
16
+ aries --help
17
+ aries info
18
+ aries hash --algorithm pdq ./photo.jpg
19
+ ariesi plex libraries
20
+ aries wallet create
21
+ aries witness url --url https://example.com
22
+ aries datalake list
23
+ ```
24
+
25
+ ## Top-level commands
26
+
27
+ ```text
28
+ aries ai AI client tools
29
+ aries audit Manage the Claude Code audit trail
30
+ aries bank Manage bank witness settings
31
+ aries chain Run a local published-chain S3/REST server
32
+ aries clamp Run commands inside a permission-controlled sandbox
33
+ aries datalake Provision and manage on-demand XL1 datalakes
34
+ aries hash [file] Generate a hash (sha256, xyo, fuzzy, perceptual)
35
+ aries info Display version and environment info
36
+ aries npmjs Inspect and lint npmjs org packages
37
+ aries pentair Manage Pentair ScreenLogic systems
38
+ ariesi plex Inspect and manage Plex Media Server (internal build)
39
+ aries wallet XL1 wallet — seed phrases, accounts, transactions, contacts
40
+ aries witness Observe data and produce XYO-compliant payloads
41
+ aries xyo XYO protocol utilities
42
+ ```
43
+
44
+ ## Global options
45
+
46
+ Available on every command:
47
+
48
+ | Option | Description |
49
+ |---|---|
50
+ | `-v, --verbose` | Enable verbose output |
51
+ | `--version` | Show version number |
52
+ | `--help` | Show help |
53
+
54
+ ---
55
+
56
+ ## `aries chain` — Local published-chain server
57
+
58
+ ```sh
59
+ # Plain HTTP on loopback (default)
60
+ aries chain up
61
+
62
+ # Locally trusted HTTPS at https://chain.aries.test:8791 (macOS)
63
+ brew install mkcert
64
+ aries chain up --ssl auto
65
+ ```
66
+
67
+ The server exposes the published-chain buckets at `/blocks`, `/state`, and
68
+ `/indexes`. `--ssl auto` keeps the listener on `127.0.0.1`, installs or reuses
69
+ mkcert's local development CA, generates a certificate under
70
+ `~/.aries/chain/tls`, and adds an idempotent `chain.aries.test` entry to
71
+ `/etc/hosts`. The first run may request administrator authorization. The CA and
72
+ hosts entry remain installed after `chain down`; `chain reset` removes the
73
+ generated Aries certificate files.
74
+
75
+ | Option | Default | Description |
76
+ |---|---|---|
77
+ | `--port <number>` | `8791` | Listener port |
78
+ | `--host <address>` | `127.0.0.1` | Bind address; auto TLS requires the default |
79
+ | `--ssl off\|auto` | `off` | Enable macOS automatic local HTTPS setup |
80
+ | `--backing memory` | `memory` | Ephemeral storage, wiped on shutdown |
81
+ | `--timeout <seconds>` | `10` | Startup health-check timeout |
82
+
83
+ The ready banner prints the `S3_ENDPOINT` used by `ariesi xyo s3 ...`. Aries
84
+ automatically selects path-style S3 addressing and trusts the generated CA for
85
+ the `chain.aries.test` endpoint. `S3_CA_BUNDLE` can provide a different private
86
+ CA file for another HTTPS S3-compatible endpoint.
87
+
88
+ ---
89
+
90
+ ## `aries bank` — Manage bank witness settings
91
+
92
+ ```sh
93
+ aries bank capitalone config get
94
+ aries bank capitalone config set base-url https://api-sandbox.capitalone.com
95
+ aries bank capitalone config set token-url https://api-sandbox.capitalone.com/oauth2/token
96
+ aries bank capitalone config set client-id "$CAPITALONE_CLIENT_ID"
97
+ aries bank capitalone config set client-secret "$CAPITALONE_CLIENT_SECRET"
98
+ aries bank capitalone config set accounts-path /accounts
99
+ aries bank capitalone config set balances-path '/accounts/{accountId}/balances'
100
+ aries bank capitalone config set transactions-path '/accounts/{accountId}/transactions'
101
+ ```
102
+
103
+ Capital One config is stored in `~/.aries/bank/capitalone.json` with restricted
104
+ file permissions. `ARIES_HOME` overrides the `~/.aries` root.
105
+
106
+ Capital One U.S. Customer Transactions is a private DevExchange product. Aries
107
+ therefore requires the endpoint paths supplied by your Capital One partner docs
108
+ for `aries witness bank --resource accounts`.
109
+
110
+ The public sandbox `Retrieve Consumer Bank Products` product is a deposit product
111
+ catalog, not personal account data. Use `aries witness bank --resource products`
112
+ for that API; Aries uses Capital One's documented sandbox defaults unless you
113
+ override `base-url` or `token-url`.
114
+
115
+ ### Capital One config keys
116
+
117
+ | Key | Env var | Default | Description |
118
+ |---|---|---|---|
119
+ | `env` | `ARIES_CAPITALONE_ENV` | `sandbox` | Environment label: `sandbox` or `production` |
120
+ | `base-url` | `ARIES_CAPITALONE_BASE_URL` | | Capital One API base URL |
121
+ | `token-url` | `ARIES_CAPITALONE_TOKEN_URL` | | OAuth client-credentials token URL |
122
+ | `client-id` | `ARIES_CAPITALONE_CLIENT_ID` | | OAuth client id |
123
+ | `client-secret` | `ARIES_CAPITALONE_CLIENT_SECRET` | | OAuth client secret |
124
+ | `scope` | `ARIES_CAPITALONE_SCOPE` | | Optional OAuth scope |
125
+ | `accounts-path` | `ARIES_CAPITALONE_ACCOUNTS_PATH` | | Accounts endpoint path |
126
+ | `balances-path` | `ARIES_CAPITALONE_BALANCES_PATH` | | Balances endpoint path; may include `{accountId}` |
127
+ | `transactions-path` | `ARIES_CAPITALONE_TRANSACTIONS_PATH` | | Transactions endpoint path; may include `{accountId}` |
128
+
129
+ `config get` redacts `client-secret`; pass `--show-secrets` to print it. Access
130
+ tokens are not persisted; pass `--access-token` or set `ARIES_CAPITALONE_ACCESS_TOKEN`
131
+ for one run.
132
+
133
+ ---
134
+
135
+ ## `aries pentair` — Manage Pentair ScreenLogic systems
136
+
137
+ ```sh
138
+ aries pentair config get
139
+ aries pentair config get address
140
+ aries pentair config set address 192.0.2.10
141
+ aries pentair config set port 80
142
+ aries pentair config set system-name "Pentair ScreenLogic"
143
+ aries pentair circuit runtime set --circuit-id 6 --hours 24 --on
144
+ ```
145
+
146
+ Pentair config is stored in `~/.aries/pentair/config.json` and is used by the
147
+ Pentair witness and circuit commands. `ARIES_HOME` overrides the `~/.aries` root.
148
+
149
+ ### Config keys
150
+
151
+ | Key | Default | Description |
152
+ |---|---|---|
153
+ | `address` | | ScreenLogic adapter IP for direct connection; omit to use UDP discovery |
154
+ | `port` | `80` | ScreenLogic adapter TCP port for direct connection |
155
+ | `password` | `SCREENLOGIC_PASSWORD` | ScreenLogic password for direct connection |
156
+ | `system-name` | `Pentair ScreenLogic` | ScreenLogic system name for direct connection |
157
+ | `response-timeout` | `15000` | Milliseconds to wait for each ScreenLogic command response |
158
+ | `search-timeout` | `5000` | Milliseconds to wait for each UDP discovery attempt |
159
+ | `search-attempts` | `3` | Number of UDP discovery attempts before failing |
160
+ | `series-file` | `~/.aries/pentair/intellichem.jsonl` | JSONL file used for saved IntelliChem samples and graphing |
161
+
162
+ `config get` redacts `password`; pass `--show-secrets` to print it.
163
+
164
+ ### `aries pentair circuit runtime set`
165
+
166
+ Set the ScreenLogic circuit egg timer. Runtime values are sent to ScreenLogic as
167
+ minutes; `--hours 24` becomes `1440`.
168
+
169
+ | Option | Description |
170
+ |---|---|
171
+ | `--circuit-id <id>` | Pentair circuit id to update |
172
+ | `--hours <n>` | Runtime in hours; mutually exclusive with `--minutes` |
173
+ | `--minutes <n>` | Runtime in minutes; mutually exclusive with `--hours` |
174
+ | `--on` | Turn the circuit on after setting the runtime |
175
+ | `--json` | Output as JSON |
176
+
177
+ Connection override flags are also accepted: `--address`, `--port`,
178
+ `--password`, `--system-name`, `--response-timeout`, `--search-timeout`, and
179
+ `--search-attempts`.
180
+
181
+ ---
182
+
183
+ ## `ariesi plex` — Plex Media Server tools
184
+
185
+ The Plex command is available from the internal `ariesi` build with
186
+ `license.tier=internal`.
187
+
188
+ ### `ariesi plex libraries`
189
+
190
+ List libraries configured in a Plex Media Server. By default, Aries tries the local server at `http://127.0.0.1:32400` and discovers the Plex token from `PLEX_TOKEN`, `X_PLEX_TOKEN`, `PLEX_AUTH_TOKEN`, local Plex `.LocalAdminToken`, or a local Plex `Preferences.xml`. If local API auth still blocks access, Aries falls back to the local Plex library database and then `Plex Media Scanner --list`.
191
+
192
+ | Option | Default | Description |
193
+ |---|---|---|
194
+ | `--url <url>` | `PLEX_URL` or `http://127.0.0.1:32400` | Plex server URL |
195
+ | `--token <token>` | env/local Preferences.xml | Plex auth token |
196
+ | `--preferences <path>` | auto-detect | Plex `Preferences.xml` path for token discovery |
197
+ | `--database <path>` | auto-detect | Plex library database path for local fallback |
198
+ | `--no-fallback` | | Disable fallback to `Plex Media Scanner --list` when the API is unavailable |
199
+ | `--json` | `false` | Output as JSON |
200
+
201
+ ### `ariesi plex lint [--library <name-or-id>]`
202
+
203
+ Run read-only lint checks against the Plex setup. The first rule, `multiple-sources`, reports items that have more than one original source media copy. Plex optimized versions and files matching Plex's local extras naming conventions do not count as sources.
204
+
205
+ | Option | Default | Description |
206
+ |---|---|---|
207
+ | `-l, --library <name-or-id>` | all libraries | Plex library name or ID, e.g. `Movies` or `9` |
208
+ | `--database <path>` | auto-detect | Plex library database path |
209
+ | `--json` | `false` | Output as JSON |
210
+
211
+ ### `ariesi plex items --library <name-or-id>`
212
+
213
+ List top-level items in a Plex library from the local Plex database, including media resolution and optimization details.
214
+
215
+ | Option | Default | Description |
216
+ |---|---|---|
217
+ | `-l, --library <name-or-id>` | required | Plex library name or ID, e.g. `Movies` or `9` |
218
+ | `--database <path>` | auto-detect | Plex library database path |
219
+ | `--fields <list>` | `media,optimizations` | Comma-separated details: `media`, `optimizations`, `files`, `all` |
220
+ | `--limit <n>` | | Maximum number of items to inspect |
221
+ | `--json` | `false` | Output as JSON |
222
+
223
+ ### `ariesi plex items optimize --tv --library <name-or-id>`
224
+
225
+ Queue Plex "Optimized for TV" versions for items that do not already have one. Aries inspects the local Plex database first, skips items already marked `Optimized for TV`, and then queues missing items through the local Plex optimizer API.
226
+
227
+ | Option | Default | Description |
228
+ |---|---|---|
229
+ | `-l, --library <name-or-id>` | required | Plex library name or ID, e.g. `Movies` or `9` |
230
+ | `--tv` | required | Optimize missing items for Plex's TV profile |
231
+ | `--dry-run` | `false` | Show what would be queued without changing Plex |
232
+ | `--url <url>` | `PLEX_URL` or `http://127.0.0.1:32400` | Plex server URL |
233
+ | `--token <token>` | env/local token discovery | Plex auth token |
234
+ | `--preferences <path>` | auto-detect | Plex `Preferences.xml` path for token discovery |
235
+ | `--database <path>` | auto-detect | Plex library database path |
236
+ | `--limit <n>` | | Maximum number of missing optimizations to queue |
237
+ | `--inspect-limit <n>` | | Maximum number of library items to inspect |
238
+ | `--json` | `false` | Output as JSON |
239
+
240
+ ### `ariesi plex items optimize queue [--library <name-or-id>]`
241
+
242
+ List items currently in Plex's optimizer queue. When `--library` is omitted, Aries lists queued optimizer items across all libraries.
243
+
244
+ | Option | Default | Description |
245
+ |---|---|---|
246
+ | `-l, --library <name-or-id>` | all libraries | Plex library name or ID, e.g. `Movies` or `9` |
247
+ | `--url <url>` | `PLEX_URL` or `http://127.0.0.1:32400` | Plex server URL |
248
+ | `--token <token>` | env/local token discovery | Plex auth token |
249
+ | `--preferences <path>` | auto-detect | Plex `Preferences.xml` path for token discovery |
250
+ | `--database <path>` | auto-detect | Plex library database path for library names |
251
+ | `--json` | `false` | Output as JSON |
252
+
253
+ ---
254
+
255
+ ## `aries ai` — AI client tools
256
+
257
+ ### `aries ai detect`
258
+
259
+ Scan for installed AI clients.
260
+
261
+ | Option | Default | Description |
262
+ |---|---|---|
263
+ | `--json` | `false` | Output as JSON |
264
+
265
+ ### `aries ai sync`
266
+
267
+ Sync AI config between Claude Code and Codex.
268
+
269
+ | Option | Default | Description |
270
+ |---|---|---|
271
+ | `--from <claude\|agents>` | `claude` | Source to sync from (the authority) |
272
+
273
+ ### `aries ai lint [path]`
274
+
275
+ Check Claude Code and Codex AI configuration drift. The folder defaults to the current directory.
276
+
277
+ | Option | Default | Description |
278
+ |---|---|---|
279
+ | `--scope <all\|project\|home>` | `all` | Check project config, shared/custom home config, or both |
280
+ | `--json` | `false` | Output as JSON |
281
+
282
+ ---
283
+
284
+ ## `aries audit` — Manage the Claude Code audit trail
285
+
286
+ ```sh
287
+ aries audit ai # Show current AI metadata recorded in audit entries
288
+ aries audit list # List audit sessions
289
+ aries audit show <session-id> # Show audit trail for a session
290
+ aries audit search <query> # Search audit logs
291
+ aries audit install [provider] # Install the audit plugin (claude | codex | both)
292
+ aries audit uninstall [provider] # Uninstall the audit plugin
293
+ aries audit open # Open the audit log directory in Finder/Explorer
294
+ aries audit status # Show audit plugin status and log statistics
295
+ ```
296
+
297
+ ### Per-command flags
298
+
299
+ #### `aries audit ai`
300
+ | Option | Default | Description |
301
+ |---|---|---|
302
+ | `--json` | `false` | Output as JSON |
303
+
304
+ #### `aries audit list`
305
+ | Option | Default | Description |
306
+ |---|---|---|
307
+ | `-d, --date <YYYY-MM-DD>` | | Filter by date |
308
+
309
+ #### `aries audit show <session-id>`
310
+ | Positional | | Description |
311
+ |---|---|---|
312
+ | `session-id` | required | Session ID (or prefix) |
313
+
314
+ | Option | Default | Description |
315
+ |---|---|---|
316
+ | `-f, --format <text\|json>` | `text` | Output format |
317
+
318
+ #### `aries audit search <query>`
319
+ | Positional | | Description |
320
+ |---|---|---|
321
+ | `query` | required | Search text |
322
+
323
+ | Option | Default | Description |
324
+ |---|---|---|
325
+ | `-d, --date <YYYY-MM-DD>` | | Filter by date |
326
+ | `-n, --limit <n>` | `50` | Max results |
327
+
328
+ #### `aries audit install [provider]` / `aries audit uninstall [provider]`
329
+ | Positional | | Description |
330
+ |---|---|---|
331
+ | `provider` | both | `claude` or `codex` |
332
+
333
+ `open`, `status` take no command-specific options.
334
+
335
+ ---
336
+
337
+ ## `aries clamp` — Run commands inside a permission-controlled sandbox
338
+
339
+ ```sh
340
+ aries clamp run <command> [args..] # Run a command inside the clamp sandbox
341
+ aries clamp policy list # List available clamp policies
342
+ aries clamp policy show <name> # Show a clamp policy
343
+ aries clamp policy init # Create a starter .aries-clamp.json
344
+ ```
345
+
346
+ ### Per-command flags
347
+
348
+ #### `aries clamp run <command> [args..]`
349
+ | Positional | | Description |
350
+ |---|---|---|
351
+ | `command` | required | Command to run inside the sandbox |
352
+ | `args` | `[]` | Arguments for the command |
353
+
354
+ | Option | Default | Description |
355
+ |---|---|---|
356
+ | `-p, --policy <path-or-name>` | | Policy file path or name |
357
+ | `--audit` | `true` | Enable audit logging |
358
+ | `--dry-run` | `false` | Show what would be sandboxed without running |
359
+
360
+ #### `aries clamp policy show <name>`
361
+ | Positional | | Description |
362
+ |---|---|---|
363
+ | `name` | required | Policy name or file path |
364
+
365
+ `policy list` and `policy init` take no command-specific options.
366
+
367
+ ---
368
+
369
+ ## `aries datalake` — Provision and manage on-demand XL1 datalakes
370
+
371
+ ### Authentication
372
+
373
+ #### `aries datalake login`
374
+ | Option | Default | Description |
375
+ |---|---|---|
376
+ | `--base-url <url>` | | Control-plane base URL (P0: required) |
377
+ | `--token <jwt>` | | Pre-issued auth token (P0: required; OAuth lands in P1) |
378
+
379
+ `aries datalake logout` — clears stored credentials, no flags.
380
+
381
+ ### Lifecycle
382
+
383
+ #### `aries datalake create <name>`
384
+ | Positional | | Description |
385
+ |---|---|---|
386
+ | `name` | required | Human-friendly name (unique per owner) |
387
+
388
+ | Option | Default | Description |
389
+ |---|---|---|
390
+ | `-t, --tier <small\|medium\|large\|archive>` | `small` | Service tier |
391
+ | `-s, --size <e.g. 10GB>` | | Capacity |
392
+ | `--iops <n>` | | Provisioned IOPS target |
393
+ | `-r, --region <us-west-2\|us-east-1\|eu-west-1>` | | Deployment region |
394
+ | `--retention-days <n>` | tier default | Retention in days |
395
+ | `--verify-hashes` | `false` | Reject inserts whose `$hash` does not match the content digest |
396
+ | `--rate-auth-per-minute <n>` | | Override: authenticated requests per minute |
397
+ | `--rate-anon-per-minute <n>` | | Override: anonymous requests per minute |
398
+ | `--rate-burst-factor <n>` | | Override: rate-limit burst factor (1 = no burst) |
399
+
400
+ `aries datalake list` — no flags.
401
+
402
+ #### `aries datalake describe [name]` / `aries datalake destroy [name]`
403
+ | Positional | | Description |
404
+ |---|---|---|
405
+ | `name` | active default | Datalake name or id |
406
+
407
+ `destroy` adds:
408
+ | Option | Default | Description |
409
+ |---|---|---|
410
+ | `-f, --force` | `false` | Required confirmation flag |
411
+
412
+ #### `aries datalake use [name]`
413
+
414
+ Sets the default datalake for subsequent commands. Omit the name to clear.
415
+
416
+ ### Access control
417
+
418
+ #### `aries datalake grant <name> <principal>`
419
+ | Positional | | Description |
420
+ |---|---|---|
421
+ | `name` | required | Datalake name or id |
422
+ | `principal` | required | User id, or the literal `public` |
423
+
424
+ | Option | Default | Description |
425
+ |---|---|---|
426
+ | `-r, --role <viewer\|runner>` | `viewer` | Role to grant |
427
+ | `--confirm-public` | `false` | Required to grant `public runner` (anonymous writes) |
428
+
429
+ #### `aries datalake revoke <name> <principal>`
430
+
431
+ Same positionals; no command-specific options.
432
+
433
+ #### `aries datalake token [name]`
434
+ | Positional | | Description |
435
+ |---|---|---|
436
+ | `name` | active default | Datalake name or id |
437
+
438
+ | Option | Default | Description |
439
+ |---|---|---|
440
+ | `-r, --role <viewer\|runner>` | `viewer` | Role encoded in the token |
441
+ | `--ttl <seconds>` | server-capped | Lifetime in seconds |
442
+
443
+ ### Data plane
444
+
445
+ #### `aries datalake push <file> [name]`
446
+ | Positional | | Description |
447
+ |---|---|---|
448
+ | `file` | required | Path to a `.json` (array) or `.jsonl` (one payload/line) file |
449
+ | `name` | active default | Target datalake |
450
+
451
+ | Option | Default | Description |
452
+ |---|---|---|
453
+ | `--batch-size <n>` | `500` | Max payloads per HTTP request |
454
+ | `--verify` | `false` | Verify each payload's `$hash` against content locally before pushing |
455
+ | `--xl1-sdk` | `false` | Use the real `@xyo-network/xl1-protocol-sdk RestDataLakeRunner` |
456
+
457
+ #### `aries datalake fetch <hash> [name]`
458
+ | Positional | | Description |
459
+ |---|---|---|
460
+ | `hash` | required | Content hash of the payload |
461
+ | `name` | active default | Target datalake |
462
+
463
+ | Option | Default | Description |
464
+ |---|---|---|
465
+ | `--raw` | `false` | Print only the raw JSON payload (no header) |
466
+ | `--xl1-sdk` | `false` | Use the real `@xyo-network/xl1-protocol-sdk RestDataLakeViewer` |
467
+
468
+ #### `aries datalake tail [name]`
469
+ | Positional | | Description |
470
+ |---|---|---|
471
+ | `name` | active default | Datalake name or id |
472
+
473
+ | Option | Default | Description |
474
+ |---|---|---|
475
+ | `-f, --follow` | `false` | Keep polling for new payloads after draining the backlog |
476
+ | `-n, --limit <n>` | `50` | Max payloads per page |
477
+ | `--cursor <hash>` | | Resume after this hash (exclusive) |
478
+ | `--schemas <csv>` | | Comma-separated list of schemas to include |
479
+ | `--poll-interval <ms>` | `1000` | Poll interval in ms when following |
480
+
481
+ ### Audit (data-plane log inspection)
482
+
483
+ ```sh
484
+ aries datalake audit # default: view
485
+ aries datalake audit view # Print audit log rows
486
+ aries datalake audit purge # Delete rotated audit files older than --max-age-days
487
+ ```
488
+
489
+ #### `aries datalake audit view`
490
+ | Option | Default | Description |
491
+ |---|---|---|
492
+ | `-f, --follow` | `false` | Stream new rows as they arrive (tails the most recent file) |
493
+ | `-n, --lines <n>` | `50` | Tail this many rows (0 = start fresh in `--follow` mode) |
494
+ | `-d, --datalake <id>` | | Filter by datalake name or id |
495
+ | `--status <prefix>` | | Status code prefix filter (e.g. `4` matches 4xx) |
496
+ | `--method <verb>` | | HTTP method filter (`GET`, `POST`, …) |
497
+ | `--authenticated <true\|false>` | | Show only authenticated or only anonymous requests |
498
+ | `--grep <regex>` | | Regex pattern applied to the raw JSON line |
499
+ | `--file <path>` | | File or directory (auto-detects rotation layout) |
500
+
501
+ #### `aries datalake audit purge`
502
+ | Option | Default | Description |
503
+ |---|---|---|
504
+ | `--max-age-days <n>` | required | Retention window; files older than this are deleted |
505
+ | `--directory <path>` | `<ARIES_HOME>/dev/audit` | Rotation directory |
506
+ | `--dry-run` | `false` | Report what would be deleted without removing anything |
507
+
508
+ ### Local development
509
+
510
+ ```sh
511
+ aries datalake dev up # Start the local control + data plane dev server
512
+ aries datalake dev down # Stop it (clears credentials)
513
+ aries datalake dev status # Report whether the local dev server is running and healthy
514
+ aries datalake dev logs # Print recent dev server log output
515
+ aries datalake dev reset # Stop the dev server and wipe all local state
516
+ ```
517
+
518
+ #### `aries datalake dev up`
519
+ | Option | Default | Description |
520
+ |---|---|---|
521
+ | `--control-port <n>` | `8787` | Control-plane port |
522
+ | `--plane-port <n>` | `8788` | Data-plane port |
523
+ | `--timeout <s>` | `10` | Seconds to wait for health |
524
+ | `--persist` | `false` | Persist store state to disk so it survives restarts |
525
+ | `--audit` | `false` | Write a JSONL audit log of every data-plane request |
526
+ | `--audit-rotate` | `false` | Rotate the audit log daily (writes to `<home>/dev/audit/`) |
527
+ | `--audit-keep-days <n>` | | Prune rotated audit files older than this many days |
528
+
529
+ #### `aries datalake dev logs`
530
+ | Option | Default | Description |
531
+ |---|---|---|
532
+ | `-f, --follow` | `false` | Stream new lines as they arrive |
533
+ | `-n, --lines <n>` | `50` | Number of tail lines to show |
534
+
535
+ `down`, `status`, `reset` take no command-specific options.
536
+
537
+ ---
538
+
539
+ ## `ariesi signing-pool` — XL1 gas-sponsored transaction signing
540
+
541
+ Signing pools are wallet-backed servers that co-sign XL1 transactions so the
542
+ pool address pays gas instead of the caller. The transaction must use signature
543
+ slot 0 for the pool and signature slot 1 for the caller:
544
+
545
+ - `addresses[0]` is the signing-pool address.
546
+ - `addresses[1]` is the authenticated caller address.
547
+ - `$signatures[0]` must be `null` when submitted.
548
+ - `$signatures[1]` must already verify against `addresses[1]`.
549
+
550
+ `signing-pool sign` submits a hydrated transaction tuple
551
+ `[TransactionBoundWitness, payloads[]]`. For compatibility with the original
552
+ CLI helper, the input file may also be an unsigned template; in that case the
553
+ CLI fills the pool/caller slots, signs slot 1 with the active XL1 wallet, and
554
+ sends the hydrated tuple to the pool.
555
+
556
+ ```sh
557
+ ariesi signing-pool create <name> --daily-limit <atto> --max-tx-gas <atto> --min-exp-blocks 10 --max-exp-blocks 500
558
+ ariesi signing-pool grant <id> <caller-address>
559
+ ariesi signing-pool sign <id> ./tx.json --output ./signed-tx.json
560
+ ariesi signing-pool dev up --xl1-node-rpc-url http://127.0.0.1:8545
561
+ ```
562
+
563
+ The control plane rejects transactions it cannot inspect. In this phase, every
564
+ payload elevated on-chain via `script: ["elevate|<payload-hash>"]` must be
565
+ present in the hydrated payload array, and `network.xyo.transfer` is prohibited
566
+ as an elevated/on-chain payload.
567
+
568
+ ### Local development
569
+
570
+ ```sh
571
+ ariesi signing-pool dev up # Start the local signing-pool control plane
572
+ ariesi signing-pool dev down # Stop it
573
+ ariesi signing-pool dev status # Report whether it is running and healthy
574
+ ariesi signing-pool dev logs # Print recent server log output
575
+ ariesi signing-pool dev reset # Stop the server and wipe local state
576
+ ```
577
+
578
+ #### `ariesi signing-pool dev up`
579
+ | Option | Default | Description |
580
+ |---|---|---|
581
+ | `--port <n>` | `8790` | Control-plane port |
582
+ | `--timeout <s>` | `10` | Seconds to wait for health |
583
+ | `--persist` | `false` | Persist pool state under `<ARIES_HOME>/signing-pool-dev/store` |
584
+ | `--audience <aud>` | `aries-signing-pool` | JWT audience accepted by the dev control plane |
585
+ | `--master-mnemonic <phrase>` | generated | Override the dev mnemonic used to derive pool signing accounts |
586
+ | `--xl1-node-rpc-url <url>` | `$XL1_NODE_RPC_URL` | XL1 node RPC URL used to read current block height |
587
+
588
+ The dev client auto-discovers a live local signing-pool state when
589
+ `--base-url`, `$SIGNING_POOL_CONTROL_URL`, and `$TOKEN_POOL_CONTROL_URL` are not
590
+ set.
591
+
592
+ ### Upstream builder follow-up
593
+
594
+ The signing pool currently uses a narrow local helper to fill a single
595
+ `$signatures[]` slot without mutating the rest of the bound witness. The proper
596
+ upstream fix belongs in `sdk-protocol-js`: add explicit partial-signing support
597
+ to `BoundWitnessBuilder`, then expose that through `TransactionBuilder` so a
598
+ caller can build/sign slot 1 and a signing pool can later sign slot 0 while
599
+ preserving the hydrated transaction tuple and all existing signatures.
600
+
601
+ ---
602
+
603
+ ## `aries hash [file]` — content hashing
604
+
605
+ ```text
606
+ aries hash [file] [options]
607
+ aries hash compare <hashA> <hashB> --algorithm <name> [--json]
608
+ ```
609
+
610
+ Reads input from `[file]` (positional), `--string`, or piped stdin (priority order). Dispatches to one of 11 algorithms.
611
+
612
+ ### Options
613
+
614
+ | Option | Default | Description |
615
+ |---|---|---|
616
+ | `-a, --algorithm <name>` | `sha256` | Algorithm — see the matrix below |
617
+ | `-s, --string <text>` | | Hash this string instead of a file/stdin |
618
+ | `-x, --xyo` | `false` | Shortcut for `--algorithm xyo` (input must be JSON) |
619
+ | `--base64` | `false` | Re-encode hex output as base64 (only for hex-output algorithms) |
620
+ | `--fps <n>` | `1` | Frames-per-second sample rate (`video-frames` only) |
621
+ | `--frame-algorithm <phash\|pdq>` | `phash` | Per-frame hash for `video-frames` |
622
+
623
+ ### Algorithm reference
624
+
625
+ | Algorithm | Family | Input | Output | External binary | Compare metric |
626
+ |---|---|---|---|---|---|
627
+ | `sha256` | strict | bytes | 64-char hex | — | `exact-match` |
628
+ | `xyo` | strict | JSON | 64-char hex | — | `exact-match` |
629
+ | `tlsh` | fuzzy-byte | ≥50 bytes | 70-char hex | — | `tlsh-bit-hamming` ⚠ |
630
+ | `nilsimsa` | fuzzy-byte | bytes | 64-char hex | — | `nilsimsa-score` |
631
+ | `ssdeep` | fuzzy-byte | bytes | `bs:h1:h2` | `ssdeep` | `ssdeep-levenshtein` ⚠ |
632
+ | `phash` | perceptual-image | image | 16-char hex (64-bit) | — | `hamming-64` |
633
+ | `dhash` | perceptual-image | image | 16-char hex (64-bit) | — | `hamming-64` |
634
+ | `blockhash` | perceptual-image | image | 16-char hex (64-bit) | — | `hamming-64` |
635
+ | `pdq` | perceptual-image | image | 64-char hex (256-bit) — Meta PDQ via WASM | — | `hamming-256` |
636
+ | `chromaprint` | audio | audio file | JSON `{duration, fingerprint[]}` | `fpcalc` | `chromaprint-windowed-hamming` |
637
+ | `video-frames` | video | video file | JSON `{fps, frames:[{t,hash}]}` | `ffmpeg` | `frame-sequence-<algo>@<fps>fps` |
638
+
639
+ ⚠ — Approximations, not the canonical reference scores:
640
+ - `tlsh-bit-hamming` — the upstream `tlsh` npm package only exposes hashing, not the canonical TLSH-diff algorithm. We use bit-level Hamming over the hash body as a proxy.
641
+ - `ssdeep-levenshtein` — block-size-aware Levenshtein, without the canonical block-size attenuation curve.
642
+
643
+ ### External binary install
644
+
645
+ ```sh
646
+ # macOS
647
+ brew install ssdeep chromaprint ffmpeg
648
+
649
+ # Debian/Ubuntu
650
+ apt install ssdeep libchromaprint-tools ffmpeg
651
+
652
+ # Windows
653
+ choco install ssdeep chromaprint ffmpeg
654
+ ```
655
+
656
+ Each algorithm probes its binary at hash time and prints clear install instructions if the binary is missing.
657
+
658
+ ### Examples
659
+
660
+ ```sh
661
+ # Strict
662
+ aries hash --string "hello"
663
+ aries hash ./payload.json --algorithm xyo
664
+
665
+ # Byte-fuzzy
666
+ aries hash --algorithm tlsh ./binary.exe
667
+ aries hash compare <hashA> <hashB> --algorithm tlsh
668
+
669
+ # Perceptual image
670
+ aries hash --algorithm phash ./photo.jpg
671
+ aries hash --algorithm pdq ./photo.jpg
672
+ aries hash compare <hashA> <hashB> --algorithm pdq
673
+
674
+ # Audio
675
+ aries hash --algorithm chromaprint ./song.mp3 > song.fp.json
676
+ aries hash compare "$(cat a.fp.json)" "$(cat b.fp.json)" --algorithm chromaprint --json
677
+
678
+ # Video
679
+ aries hash --algorithm video-frames --fps 1 ./movie.mkv > movie.fp.json
680
+ aries hash --algorithm video-frames --fps 1 --frame-algorithm pdq ./movie.mkv > movie-pdq.fp.json
681
+ aries hash compare "$(cat a.fp.json)" "$(cat b.fp.json)" --algorithm video-frames
682
+ ```
683
+
684
+ ### `aries hash compare <hashA> <hashB>`
685
+
686
+ | Positional | | Description |
687
+ |---|---|---|
688
+ | `hashA` | required | First hash |
689
+ | `hashB` | required | Second hash |
690
+
691
+ | Option | Default | Description |
692
+ |---|---|---|
693
+ | `-a, --algorithm <name>` | required | Algorithm that produced the hashes |
694
+ | `--json` | `false` | Print full result as JSON |
695
+
696
+ Plain output: `<similarity>\t<metric>[\tdistance=<n>]` (similarity is a 0..1 float, 1 = identical). JSON output: `{"similarity":0.93,"distance":18,"metric":"hamming-256"}`.
697
+
698
+ The compare command needs only the two hash strings — works against hashes generated on different machines.
699
+
700
+ ---
701
+
702
+ ## `aries npmjs` — npmjs org package checks
703
+
704
+ ```sh
705
+ aries npmjs list --org=xylabs
706
+ aries npmjs lint --org=xylabs
707
+ aries npmjs lint --org=xylabs --fix
708
+ aries npmjs lint # all auth-visible org packages
709
+ ```
710
+
711
+ By default, package discovery uses your current npm CLI authentication via `npm access list packages @<org> --json`, so private or restricted org packages are included when your npm account can see them. Omit `--org` to list or lint all scoped packages returned by `npm access list packages --json`, grouped by org with a per-org summary at the end. If npm auth is unavailable for a specific `--org`, `aries npmjs` falls back to public package discovery and reports `npm auth: unauthenticated` at the end of text output. Use `--public-only` with `--org` to force public discovery.
712
+
713
+ ### `aries npmjs list`
714
+
715
+ | Option | Default | Description |
716
+ |---|---|---|
717
+ | `--org <scope>` | | npm org scope, with or without `@`; omit for all auth-visible org packages |
718
+ | `--public-only` | `false` | List only public packages without using `npm access` |
719
+ | `--json` | `false` | Output as JSON |
720
+
721
+ ### `aries npmjs lint`
722
+
723
+ Find packages that are not marked deprecated but probably should be. V1 reports warning-only findings and exits `0` unless an operational error occurs.
724
+
725
+ | Option | Default | Description |
726
+ |---|---|---|
727
+ | `--org <scope>` | | npm org scope, with or without `@`; omit for all auth-visible org packages |
728
+ | `--public-only` | `false` | Lint only public packages without using `npm access` |
729
+ | `--abandoned-days <n>` | `365` | Warn when latest publish is at least this many days old |
730
+ | `--unused-downloads <n>` | `100` | Warn when weekly downloads are below this threshold |
731
+ | `--new-days <n>` | `30` | Do not warn for low downloads until a package is at least this many days old |
732
+ | `--fix` | `false` | Interactively choose lint findings to deprecate with `npm deprecate` |
733
+ | `--deprecation-message <text>` | | Message to pass to `npm deprecate` for selected packages |
734
+ | `--json` | `false` | Output as JSON |
735
+
736
+ Rules:
737
+ - `abandoned` — latest publish date is older than the configured threshold.
738
+ - `unused` — weekly downloads are below the configured threshold and the package is not new.
739
+
740
+ `--fix` is text-only and prompts with a default `Do Nothing` / optional `Deprecate` toggle for each package reported by lint. After selection, each selected package prompts for an optional replacement package name. Blank keeps the default message; a replacement appends `Use <replacement> instead.` Selected packages are deprecated with `npm deprecate <package>@* <message>` after Enter is pressed.
741
+
742
+ ---
743
+
744
+ ## `aries info`
745
+
746
+ Display ariestools version and environment info. No command-specific options.
747
+
748
+ ---
749
+
750
+ ## `aries wallet` — XL1 wallet
751
+
752
+ Wallet commands are provided by the standalone `@xyo-network/wallet-xl1-cli` package (`xl1-wallet`). The Aries CLI forwards `aries wallet ...` to that bin and uses the wallet CLI storage layout: `~/.xl1/wallet/cli` by default, overrideable with `XL1_WALLET_HOME` (`ARIES_WALLET_HOME` remains a legacy fallback).
753
+
754
+ ### Wallet management
755
+
756
+ ```sh
757
+ aries wallet create # Generate a new XL1 wallet (random recovery phrase)
758
+ aries wallet import # Import an existing XL1 recovery phrase
759
+ aries wallet export # Print the recovery phrase for the active (or specified) wallet
760
+ aries wallet list # List stored wallets
761
+ aries wallet use <id> # Set the active wallet
762
+ aries wallet rename <id> <label> # Rename a stored wallet
763
+ aries wallet remove <id> # Delete a stored wallet (and its address book)
764
+ ```
765
+
766
+ #### `aries wallet create`
767
+ | Option | Default | Description |
768
+ |---|---|---|
769
+ | `-l, --label <text>` | first available `wallet#` | Friendly label for the wallet |
770
+ | `--algorithm <secp256k1\|ml-dsa-65>` | `secp256k1` | Wallet signing algorithm |
771
+
772
+ #### `aries wallet import`
773
+ | Option | Default | Description |
774
+ |---|---|---|
775
+ | `-l, --label <text>` | `imported` | Friendly label |
776
+ | `-p, --phrase <words>` | | Recovery phrase (skips interactive prompt) |
777
+ | `--algorithm <secp256k1\|ml-dsa-65>` | `secp256k1` | Wallet signing algorithm |
778
+
779
+ `ml-dsa-65` wallets use `QuantHDWallet` and derive `qm65...` bech32m addresses. Wallet-JWT commands and datalake `--wallet` mode require secp256k1 until ML-DSA-65 has a standardized JOSE algorithm.
780
+ Wallet labels must be unique. If `create` is run without `--label`, the CLI uses the first available `wallet#` label, starting with `wallet0`.
781
+
782
+ #### `aries wallet export`
783
+ | Option | Default | Description |
784
+ |---|---|---|
785
+ | `--id <wallet-id>` | active | Wallet id or label |
786
+
787
+ #### `aries wallet use <id>` / `aries wallet remove <id>`
788
+ | Positional | | Description |
789
+ |---|---|---|
790
+ | `id` | required | Wallet id or label |
791
+
792
+ #### `aries wallet rename <id> <label>`
793
+ | Positional | | Description |
794
+ |---|---|---|
795
+ | `id` | required | Wallet id or current label |
796
+ | `label` | required | New label |
797
+
798
+ ### Session
799
+
800
+ ```sh
801
+ aries wallet unlock # Cache the wallet password (encrypted at rest) for a TTL
802
+ aries wallet lock # Clear the cached unlocked session
803
+ aries wallet password change # Change the wallet password (re-encrypts every stored phrase)
804
+ ```
805
+
806
+ #### `aries wallet unlock`
807
+ | Option | Default | Description |
808
+ |---|---|---|
809
+ | `--ttl <seconds>` | `900` | Session lifetime in seconds (default 15 min) |
810
+
811
+ `lock` and `password change` take no command-specific options.
812
+
813
+ ### Reset (lost password recovery)
814
+
815
+ ```sh
816
+ aries wallet reset # Destroy all wallet data — only path forward when password is lost
817
+ ```
818
+
819
+ Use this only when you have forgotten your wallet password. There is no other way to recover from a lost password — encrypted seed phrases cannot be decrypted without it.
820
+
821
+ `reset` deletes the entire wallet directory (`~/.xl1/wallet/cli` by default): every stored seed phrase, every derived account, every address-book entry, every saved contact, every saved network configuration, and the active session. **This is irreversible unless you have a backup** (see [`aries wallet backup`](#backup)).
822
+
823
+ To prevent accidental loss, the command requires two interactive confirmations:
824
+ 1. Type the literal word `RESET` (uppercase, exactly).
825
+ 2. Answer `y` to the final `[y/N]` prompt.
826
+
827
+ Anything else cancels with no changes. There is no `--force` flag.
828
+
829
+ If no wallet has been initialized (e.g. on first run), `reset` is a no-op and prints `No wallet found — no reset needed.`
830
+
831
+ ### Accounts
832
+
833
+ ```sh
834
+ aries wallet account list # List derived accounts in the active wallet
835
+ aries wallet account show <offset> # Show details for a derived account
836
+ aries wallet account derive <offset> # Derive a new account at the given HD offset
837
+ aries wallet account label <offset> <label> # Label a derived account
838
+ aries wallet account remove <offset> # Remove an account from the address book
839
+ ```
840
+
841
+ All `account` commands take an HD path offset positional (e.g. `0`).
842
+
843
+ #### `aries wallet account derive <offset>`
844
+ | Option | Default | Description |
845
+ |---|---|---|
846
+ | `-l, --label <text>` | | Friendly label for the account |
847
+
848
+ ### Balance & signing
849
+
850
+ #### `aries wallet balance [offset]`
851
+ | Positional | | Description |
852
+ |---|---|---|
853
+ | `offset` | `0` | HD path offset |
854
+
855
+ #### `aries wallet sign <file>`
856
+ | Positional | | Description |
857
+ |---|---|---|
858
+ | `file` | required | Path to a JSON payload file |
859
+
860
+ | Option | Default | Description |
861
+ |---|---|---|
862
+ | `-o, --offset <n>` | `0` | HD path offset of the signer |
863
+ | `-O, --output <path>` | | Write output to file instead of stdout |
864
+
865
+ Produces a BoundWitness.
866
+
867
+ ### Self-signed JWT
868
+
869
+ A wallet account can mint a JWT-shaped, time-bounded permission token that a site verifies locally, without running its own login flow. Think of it as reverse OAuth: the holder signs an attestation declaring an audience (the domain they intend to use the token at) and an expiration; the site checks the signature and claims and grants the session.
870
+
871
+ The token is the standard `header.payload.signature` JWT format, base64url-encoded. The signing input is `keccak256(utf8("${headerB64}.${payloadB64}"))` and the alg is `ES256K` (secp256k1 ECDSA). The header carries both `kid` (signer address) and `pub` (full public key) so verification is self-contained — no out-of-band pubkey lookup is needed.
872
+
873
+ **Header** fields: `alg` (`ES256K`), `typ` (`JWT`), `kid` (40-char lowercase hex address), `pub` (hex public key bytes).
874
+
875
+ **Payload** is an XYO Payload (must include `schema`). The default schema is `network.xyo.auth.signin` and the standard claims are `iss` (mirrors `kid`), `aud`, `iat`, `exp`, plus optional `nbf`, `nonce`, and any extra fields supplied via `--payload-file` or `--claim`.
876
+
877
+ > Note: this is the **single-signed** path. A future co-signed BoundWitness flow (where the site offers a permissions BW signed by its own address and the client co-signs) is planned and will reuse the same schema and account-derivation infrastructure.
878
+
879
+ #### `aries wallet jwt create`
880
+ | Option | Default | Description |
881
+ |---|---|---|
882
+ | `-a, --audience <domain>` | required | Audience — becomes the `aud` claim (e.g. `xyo.network`) |
883
+ | `--ttl <seconds>` | `3600` | Lifetime in seconds (mutually exclusive with `--exp`) |
884
+ | `--exp <unix-seconds>` | | Absolute expiration; alternative to `--ttl` |
885
+ | `--schema <schema>` | `network.xyo.auth.signin` | XYO schema for the payload |
886
+ | `--payload-file <path>` | | JSON file with extra payload fields (CLI flags win) |
887
+ | `--claim <key=value>` | | Extra claim, repeatable; numeric/boolean strings are coerced |
888
+ | `-o, --offset <n>` | `0` | HD path offset of the signer |
889
+ | `-O, --output <path>` | | Write the token to a file instead of stdout |
890
+
891
+ #### `aries wallet jwt verify [token]`
892
+ | Positional | | Description |
893
+ |---|---|---|
894
+ | `token` | | JWT to verify (omit to read from `--input` or stdin) |
895
+
896
+ | Option | Default | Description |
897
+ |---|---|---|
898
+ | `-a, --audience <domain>` | | If provided, fail unless `aud` matches |
899
+ | `-i, --input <path>` | | Read JWT from file |
900
+ | `--now <unix-seconds>` | | Override current time — useful for tests |
901
+
902
+ Prints `{ ok, header, payload, reasons? }` JSON. Exits non-zero on any verification failure (signature, expiry, audience mismatch, kid/iss mismatch, public-key/address mismatch).
903
+
904
+ #### `aries wallet jwt decode [token]`
905
+ Decode header and payload without verifying the signature. Useful for debugging.
906
+
907
+ ### Transactions
908
+
909
+ ```sh
910
+ aries wallet send <recipient> <amount> # Send XL1 to a recipient address
911
+ aries wallet tx sign <file> # Sign an unsigned transaction JSON file
912
+ aries wallet tx broadcast <file> # Broadcast a signed transaction JSON file
913
+ ```
914
+
915
+ #### `aries wallet send <recipient> <amount>`
916
+ | Positional | | Description |
917
+ |---|---|---|
918
+ | `recipient` | required | Recipient address (`0x…`) |
919
+ | `amount` | required | Amount in the selected unit (XL1 by default) |
920
+
921
+ | Option | Default | Description |
922
+ |---|---|---|
923
+ | `-o, --offset <n>` | `0` | HD path offset of the sender |
924
+ | `--xl1` | | Interpret amount as XL1 (default) |
925
+ | `--milli` | | Interpret amount as milli XL1 |
926
+ | `--micro` | | Interpret amount as micro XL1 |
927
+ | `--nano` | | Interpret amount as nano XL1 |
928
+ | `--pico` | | Interpret amount as pico XL1 |
929
+ | `--femto` | | Interpret amount as femto XL1 |
930
+ | `--atto` | | Interpret amount as atto XL1; must be a whole number |
931
+ | `--dry-run` | `false` | Build and sign the transfer without submitting it |
932
+ | `--json` | `false` | Emit machine-readable JSON output |
933
+ | `--attempts <n>` | `30` | Confirmation polling attempts |
934
+ | `--delay <ms>` | `2000` | Delay between confirmation attempts |
935
+
936
+ #### `aries wallet tx sign <file>`
937
+ | Positional | | Description |
938
+ |---|---|---|
939
+ | `file` | required | Path to unsigned transaction JSON |
940
+
941
+ | Option | Default | Description |
942
+ |---|---|---|
943
+ | `-o, --offset <n>` | `0` | HD path offset of the signer |
944
+ | `-O, --output <path>` | | Write signed tx to file instead of stdout |
945
+
946
+ #### `aries wallet tx broadcast <file>`
947
+ | Positional | | Description |
948
+ |---|---|---|
949
+ | `file` | required | Path to signed transaction JSON |
950
+
951
+ | Option | Default | Description |
952
+ |---|---|---|
953
+ | `-o, --offset <n>` | `0` | HD path offset for client connection |
954
+
955
+ ### Networks
956
+
957
+ ```sh
958
+ aries wallet network list # List configured networks
959
+ aries wallet network add <id> <rpcUrl> # Add a custom network
960
+ aries wallet network use <id> # Set the active network
961
+ aries wallet network remove <id> # Remove a custom network
962
+ ```
963
+
964
+ #### `aries wallet network add <id> <rpcUrl>`
965
+ | Positional | | Description |
966
+ |---|---|---|
967
+ | `id` | required | Network id (unique) |
968
+ | `rpcUrl` | required | Gateway RPC URL |
969
+
970
+ | Option | Default | Description |
971
+ |---|---|---|
972
+ | `-l, --label <text>` | | Friendly label |
973
+ | `--chain-id <hex>` | | Chain id (hex) |
974
+
975
+ `use` and `remove` take a network `id` positional only.
976
+
977
+ ### Contacts
978
+
979
+ ```sh
980
+ aries wallet contact list # List address-book contacts
981
+ aries wallet contact add <address> <label> # Add or update a contact
982
+ aries wallet contact rename <address> <label> # Rename an existing contact
983
+ aries wallet contact remove <address> # Remove a contact
984
+ ```
985
+
986
+ All take an `address` positional (`0x…`); `add`/`rename` also take a `label` positional. No additional flags.
987
+
988
+ ### Backup
989
+
990
+ ```sh
991
+ aries wallet backup export <file> # Export address books and contacts to a JSON file
992
+ aries wallet backup import <file> # Import a wallet backup JSON file (merges into current state)
993
+ ```
994
+
995
+ `file` is the only positional; no additional flags.
996
+
997
+ ---
998
+
999
+ ## `aries witness` — Observe data and produce XYO-compliant payloads
1000
+
1001
+ ```sh
1002
+ aries witness timestamp # Capture the current timestamp
1003
+ aries witness system-info # Capture system information (OS, CPU, memory, etc.)
1004
+ aries witness url # Capture metadata and content from a URL
1005
+ aries witness bank # Capture bank account snapshots or Capital One product catalog data
1006
+ aries witness pentair # Capture Pentair ScreenLogic pool equipment state
1007
+ aries witness pentair-intellichem # Capture and graph Pentair IntelliChem chemistry data
1008
+ aries witness pentair-schedules # Capture Pentair ScreenLogic schedules with circuit and pump context
1009
+ aries witness app # Inspect installed applications
1010
+ aries witness app list # List installed macOS applications
1011
+ ```
1012
+
1013
+ ### Common witness flags
1014
+
1015
+ These flags are available on every `witness` leaf:
1016
+
1017
+ | Option | Default | Description |
1018
+ |---|---|---|
1019
+ | `--json` | `false` | Output raw JSON |
1020
+ | `-o, --output <path>` | | Write output to file |
1021
+ | `--pretty` | `true` | Pretty-print JSON output |
1022
+ | `--bound-witness` | `false` | Wrap payloads in a BoundWitness |
1023
+ | `--binary-dir <path>` | `~/.aries/binaries/` | Directory for binary artifacts |
1024
+
1025
+ ### Per-command additions
1026
+
1027
+ #### `aries witness url`
1028
+ | Option | Default | Description |
1029
+ |---|---|---|
1030
+ | `--url <url>` | required | The URL to fetch |
1031
+
1032
+ #### `aries witness bank`
1033
+
1034
+ ```sh
1035
+ aries witness bank --provider capitalone --account-id acct-123 --from 2026-06-01 --to 2026-06-25 --json
1036
+ aries witness bank --provider capitalone --access-token "$CAPITALONE_TOKEN" --include-raw --json
1037
+ aries witness bank --provider capitalone --resource products --client-id "$CAPITALONE_CLIENT_ID" --client-secret "$CAPITALONE_CLIENT_SECRET" --json
1038
+ ```
1039
+
1040
+ | Option | Default | Description |
1041
+ |---|---|---|
1042
+ | `--provider <capitalone>` | `capitalone` | Bank provider |
1043
+ | `--resource <accounts\|products>` | `accounts` | `accounts` for private account APIs; `products` for Capital One's sandbox deposit product catalog |
1044
+ | `--from <value>` | | Transaction window start passed as query param `from` |
1045
+ | `--to <value>` | | Transaction window end passed as query param `to` |
1046
+ | `--account-id <id>` | | Provider account id for balances and transactions |
1047
+ | `--include-raw` | `false` | Store raw provider JSON as witness binary artifacts |
1048
+ | `--redaction <default\|none>` | `default` | Hash provider account/transaction ids unless explicitly set to `none` |
1049
+ | `--env <sandbox\|production>` | `bank config` | Environment label |
1050
+ | `--base-url <url>` | `bank config` | Capital One API base URL |
1051
+ | `--token-url <url>` | `bank config` | OAuth client-credentials token URL |
1052
+ | `--access-token <token>` | `ARIES_CAPITALONE_ACCESS_TOKEN` | Pre-issued bearer token; not persisted |
1053
+ | `--client-id <id>` | `bank config` | OAuth client id |
1054
+ | `--client-secret <secret>` | `bank config` | OAuth client secret |
1055
+ | `--scope <scope>` | `bank config` | Optional OAuth client-credentials scope |
1056
+ | `--api-version <version>` | `5` | Capital One products media-type version |
1057
+ | `--operation <retrieve-products\|retail-products\|search>` | `search` | Capital One products operation |
1058
+ | `--product-id <id>` | `~` for product-id operations | Capital One path product id |
1059
+ | `--body <json>` | `{"isCollapseRate":true}` for `search`; `{}` otherwise | JSON body for Capital One products POST operations |
1060
+ | `--body-file <path>` | | JSON body file for Capital One products POST operations |
1061
+ | `--accounts-path <path>` | `bank config` | Accounts endpoint path |
1062
+ | `--balances-path <path>` | `bank config` | Balances endpoint path; may include `{accountId}` |
1063
+ | `--transactions-path <path>` | `bank config` | Transactions endpoint path; may include `{accountId}` |
1064
+
1065
+ With `--resource accounts`, the bank witness returns one
1066
+ `network.xyo.bank.account-snapshot` payload containing normalized accounts,
1067
+ balances, and transactions. By default, provider account and transaction
1068
+ identifiers are hashed.
1069
+
1070
+ With `--resource products`, the bank witness calls Capital One's documented
1071
+ `Retrieve Consumer Bank Products` sandbox API and returns one
1072
+ `network.xyo.bank.product-catalog` payload. This is product catalog data, not a
1073
+ consumer account snapshot. The default product request follows Capital One's
1074
+ published "Scenario 1a: All Products" example: `POST /deposits/products/~/search`
1075
+ with `{"isCollapseRate": true}`.
1076
+
1077
+ If Capital One returns `{"id":"200008","text":"no endpoint matched for request"}`
1078
+ from the product request after OAuth succeeds, the client credentials are valid
1079
+ but Capital One's sandbox gateway did not match the product endpoint. Verify the
1080
+ app is connected to DevExchange product `1359-5` in the sandbox and confirm the
1081
+ active sandbox base path with Capital One.
1082
+
1083
+ #### `aries witness pentair-intellichem`
1084
+ | Option | Default | Description |
1085
+ |---|---|---|
1086
+ | `--history` | `false` | Fetch IntelliChem controller history |
1087
+ | `--from <date\|age>` | `24h` | History start as ISO date or relative age like `30m`, `6h`, `7d` |
1088
+ | `--to <date\|age>` | now | History end as ISO date or relative age |
1089
+ | `--save` | `false` | Save normalized samples to the JSONL series file |
1090
+ | `--series-file <path>` | `pentair config` or `~/.aries/pentair/intellichem.jsonl` | JSONL file used for saved samples and graphing |
1091
+ | `--graph <path>` | | Write a standalone HTML graph |
1092
+ | `--graph-only` | `false` | Render a graph from the series file without connecting to ScreenLogic |
1093
+ | `--address <ip>` | `pentair config` | Connect directly to a ScreenLogic adapter IP instead of UDP discovery |
1094
+ | `--port <number>` | `pentair config` or `80` | ScreenLogic adapter TCP port for direct connection |
1095
+ | `--password <password>` | `pentair config` or `SCREENLOGIC_PASSWORD` | ScreenLogic password for direct connection, if configured |
1096
+ | `--system-name <name>` | `pentair config` or `Pentair ScreenLogic` | ScreenLogic system name for direct connection |
1097
+ | `--response-timeout <ms>` | `pentair config` or `15000` | Milliseconds to wait for each ScreenLogic command response |
1098
+ | `--search-timeout <ms>` | `pentair config` or `5000` | Milliseconds to wait for each UDP discovery attempt |
1099
+ | `--search-attempts <count>` | `pentair config` or `3` | Number of UDP discovery attempts before failing |
1100
+
1101
+ Examples:
1102
+
1103
+ ```sh
1104
+ aries witness pentair-intellichem --save
1105
+ aries witness pentair-intellichem --history --from 7d --save --graph intellichem.html
1106
+ aries witness pentair-intellichem --graph-only --graph intellichem.html
1107
+ ```
1108
+
1109
+ #### `aries witness pentair-schedules`
1110
+ | Option | Default | Description |
1111
+ |---|---|---|
1112
+ | `--address <ip>` | `pentair config` | Connect directly to a ScreenLogic adapter IP instead of UDP discovery |
1113
+ | `--port <number>` | `pentair config` or `80` | ScreenLogic adapter TCP port for direct connection |
1114
+ | `--password <password>` | `pentair config` or `SCREENLOGIC_PASSWORD` | ScreenLogic password for direct connection, if configured |
1115
+ | `--system-name <name>` | `pentair config` or `Pentair ScreenLogic` | ScreenLogic system name for direct connection |
1116
+ | `--response-timeout <ms>` | `pentair config` or `15000` | Milliseconds to wait for each ScreenLogic command response |
1117
+ | `--search-timeout <ms>` | `pentair config` or `5000` | Milliseconds to wait for each UDP discovery attempt |
1118
+ | `--search-attempts <count>` | `pentair config` or `3` | Number of UDP discovery attempts before failing |
1119
+
1120
+ Example:
1121
+
1122
+ ```sh
1123
+ aries witness pentair-schedules --json
1124
+ ```
1125
+
1126
+ #### `aries witness app list`
1127
+ | Option | Default | Description |
1128
+ |---|---|---|
1129
+ | `--scope <all\|global\|system\|user>` | `all` | Filter by install scope |
1130
+
1131
+ `witness timestamp`, `witness system-info`, and `witness pentair` take only the common flags.
1132
+
1133
+ ---
1134
+
1135
+ ## `aries xyo` — XYO protocol utilities
1136
+
1137
+ ### `aries xyo rewards <sequence|mainnet> <view>`
1138
+
1139
+ Query finalized XL1 reward activity through the SDK REST gateway and its block
1140
+ rollup indexes.
1141
+
1142
+ ```sh
1143
+ aries xyo rewards sequence summary
1144
+ aries xyo rewards mainnet steps --from-block 500000
1145
+ aries xyo rewards sequence recipients --stage redeemed --limit 25
1146
+ aries xyo rewards mainnet recipients --stage supplemental-funding --limit 25
1147
+ aries xyo rewards sequence address <address> --json
1148
+ aries xyo rewards sequence summary --from-block 510000 --explain
1149
+ ```
1150
+
1151
+ | View | Description |
1152
+ |---|---|
1153
+ | `summary` | Direct and supplemental funding, allocation, payout, actual step-holder balance, unique-recipient, and reward-step totals |
1154
+ | `steps` | Per-step direct funding, supplemental funding, and allocation; optionally filter with `--step-level` |
1155
+ | `recipients` | Rank recipients at the `funded`, `supplemental-funding`, `allocated`, or `redeemed` stage |
1156
+ | `address <address>` | Reward lifecycle events involving an escrow, staker, or destination |
1157
+
1158
+ | Common option | Default | Description |
1159
+ |---|---|---|
1160
+ | `--from-block <n>` | `0` | First finalized block to include |
1161
+ | `--to-block <n>` | finalized head | Last finalized block to include |
1162
+ | `--concurrency <n>` | `2` | Indexed ranges read concurrently, from 1 to 16 |
1163
+ | `--json` | `false` | Stable machine-readable output; XL1 amounts include atto and decimal forms |
1164
+ | `--explain` | `false` | Show indexed frame use, direct reads, gateway setup/scan/balance requests, bytes, timing, and SDK budget warnings |
1165
+ | `--no-progress` | | Suppress the default gateway and scan progress written to stderr |
1166
+
1167
+ The reward lifecycle distinguishes direct funding (reward pool to step holder)
1168
+ from supplemental funding (any other inbound transfer to a deterministic step
1169
+ holder), followed by allocation (step holder to reward escrow) and redemption
1170
+ (reward escrow to a final wallet). “Total Rewards Funded” is direct plus
1171
+ supplemental funding. “Total Rewards Paid Out” means redeemed rewards. Exact
1172
+ staker identity is visible when an escrow redeems, so
1173
+ `uniqueObservedStakers` counts stakers seen in redemption context; it is not an
1174
+ allocation-time staker count.
1175
+
1176
+ “Outstanding in Step Holders” is the actual sum of deterministic holder account
1177
+ balances at `--to-block`, read in one SDK batch against the finalized range.
1178
+ The separately reported step-holder lifecycle net is direct plus supplemental
1179
+ funding, minus allocation and rounding returns. With a later `--from-block`,
1180
+ that lifecycle value and the reward-escrow value are labeled range deltas,
1181
+ while the step-holder balance remains the actual balance at `--to-block`.
1182
+
1183
+ `--explain` is intentionally part of the product rather than only a debugging
1184
+ flag. It separates gateway startup work from the reward scan and makes direct
1185
+ block fallbacks, payload volume, and repeated request patterns visible. Those
1186
+ measurements identify reward-specific indexes worth publishing through the XL1
1187
+ indexing pipeline as full-history use grows.
1188
+
1189
+ Human-readable commands print gateway initialization and bounded scan progress
1190
+ to stderr by default. JSON commands remain quiet so stdout stays
1191
+ machine-readable; SDK diagnostics and the completion footer also stay on
1192
+ stderr. Add `--verbose` to a JSON command to opt into progress.
1193
+
1194
+ Every `aries` and `ariesi` invocation writes a status-aware timing footer to
1195
+ stderr after the command finishes: `✅ Succeeded in <milliseconds>ms.` or
1196
+ `❌ Failed in <milliseconds>ms.` This includes JSON commands without changing
1197
+ their machine-readable stdout.
1198
+
1199
+ ### `aries xyo tx validate [data]`
1200
+
1201
+ Validate one or more XL1 transactions. Reads from a file path, inline JSON, or stdin.
1202
+
1203
+ | Positional | | Description |
1204
+ |---|---|---|
1205
+ | `data` | | Path to a `.json`/`.jsonl` file, or an inline transaction JSON tuple `[bw, payloads[]]`. Omit to read from stdin. |
1206
+
1207
+ | Option | Default | Description |
1208
+ |---|---|---|
1209
+ | `-d, --detail` | `false` | Print per-transaction error details (always shown for invalid transactions) |
1210
+
1211
+ **Input modes** (resolved in priority order):
1212
+
1213
+ | Mode | Example |
1214
+ |---|---|
1215
+ | File path | `aries xyo tx validate ./tx.json` |
1216
+ | File path (JSONL batch) | `aries xyo tx validate ./txs.jsonl` |
1217
+ | Inline JSON | `aries xyo tx validate '[[...], [...]]'` |
1218
+ | Piped stdin | `cat txs.jsonl \| aries xyo tx validate` |
1219
+
1220
+ **Supported file formats:**
1221
+ - `.json` — a single transaction tuple `[boundWitness, payloads[]]`, or a JSON array of tuples
1222
+ - `.jsonl` / `.ndjson` — one transaction tuple per line
1223
+
1224
+ **Output:**
1225
+
1226
+ ```text
1227
+ Total: 3
1228
+ Valid: 2
1229
+ Invalid: 1
1230
+
1231
+ [2] ./txs.jsonl:3
1232
+ - TransactionGasValidator: insufficient gas
1233
+ ```
1234
+
1235
+ **Exit codes:** `0` = all valid, `1` = any invalid or parse error.
1236
+
1237
+ ---
1238
+
1239
+ ## Configuration
1240
+
1241
+ Aries configuration lives under `~/.aries/` (or `$ARIES_HOME` if set). Wallet data lives under `~/.xl1/wallet/cli` (or `$XL1_WALLET_HOME` if set) and is encrypted at rest using your wallet password.
1242
+
1243
+ ---
1244
+
1245
+ ## License
1246
+
1247
+ LGPL-3.0-only © XY Labs
1248
+
1249
+ ## Credits
1250
+
1251
+ [Made with 🔥 and ❄️ by AriesTools](https://arietrouw.com)