@capxul/cli 4.20.0-beta.24 → 4.20.0-beta.26

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 CHANGED
@@ -10,9 +10,9 @@ capxul --help
10
10
  capxul --version
11
11
  capxul --completions bash
12
12
  capxul doctor --json
13
- capxul telemetry status --json
14
- capxul telemetry disable --json
15
- capxul telemetry enable --json
13
+ capxul config telemetry status --json
14
+ capxul config telemetry off --json
15
+ capxul config telemetry on --json
16
16
  capxul doctor --online --timeout-ms 30000 --json
17
17
  ```
18
18
 
@@ -24,6 +24,49 @@ machinery and collection controls send no observation records.
24
24
  check uses the public Capxul SDK and verifies the backend response nonce.
25
25
  It does not authenticate a person or submit a transaction.
26
26
 
27
+ ## Agent plugin
28
+
29
+ [`plugin/`](plugin/README.md) is the Claude Code plugin: one `capxul` skill that
30
+ makes an agent act as the person's Capxul through this CLI, with journeys as
31
+ references, local memory under `~/.capxul/`, and the paste-a-prompt. The
32
+ marketplace entry is the repository root `.claude-plugin/marketplace.json`.
33
+
34
+ ## Command schema
35
+
36
+ ```sh
37
+ capxul schema
38
+ capxul schema payment send
39
+ capxul schema org payroll
40
+ ```
41
+
42
+ `capxul schema` prints every command as JSON: its name, what it does and whether
43
+ it moves money, with the global flags and what each exit code means.
44
+ `capxul schema <command…>` prints one command: usage, arguments, flags, global
45
+ flags and examples, read from the command's own definition (Effect's help
46
+ document, so `--help` and the schema always agree), plus `movesMoney`, `output`
47
+ (what `data` is) and `errors` (the codes it can answer with). A group lists its
48
+ commands. Agents look commands up here instead of copying flags.
49
+
50
+ ## Home screen
51
+
52
+ ```sh
53
+ capxul
54
+ capxul --json
55
+ capxul --org acme
56
+ ```
57
+
58
+ Bare `capxul` is the home screen. It prints where you are at once, from this
59
+ machine: who you are, who you act as and the Safe. Then one backend read
60
+ (`accounts.summaries.home`) returns your balances (or the Organization
61
+ treasury) and what needs you, each with the command that resolves it (requests
62
+ to pay, payroll runs to approve, payments to retry), and it shows a few
63
+ commands to try. A backend without that read gets the separate reads instead.
64
+ A read that fails shows its section as unavailable, never as empty. Signed out,
65
+ it prints `Not signed in · capxul auth login` without a network call. `--json`
66
+ returns the same as data: `where`, `signedIn`, `balances` (the asset
67
+ positions), `needsYou` (each with `next.argv`) and `try`. `capxul --help` is
68
+ the command list.
69
+
27
70
  ## Where you are
28
71
 
29
72
  ```sh
@@ -52,7 +95,7 @@ Red is only used for errors. JSON output has no header.
52
95
  The environment comes from `--env <name>`, then `CAPXUL_ENV`, then
53
96
  `CAPXUL_BOOTSTRAP_URL`, then the environment `use env` saved, then staging. The
54
97
  names are `staging` and `devnet`; production is not available in this CLI yet.
55
- The devnet needs `CAPXUL_PUBLISHABLE_KEY` from its `browser.env`.
98
+ The devnet uses its fixed test key, so it needs no `CAPXUL_PUBLISHABLE_KEY`.
56
99
 
57
100
  `use org <handle>` finds the Organization among those you belong to and saves
58
101
  it for this environment. It grants no authority; the backend checks every
@@ -72,7 +115,7 @@ a time:
72
115
  ```sh
73
116
  capxul org permission change
74
117
  capxul org member invite
75
- capxul org payment get
118
+ capxul payment get
76
119
  capxul document get
77
120
  ```
78
121
 
@@ -93,74 +136,78 @@ one final version 1 result on stdout. Account setup reports public signer states
93
136
  Activity shows that the CLI is waiting. It does not prove settlement or a healthy
94
137
  connection. A deadline stops observation; it does not cancel a submitted operation.
95
138
 
96
- ## Status overview
139
+ ## Sending money through the approval page
97
140
 
98
141
  ```sh
99
- capxul status
100
- capxul status --email EMAIL --json
101
- capxul status --org ORGANIZATION_ID
142
+ capxul payment send rex@example.com 50
143
+ capxul payment send @rex 12.5 --asset USDT
144
+ capxul payment send 0x91f2…aa10 40
145
+ capxul payment send rex@example.com 50 --json
146
+ capxul payment send rex@example.com 50 --org acme [--budget BUDGET_ID]
147
+ capxul payment send --input payment.json [--org acme] [--request-key K]
148
+ capxul payment wait APPROVAL_ID [--org acme] [--timeout-seconds N] [--json]
102
149
  ```
103
150
 
104
- `status` reads the current personal Account unless one explicit Organization
105
- is selected with `--org`. It shows the saved session identity, selected actor
106
- profile and readiness, separate asset balances, received and issued requests,
107
- pending or active Payments, and five recent Activity rows. It gives scoped
108
- commands to inspect requests and Activity. A saved Organization default does
109
- not change the overview's personal scope.
110
-
111
- Each source read retains its own state. An unavailable balance or Inbox is
112
- not an empty balance or Inbox. Indexed Activity fallback is marked incomplete.
113
- JSON returns `state: "partial"` when a read fails or Activity is incomplete.
114
- Document counts include known references from available request and Payment
115
- reads. Activity detail can have additional documents. The overview does not
116
- render or download PDFs and does not prepare or submit Payments. Showing an
117
- existing scheduled or streaming Payment does not add recurring billing.
151
+ `send` prepares the payment and opens its approval page. The page is the one
152
+ and only confirmation: there is no `[y/N]` and no `--confirm`. Nothing moves
153
+ until a person approves it there with their own key; the CLI never signs.
154
+
155
+ `<to>` is an email, a @handle or an 0x address (an address you type is your
156
+ own choice, and the page shows it again). `<amount>` is in `--asset`, a symbol
157
+ the payer holds (USDC by default). With `--org`, the payment spends from a
158
+ Budget you hold in that Organization: the one Budget for the asset, or the one
159
+ `--budget` names. `--input FILE|-` takes the SDK's payment JSON instead, with
160
+ documents; an Organization's adds its `permissionId`.
161
+
162
+ A person sees what they are approving (who pays and what is left, who receives
163
+ it, the amount, and that there is no fee: every operation is sponsored). The
164
+ CLI opens the page on a terminal, prints the link, and follows it: `✓ Signed`
165
+ when the person approves, `✓ Confirmed` when the payment settles, then the paid
166
+ amount, the transaction and the receipt command. A rejection on the page ends
167
+ `✗ Not sent` with exit 130; an approval that lapses sends nothing (exit 2).
168
+ Ctrl-C stops following; the link still works, and `payment wait` follows it.
169
+
170
+ With `--json`, `send` returns at once:
171
+
172
+ ```json
173
+ {
174
+ "status": "awaiting_approval",
175
+ "approvalId": "approval_01JA…",
176
+ "approvalUrl": "https://app.staging.capxul.com/approve/approval_01JA…",
177
+ "paymentIds": ["payment_01JB…"],
178
+ "expiresAt": 1791359237000,
179
+ "next": { "argv": ["capxul", "payment", "wait", "approval_01JA…", "--json"] }
180
+ }
181
+ ```
182
+
183
+ An agent gives the person the link and runs `next.argv`. `payment wait
184
+ APPROVAL_ID` follows the approval: once it is approved it sends it (unless the
185
+ page already did; only one send can claim it) and waits for the payment to
186
+ settle. Its result is the SDK's `{ approval, payments }`. An Organization
187
+ payment's wait carries `--org`.
118
188
 
119
189
  ## Personal Payments
120
190
 
121
191
  ```sh
122
- capxul payment send --input payment.json --request-key REQUEST_KEY --confirm --json
123
- capxul payment send --resume REQUEST_KEY --confirm --json
124
- capxul payment retry --payment-id PAYMENT_ID --confirm --json
192
+ capxul payment retry PAYMENT_ID --confirm --json
125
193
  capxul payment list --json
126
- capxul payment get --payment-id PAYMENT_ID --json
127
- capxul payment wait --payment-id PAYMENT_ID --timeout-seconds 120 --json
194
+ capxul payment get PAYMENT_ID --json
195
+ capxul payment wait PAYMENT_ID --timeout-seconds 120 --json
128
196
  ```
129
197
 
130
198
  These commands use the current authenticated session. Add `--email EMAIL` to
131
199
  select a saved session. In a terminal, omit the required Payment ID to enter it.
132
- `list` returns `{ payments }`. `get` returns `{ payment }` and refuses when the
133
- Payment is absent or unavailable to the session. Human output shows the full ID,
134
- status, amount, counterparty and available receipt.
200
+ `get` refuses when the Payment is absent or unavailable to the session. Human
201
+ output shows the full ID, status, amount, counterparty and available receipt.
135
202
 
136
203
  `wait` observes the exact Payment until it reaches a terminal state or needs an
137
204
  action. A failed Payment can be a completed observation. The timeout accepts
138
205
  1–3600 seconds and includes session restoration. A timeout or unavailable read
139
206
  prints exact get/wait commands. Waiting never resubmits a Payment.
140
207
 
141
- `send` accepts a bounded JSON file or `--input -` for stdin. An interactive
142
- send can collect the recipient, asset, amount and document options. It validates
143
- these fields, resolves the recipient, and previews the exact target before
144
- confirmation. A scripted send requires `--request-key` and `--confirm`. A human
145
- send generates a key when none was supplied. Signing starts after confirmation.
146
-
147
- The CLI saves the exact input in protected local state before preparation. It
148
- prints the request key and resume command, then prints prepared Payment IDs
149
- before signing. `--resume` uses that saved input and key; it refuses input or key
150
- overrides. Keep the same CLI home and authenticated person for recovery.
151
- A different input cannot replace the saved input for the same key.
152
-
153
- Send returns `{ payment, requestKey }` with the observed Payment state. Retry
154
- returns `{ payments }` and addresses the existing Payment command. It never
155
- creates a replacement send. Uncertain results keep exact read/wait or same-key
156
- resume guidance. A submitted result does not prove settlement.
157
-
158
- For an external address, JSON input must include
159
- `"externalAddressAcknowledged": true`. `--confirm` alone does not acknowledge
160
- the address. Human input shows the exact address and an unverified-recipient
161
- warning before one default-No confirmation. Known Capxul Parties resolved from
162
- addresses remain supported. Resume keeps the saved reference and acknowledgement.
163
- A saved key cannot gain new acknowledgement; use fresh input and a fresh key.
208
+ Retry returns `{ payments }` and addresses the existing Payment command. It
209
+ never creates a replacement send. It still signs in the terminal through the
210
+ local wallet page until the approval page covers retries.
164
211
 
165
212
  ## Activity
166
213
 
@@ -189,25 +236,25 @@ In a terminal, omit required fields for guided flags and annotation input.
189
236
  ```sh
190
237
  capxul request list
191
238
  capxul request issue --input invoice.json --confirm
192
- capxul request get --request-id REQUEST_ID
193
- capxul request cancel --request-id REQUEST_ID --confirm
239
+ capxul request get REQUEST_ID
240
+ capxul request cancel REQUEST_ID --confirm
194
241
  capxul inbox list
195
- capxul inbox get --request-id REQUEST_ID
196
- capxul inbox pay --request-id REQUEST_ID --confirm
197
- capxul inbox decline --request-id REQUEST_ID --confirm
198
- capxul org request list --org ORGANIZATION_ID
199
- capxul org request issue --org ORGANIZATION_ID --input invoice.json --confirm
200
- capxul org request get --org ORGANIZATION_ID --request-id REQUEST_ID
201
- capxul org request cancel --org ORGANIZATION_ID --request-id REQUEST_ID --confirm
202
- capxul org inbox list --org ORGANIZATION_ID
203
- capxul org inbox get --org ORGANIZATION_ID --request-id REQUEST_ID
204
- capxul org inbox pay --org ORGANIZATION_ID --request-id REQUEST_ID --permission-id PERMISSION_ID --confirm
205
- capxul org inbox decline --org ORGANIZATION_ID --request-id REQUEST_ID --confirm
242
+ capxul inbox get REQUEST_ID
243
+ capxul inbox pay REQUEST_ID --confirm
244
+ capxul inbox decline REQUEST_ID --confirm
245
+ capxul request list --org ORGANIZATION_ID
246
+ capxul request issue --org ORGANIZATION_ID --input invoice.json --confirm
247
+ capxul request get --org ORGANIZATION_ID REQUEST_ID
248
+ capxul request cancel --org ORGANIZATION_ID REQUEST_ID --confirm
249
+ capxul inbox list --org ORGANIZATION_ID
250
+ capxul inbox get --org ORGANIZATION_ID REQUEST_ID
251
+ capxul inbox pay --org ORGANIZATION_ID REQUEST_ID --permission-id PERMISSION_ID --confirm
252
+ capxul inbox decline --org ORGANIZATION_ID REQUEST_ID --confirm
206
253
  ```
207
254
 
208
- `request` reads the selected actor's issued Invoice and payment requests.
209
- `inbox` reads payment requests addressed to that actor. Organization reads
210
- require one explicit Organization ID. Add `--email EMAIL` to select a saved
255
+ `request` reads the issued Invoice and payment requests of whoever you act as:
256
+ you, or the Organization `--org`, `CAPXUL_ORG` or `use org` names. `inbox` reads
257
+ payment requests addressed to that actor. Add `--email EMAIL` to select a saved
211
258
  session. No signer is required for these reads.
212
259
 
213
260
  For human reads, start with `capxul request --help` or `capxul inbox --help`.
@@ -222,9 +269,9 @@ stderr, and the process exit code separately. A refusal is still a version 1
222
269
  result on stdout. Inspect `outcome` and `error.code`; do not infer success from
223
270
  valid JSON. Missing required input exits 2. A missing authenticated session exits 3. Noninteractive human refusals use stderr. These runs do not prompt.
224
271
 
225
- A missing `--org` refuses an Organization request or Inbox read before session
226
- restoration. Supply that selector on every Organization command. Do not assume
227
- that `org use` selects request or Inbox scope.
272
+ Agents pass `--org` on every Organization command, so a saved choice never
273
+ decides whose money a command touches. `--org` takes a handle or an
274
+ Organization ID.
228
275
 
229
276
  Local help, refusal, and cancellation checks do not prove authenticated
230
277
  request reads, document output, issuance, or payment; those are separate
@@ -335,7 +382,8 @@ capxul document export --document-hash H --content-hash C --out original.bin
335
382
 
336
383
  Each command uses the current authenticated session. Add `--email EMAIL` to
337
384
  select a saved session. In a terminal, omit required fields to enter them.
338
- `get` returns document metadata and saves a PDF. It does not print source bytes.
385
+ `get` returns document metadata and the `render` command for it; it writes no
386
+ file and does not print source bytes.
339
387
  `verify` reports `ok: false` when verification fails. `render` saves a PDF and its
340
388
  self-contained HTML source in the `documents` directory next to CLI settings.
341
389
  Use `--output-dir` to change this directory. Human and JSON output contain
@@ -343,36 +391,29 @@ file metadata. Each render uses a new private directory and preserves earlier
343
391
  files. `export` writes the original bytes to a new file.
344
392
  It refuses an existing output file.
345
393
 
346
- Personal and Organization Payment `send`, `get`, `wait`, `retry`, and `list`
347
- also save available documents as PDFs. Activity detail and Payroll results
348
- save available documents in the same directory. Their results include
349
- document output metadata.
350
- Pending or unavailable documents retain that state. A document failure does
351
- not change the Payment result or start another Payment.
394
+ Reads never write files. Payment `get`, `wait` and `list`, Activity detail and
395
+ Payroll `get` and `wait` name each document with the `document render` command
396
+ that saves it. Payment `send` and `retry`, Payroll `run` and Inbox `pay` still
397
+ save available documents as PDFs in the same directory and report them in their
398
+ result. Pending or unavailable documents retain that state. A document failure
399
+ does not change the Payment result or start another Payment.
352
400
 
353
401
  ## Contact commands
354
402
 
355
403
  ```sh
356
404
  capxul contact list [--include-hidden]
357
- capxul contact get --entry-id PARTY_ID
405
+ capxul contact get PARTY_ID
358
406
  capxul contact add --input FILE|- [--confirm]
359
- capxul contact label --entry-id PARTY_ID --label TEXT [--confirm]
360
- capxul contact hide --entry-id PARTY_ID [--confirm]
361
- capxul contact unhide --entry-id PARTY_ID [--confirm]
362
-
363
- capxul org contact list --org ORGANIZATION_ID [--include-hidden]
364
- capxul org contact get --org ORGANIZATION_ID --entry-id PARTY_ID
365
- capxul org contact add --org ORGANIZATION_ID --input FILE|- [--confirm]
366
- capxul org contact label --org ORGANIZATION_ID --entry-id PARTY_ID --label TEXT [--confirm]
367
- capxul org contact hide --org ORGANIZATION_ID --entry-id PARTY_ID [--confirm]
368
- capxul org contact unhide --org ORGANIZATION_ID --entry-id PARTY_ID [--confirm]
407
+ capxul contact label PARTY_ID --label TEXT [--confirm]
408
+ capxul contact hide PARTY_ID [--confirm]
409
+ capxul contact unhide PARTY_ID [--confirm]
410
+ capxul contact list --org acme
369
411
  ```
370
412
 
371
- Personal commands use the authenticated Account address book. Organization
372
- commands require one explicit `--org` or `--org-id`; they never use the saved
373
- Organization read default. `list` omits hidden entries unless
413
+ Contacts belong to whoever you act as: your Account's address book, or the
414
+ Organization `--org`, `CAPXUL_ORG` or `use org` names. `list` omits hidden entries unless
374
415
  `--include-hidden` is present. `get`, `label`, `hide`, and `unhide` address one
375
- stable Party with `--entry-id`.
416
+ stable Party by its ID.
376
417
 
377
418
  `add --input` reads the existing `AddressBookAddInput` JSON shape. For example:
378
419
 
@@ -398,35 +439,42 @@ relationships, hidden state, and last activity time.
398
439
  ## Personal Account reads
399
440
 
400
441
  ```bash
401
- capxul account status --email person@example.com
402
- capxul account balance --json
403
- capxul account deposit --wizard
442
+ capxul account show --email person@example.com
443
+ capxul balance --json
444
+ capxul address --wizard
404
445
  ```
405
446
 
406
447
  These commands reuse your verified current session unless you provide an email.
407
- They do not start setup or open a signer. Status shows lifecycle and transaction
408
- readiness; a failed lifecycle exposes its stage and error code. Balance shows
409
- exact asset quantities and available fiat valuations. An unavailable valuation
410
- or failed read is not zero. Deposit uses the SDK's address and network.
448
+ They do not start setup or open a signer. `account show` shows lifecycle and
449
+ transaction readiness; a failed lifecycle exposes its stage and error code.
450
+ `balance` and `address` act for whoever you act as: your Account, or the
451
+ Organization's treasury with `--org`. Balance shows exact asset quantities and
452
+ available fiat valuations. An unavailable valuation or failed read is not zero.
453
+ `address` uses the SDK's address and network.
454
+
455
+ `account retry --display-name NAME --country CC --handle HANDLE` is the first
456
+ setup: it creates the Profile, the personal Account and its wallet, as
457
+ `auth login` offers to on a terminal. Without Profile fields, `account retry`
458
+ resumes the setup of the existing Account.
411
459
 
412
460
  ## Organization commands
413
461
 
414
462
  ```sh
415
463
  capxul org list --json
416
- capxul org status --org ORGANIZATION_ID --json
417
- capxul org get --json
464
+ capxul org show --org acme --json
465
+ capxul org show --json
418
466
  capxul org me --json
419
- capxul org members --json
420
467
  capxul org member list --json
421
- capxul org member get --account-id ACCOUNT_ID --json
468
+ capxul org member get ACCOUNT_ID --json
422
469
  capxul org wait --timeout-seconds 120 --json
423
470
  capxul org create --name NAME --handle HANDLE --country CC [--bio TEXT] [--size TEXT] [--confirm]
424
471
  capxul org retry --org ORGANIZATION_ID [--confirm]
425
472
  ```
426
473
 
427
474
  These commands accept `--email`. Without it, they restore the protected current
428
- session. Organization reads accept `--org` or its alias `--org-id`. Identical
429
- repeated IDs are accepted. Different IDs are refused.
475
+ session. `org` commands act as the Organization `--org` names (a handle or an
476
+ ID), then `CAPXUL_ORG`, then the one `use org` saved. Two different `--org`
477
+ values are refused.
430
478
 
431
479
  A read without --org uses the Organization `use org` saved, then this machine's
432
480
  recovery ID, then the one unfinished setup returned by the backend. org list
@@ -440,10 +488,9 @@ setup section and explicit empty results. Members without an Account ID remain
440
488
  visible. `org me` shows backend capabilities and exact per-payment Budget caps;
441
489
  these caps are not available balances. `--json` keeps the structured SDK data.
442
490
 
443
- Member lookup uses an exact AccountId. In a human terminal, omit
444
- --account-id to select an attached Account from the authorized member list.
445
- Members without an Account ID cannot be selected. Scripted and JSON lookup
446
- requires --account-id. Reads do not sign or change
491
+ Member lookup uses an exact AccountId. In a human terminal, omit the ID to
492
+ select an attached Account from the authorized member list. Members without an
493
+ Account ID cannot be selected. Scripted and JSON lookup requires the ID. Reads do not sign or change
447
494
  setup state.
448
495
 
449
496
  org wait opens one exact setup subscription. It continues when needsAttention
@@ -452,40 +499,16 @@ or attention without a next check. It does not request a check or poll. The
452
499
  timeout accepts 1 to 3600 seconds and defaults to 120. A deadline returns
453
500
  CLI_DEADLINE at exit 5; Ctrl-C returns CANCELLED at exit 130.
454
501
 
455
- ## Organization Payment send
456
-
457
- ```sh
458
- capxul org payment send --org O --input payment.json --request-key K --confirm --json
459
- capxul org payment send --org O --resume K --confirm --json
460
- capxul org payment send
461
- ```
462
-
463
- The Organization input adds its exact Budget ID as `permissionId`. It supports
464
- the same recipient, amount, and document fields as Personal send. It rejects
465
- `timing` and payload actor, Organization, key, and lineage overrides. Scripted
466
- calls require an explicit Organization, request identity, and `--confirm`.
467
- A human terminal collects missing input and previews the selected actor, exact
468
- Organization, Budget, treasury asset position, recipient, and document summary.
469
- A saved read default does not select this write.
470
-
471
- One default-No confirmation precedes signing. The protected input binds actor,
472
- Organization, and key. Resume uses that input and forbids source/key overrides.
473
- Prepared IDs reach stderr before the next signature. Send reports submission;
474
- exact scoped get/wait establishes later state. JSON preview includes safe
475
- summary fields and omits document bytes. External recipients use the same
476
- literal-true input field and human warning as Personal send. Resume preserves
477
- the saved reference even when the current lookup resolves to a Party.
478
-
479
502
  ## Organization Payment reads
480
503
 
481
504
  ```sh
482
- capxul org payment list --org O [--json]
483
- capxul org payment get --org O --payment-id P [--json]
484
- capxul org payment wait --org O --payment-id P [--timeout-seconds N] [--json]
505
+ capxul payment list --org O [--json]
506
+ capxul payment get P --org O [--json]
507
+ capxul payment wait P --org O [--timeout-seconds N] [--json]
485
508
  ```
486
509
 
487
- These commands require an explicit Organization. They do not use the saved
488
- read default. The backend checks current Organization participation and returns
510
+ With `--org`, `CAPXUL_ORG` or `use org`, these commands read the Organization's
511
+ Payments; without one they read yours. The backend checks current Organization participation and returns
489
512
  only that Organization's outgoing, incoming, and self Payments. Get refuses
490
513
  a missing or mismatched Payment ID. Reads do not need a signer.
491
514
 
@@ -498,14 +521,13 @@ instructions with both Organization and Payment IDs.
498
521
  ## Organization Payment retry
499
522
 
500
523
  ```sh
501
- capxul org payment retry --org O --payment-id P --confirm --json
502
- capxul org payment retry
524
+ capxul payment retry P --org O --confirm --json
525
+ capxul payment retry
503
526
  ```
504
527
 
505
528
  Retry addresses the original command and every Payment in that command. It
506
529
  creates no replacement send or request key. A terminal can collect the Payment
507
- ID and select a currently accessible Organization. A saved read default does
508
- not choose the write target. JSON and scripted runs require both IDs and
530
+ ID. JSON and scripted runs require the Payment ID, the Organization, and
509
531
  `--confirm`.
510
532
 
511
533
  Before signing, the preview shows every original Payment, recipient, exact
@@ -523,12 +545,12 @@ commands. Retry does not claim settlement from a submission hash.
523
545
 
524
546
  ```sh
525
547
  capxul org permission list [--org O] [--json]
526
- capxul org permission get --permission-id B [--org O] [--json]
548
+ capxul org permission get B [--org O] [--json]
527
549
  capxul org permission create --org O --input budget.json --request-key K --confirm [--json]
528
- capxul org permission change --org O --permission-id B --input budget.json --request-key K --confirm [--json]
550
+ capxul org permission change B --org O --input budget.json --request-key K --confirm [--json]
529
551
  ```
530
552
 
531
- These commands use the explicit Organization, then the protected read default.
553
+ These commands use `--org`, then `CAPXUL_ORG`, then the Organization `use org` saved.
532
554
  A human terminal can select an accessible Organization when neither exists.
533
555
  Each read checks current Organization access. `get` requires an exact Permission
534
556
  ID and refuses a missing or mismatched result. Reads do not need a signer.
@@ -577,21 +599,23 @@ Invitation rights. Human mode guides missing scope and shows the full frozen
577
599
  before/after snapshot before one default-no approval. Machine mode requires
578
600
  scope, key, and confirmation. A changed snapshot refuses before staging or
579
601
  signature. Unfinished Invitation configuration must complete or cancel first.
580
- Submission remains pending application. Use exact command get/wait after an
581
- uncertain result; the command does not promise unconditional replacement replay.
602
+ Submission remains pending application. After an uncertain result, follow the
603
+ exact command with `org permission command get` or `org permission command wait`
604
+ and the request key (not listed in the help); the command does not promise
605
+ unconditional replacement replay.
582
606
 
583
607
  ## Payroll runs, rosters, and reads
584
608
 
585
609
  ```sh
586
610
  capxul org payroll groups list --org O [--json]
587
611
  capxul org payroll groups save --org O --input group.json --confirm [--json]
588
- capxul org payroll groups remove --org O --group-id G --confirm [--json]
612
+ capxul org payroll groups remove G --org O --confirm [--json]
589
613
  capxul org payroll terms --org O [--json]
590
614
  capxul org payroll list --org O [--json]
591
615
  capxul org payroll run --org O --input run.json --request-key K --confirm [--json]
592
616
  capxul org payroll run --org O --resume K --confirm [--json]
593
- capxul org payroll get --org O --run-id R [--json]
594
- capxul org payroll wait --org O --run-id R --timeout-seconds 120 [--json]
617
+ capxul org payroll get --org O R [--json]
618
+ capxul org payroll wait --org O R --timeout-seconds 120 [--json]
595
619
  ```
596
620
 
597
621
  Group input contains `name`, `tone`, and `members`. Each member supplies a
@@ -636,69 +660,50 @@ Recovery retains exact Organization, run, and any observed request key.
636
660
  ## Invitation commands
637
661
 
638
662
  ```sh
639
- capxul org invite list [--mine] [--limit N] [--cursor C] [--phase PHASE ...] [--org O]
640
- capxul org invite get --invitation-id I [--org O]
641
- capxul org invite wait --invitation-id I [--org O] [--timeout-seconds N]
642
- capxul org invite review --invitation-id I --org O [--timeout-seconds N]
643
- capxul org invite accept --invitation-id I --offer-digest D --org O [--confirm] [--timeout-seconds N]
644
- capxul org invite decline --invitation-id I --org O [--confirm]
645
- capxul org invite cancel --invitation-id I --org O [--confirm]
646
- capxul org invite resend --invitation-id I --org O [--confirm]
647
- capxul org invite retry --invitation-id I --org O [--confirm]
648
- capxul org member invite (--to-email E | --account-id ID) [--budget-id B ...] [--permission-id M ...] [--new-budget-name N --asset A (--limit Q | --unlimited) (--recipient-account ID ... | --any-recipient) --actions pay[,commitments]] --org O [--request-key K] [--preview] [--confirm]
663
+ capxul invite list [--limit N] [--after C] [--phase PHASE ...]
664
+ capxul invite accept [ID] --offer-digest D [--confirm] [--timeout-seconds N]
665
+ capxul invite decline [ID] [--confirm]
666
+ capxul org invite list [--limit N] [--after C] [--phase PHASE ...]
667
+ capxul org invite cancel [ID] [--confirm]
668
+ capxul org invite resend [ID] [--confirm]
669
+ capxul org member invite [EMAIL | --account-id ID] [--budget-id B ...] [--permission-id M ...] [--new-budget-name N --asset A (--limit Q | --unlimited) (--recipient-account ID ... | --any-recipient) --actions pay[,commitments]] [--request-key K] [--preview] [--confirm]
649
670
  ```
650
671
 
651
- `org invite list` returns your own offers. It accepts `--limit` (1--100),
652
- `--cursor`, and repeated `--phase` values, and its result carries `invitations`,
653
- `nextCursor`, and `observedAt`: pass `nextCursor` back as `--cursor`, and change
654
- no other filter between the two calls. `--mine` names the own-offer projection,
655
- which is already the default. With `--org O` the command returns that
656
- Organization's invitations for a current Admin instead; the Organization list is
657
- not filtered to you, so `--mine` together with `--org` refuses with exit 2. The
658
- other invitation commands require an exact `--invitation-id`.
659
-
660
- `org invite get` and `org invite wait` use `--org` when you name it. Without
661
- `--org` they walk your own-offer pages, 100 rows per request, until they find
662
- the invitation or the pages end. They never consult the saved read default, and
663
- an offer you cannot see is refused. `--timeout-seconds` bounds the resolution
664
- and the read together on both commands.
672
+ `invite` holds the invitations you received; `org invite` holds the invitations
673
+ the Organization you act as sent. `invite list` returns your own offers.
674
+ `org invite list` returns that Organization's invitations for a current Admin.
675
+ Both accept `--limit` (1--100), `--after`, and repeated `--phase` values, and
676
+ their result carries `invitations`, `nextCursor`, and `observedAt`: pass
677
+ `nextCursor` back as `--after`, and change no other filter between the two calls.
678
+
679
+ A received invitation names its own Organization: `invite accept` and
680
+ `invite decline` walk your own-offer pages, 100 rows per request, to find it.
681
+ `org invite cancel` and `org invite resend` act in the Organization `--org`,
682
+ `CAPXUL_ORG` or `use org` names.
683
+
684
+ Recovery guidance can also name `invite get`, `invite review`, `invite wait`,
685
+ `org invite get`, `org invite wait` and `org invite retry`. They work as before
686
+ but are not listed in the help: `get` and `review` read one offer, `wait`
687
+ follows it until it settles with one SDK subscription, and `retry` resumes the
688
+ backend's own recovery action. None of them writes a new offer.
665
689
 
666
690
  Invitation lists label own-offer or Organization Admin scope and the verified
667
- actor. They show an explicit empty page, next cursor, or end of results. Page
668
- filters and cursor values stay in their selected scope.
691
+ actor. They show an explicit empty page, next cursor, or end of results.
669
692
 
670
693
  Invitation human output shows the authoritative phase, delivery, expiry, and
671
694
  offered policies. An offer does not prove active membership. Manual resend/retry commands come only
672
695
  from the backend action projection, with exact scope/session and earliest time.
673
- Older responses without that projection show read-back guidance. Lifecycle
674
- recovery remains separate from manual options. Member-invite
675
- previews show exact per-payment caps and allowed recipients/actions; expiry is
676
- unavailable before authoring. The native authoring wizard asks for Organization,
677
- recipient, grants and policy before session email. New-Budget labels identify
678
- policy inputs; skip them for existing grants. Wizard answers use the same request
679
- validation as flags. Every authoring write prints its request key
680
- before submission. JSON result data stays unchanged.
696
+ Member-invite previews show exact per-payment caps and allowed recipients/actions;
697
+ expiry is unavailable before authoring. Every authoring write prints its request
698
+ key before submission. JSON result data stays unchanged.
681
699
 
682
700
  Uncertain decline/cancel/resend/retry failures and transition deadlines print an
683
- exact `org invite get` command with the resolved session. Read the current offer
684
- before another transition; a lost response does not authorize replay.
685
-
686
- `org invite wait` uses one exact SDK subscription after resolving scope. It
687
- finishes when the offer settles or lifecycle recovery asks a person to act.
688
- Manual recovery options do not stop the wait. It never polls, retries, resends,
689
- or accepts. The deadline covers resolution and observation; completion, failure
690
- and interruption release the subscription, including a handle that arrives late.
691
-
692
- Native invitation target prompts ask Organization and invitation IDs before
693
- session email. Transition confirmation shows the verified actor and the current
694
- resolved offer, including grants and expiry, before the default-No question.
701
+ exact `get` command for the offer with the resolved session. Read the current
702
+ offer before another transition; a lost response does not authorize replay.
695
703
 
696
- `org invite review` requires `--org`, returns the current `InvitationView`
697
- directly in `data`, and performs no write or signing.
698
-
699
- The four transitions require `--org` in both modes, as `accept` does. They never
700
- author a new offer. A noninteractive or JSON run requires `--confirm`. An
701
- interactive run shows the resolved current offer and asks a default-no question.
704
+ The transitions never author a new offer. A noninteractive or JSON run requires
705
+ `--confirm`. An interactive run shows the resolved current offer and asks a
706
+ default-no question.
702
707
 
703
708
  `org member invite` authorizes one exact offer. `--preview` writes nothing and
704
709
  needs neither a request key nor confirmation. A noninteractive write requires
@@ -706,7 +711,7 @@ needs neither a request key nor confirmation. A noninteractive write requires
706
711
  used before it submits, so a lost response is recoverable with the same
707
712
  identity. At most one `--new-budget-name` is accepted per command.
708
713
 
709
- `org invite accept` is the exact grantee's consent commit. It takes the exact
714
+ `invite accept` is the exact grantee's consent commit. It takes the exact
710
715
  digest the offer shows as `--offer-digest`: a noninteractive or JSON run must
711
716
  supply it, and without it the command refuses with exit 2 before it creates a
712
717
  client. An interactive run may omit it, and then reads the offer and fills the
@@ -716,9 +721,7 @@ spellings must match when supplied together. The command returns the
716
721
  `InvitationView` directly in `data`. The grant is executed by the deployment's
717
722
  technical executor, so the command needs no browser bridge and works in a
718
723
  headless or CI session. A repeat with the stored digest returns the same
719
- accepted result; a different digest refuses and cannot overwrite consent. The
720
- returned view is the authorization-time view of the consent commit
721
- (`pending_grant`); read the settled `active` state with `get` or `wait`.
724
+ accepted result; a different digest refuses and cannot overwrite consent.
722
725
 
723
726
  ## Organization writes
724
727
 
@@ -777,9 +780,9 @@ ordinary local and online commands, help, version, and safely attributed argumen
777
780
  refusals. Parser refusals produce a completion without a start. Early native
778
781
  global errors with no resolved command route send nothing, because the CLI
779
782
  cannot determine whether they belong to a silent collection control.
780
- `telemetry disable` saves one preference for the OS user and sends no final
783
+ `config telemetry off` saves one preference for the OS user and sends no final
781
784
  remote event. Already running CLI processes check the current preference before
782
- each export. Requests already sent cannot be recalled. `telemetry status`
785
+ each export. Requests already sent cannot be recalled. `config telemetry status`
783
786
  reports the stored preference, effective policy, configuration, and reason.
784
787
  `--log-level` controls normal diagnostic output, not collection. An eligible
785
788
  invocation still produces its remote completion unless collection is disabled.
@@ -802,13 +805,41 @@ Organization setup failures include a copyable command with the exact ID and
802
805
  selected email. When state is uncertain, read status first. A supported retry
803
806
  includes `--confirm`; terminal runs still ask for confirmation. If no ID is
804
807
  known, the command lists your Organizations instead of guessing one.
805
- JSON errors can include `error.details.recovery` with `kind` (`read` or `retry`)
806
- and an `argv` array for that primary action. These arguments preserve the same
807
- scope as the human command; they do not grant authority or bypass current checks.
808
+ `--json` writes one version 1 envelope to stdout. Success contains `data`: the
809
+ SDK's own value for the command, with no CLI wrapper. A list is the SDK page,
810
+ `{ items, nextCursor }`; pass `nextCursor` back as `--after` where the command
811
+ takes one. `--fields a,b` keeps only those fields of `data` (`amount.value`
812
+ reaches inside an object; a list keeps `nextCursor` and picks from each item).
813
+ `--fields` without `--json` refuses.
814
+
815
+ A failure contains `error`:
816
+
817
+ ```json
818
+ {
819
+ "code": "CLI_USAGE",
820
+ "message": "Unknown command \"paymnt\".",
821
+ "hint": "Did you mean: capxul payment list",
822
+ "next": { "argv": ["capxul", "payment", "list"] }
823
+ }
824
+ ```
825
+
826
+ `code` and `message` are always present. `hint` says what to do when a sentence
827
+ helps, `field` names the refused input, and `next.argv` is the command that
828
+ fixes it or reads where an interrupted command stands: `capxul auth login` when
829
+ no one is signed in, the corrected command for a typo, or the exact `get` for an
830
+ uncertain write. `next` preserves the same scope as the human command; it does
831
+ not grant authority or bypass current checks. `error.details.recovery` keeps
832
+ its `kind` (`read` or `retry`) next to the same `argv`.
833
+
834
+ A person sees one red line for what happened and one for what fixes it (on the
835
+ same line when both fit in 80 columns):
808
836
 
809
- `--json` writes one version 1 envelope to stdout. Success contains `data`, which
810
- can be an object, array, or null according to the command's SDK result.
811
- Failure contains `error.code` and CLI-owned `error.message`. A wallet failure
837
+ ```text
838
+ ✗ Unknown command "paymnt". Did you mean: capxul payment list
839
+ ✗ Not signed in. Try: capxul auth login
840
+ ```
841
+
842
+ A wallet failure
812
843
  also includes its known `error.mode` and allowed `error.details`: wallet stage,
813
844
  operation, provider, provider code, and HTTP status. An unknown browser failure
814
845
  uses mode `unknown`. No provider message, token, signature, or native cause enters
@@ -871,6 +902,32 @@ all `telemetry` commands receive no notice. The optional check has one 500 ms
871
902
  budget. Safe failed attempts are cached. Storage or network failures remain
872
903
  silent and do not change the command result. This check sends no telemetry.
873
904
 
905
+ ## Sandbox: `capxul dev`
906
+
907
+ `capxul dev` is for building and testing on Capxul, agents included, without real
908
+ money. It works on a test deployment: staging, or a local DevNet
909
+ (`capxul-devnet up --browser-origin http://localhost:3000` in this repository, then
910
+ `capxul use env devnet`). Production refuses both commands.
911
+
912
+ ```sh
913
+ capxul dev fund 100 # test money into your own Safe (default 100 USDC)
914
+ capxul dev fund 50 --asset USDT
915
+ capxul dev key # a test publishable key for http://localhost:3000, into .env.local
916
+ capxul dev key --origin http://localhost:3100 --print
917
+ ```
918
+
919
+ `dev fund` needs you signed in and funds only your own Safe. `dev key` needs no
920
+ sign-in; it sets `NEXT_PUBLIC_CAPXUL_PUBLISHABLE_KEY` and `CAPXUL_SITE_URL` in
921
+ `.env.local` and keeps every other line. On staging, sign-in works only from
922
+ `http://localhost:3000` or `http://localhost:3100`.
923
+
924
+ [`tests/dev-journeys.mjs`](tests/dev-journeys.mjs) runs the agent plugin's
925
+ journeys with the built CLI against the local DevNet: sign in, `dev fund`, the home
926
+ screen, a payment (refused with its fix while the wallet setup is unfinished, as
927
+ it is on a DevNet with no wallet provider), requests, offers, Inbox, Organizations,
928
+ the account, `schema`, a typo's fix and `dev key`. The `capxul dev journeys` job in
929
+ `.github/workflows/devnet-integration.yml` starts the DevNet and runs it.
930
+
874
931
  ## Development commands
875
932
 
876
933
  ```sh
@@ -892,11 +949,11 @@ This CLI establishes a first-party BetterAuth session. An older native
892
949
  Logout clears the selected email's session and attempts to revoke any native
893
950
  grant that was stored before the first-party flow replaced it.
894
951
 
895
- `capxul auth login` and `capxul auth signup` stay separate commands. On a
952
+ `capxul auth login` and `capxul account retry` stay separate commands. On a
896
953
  terminal, each command is a wizard. `auth login` asks for the email and a masked
897
954
  OTP. It accepts the code as a paste. It retries an invalid code at most three
898
955
  times for one request. After sign-in, an incomplete account gets one offer to
899
- continue setup in the same command. `auth signup` authenticates first, then asks
956
+ continue setup in the same command. `account retry` authenticates first, then asks
900
957
  for the Profile fields: display name, two-letter country code, and handle. A
901
958
  known value is the prompt default, so Enter keeps it.
902
959
 
@@ -924,7 +981,7 @@ verification has no waiting sign-in, the error names `capxul auth login`.
924
981
  Neither command prints the code itself.
925
982
 
926
983
  If account setup or its final read fails recoverably, the CLI prints an exact
927
- `auth signup` continuation with your email and Profile fields. Run it with the
984
+ `account retry` continuation with your email and Profile fields. Run it with the
928
985
  same protected CLI home to resume the saved session. Explicit access/input
929
986
  refusals and non-retryable failures require their stated correction first.
930
987
 
@@ -943,13 +1000,13 @@ Profile field; a missing field refuses with exit 2:
943
1000
 
944
1001
  ```sh
945
1002
  # Supply only the delivered OTP through stdin.
946
- capxul auth signup --email "$TEST_EMAIL" --otp-stdin \
1003
+ capxul account retry --email "$TEST_EMAIL" --otp-stdin \
947
1004
  --display-name "Test Person" --country GH --handle test_person --json
948
1005
  ```
949
1006
 
950
1007
  `--otp-stdin` reads up to 64 bytes, ending at EOF. Pipe from a secret provider or
951
1008
  use input redirection from a protected file. An invalid value refuses with exit 2.
952
- For `auth signup`, a missing `--otp-stdin` refuses with exit 2 before the command
1009
+ For `account retry`, a missing `--otp-stdin` refuses with exit 2 before the command
953
1010
  starts client work. Only `auth verify <code>` accepts a code as an argument: the
954
1011
  code is single-use and expires in minutes. Codes are never persisted in the
955
1012
  continuation or included in output.
@@ -957,11 +1014,11 @@ continuation or included in output.
957
1014
  The local page binds to an OS-selected loopback port. A random launch capability
958
1015
  is redeemed once and removed from the URL before Openfort starts. The page receives
959
1016
  only the authenticated wallet token and encryption session in memory. Closing it
960
- ends the current wallet attempt. Re-run `auth signup` with the same CLI home to
1017
+ ends the current wallet attempt. Re-run `account retry` with the same CLI home to
961
1018
  resume the same Profile and Account without another OTP while the backend session
962
1019
  remains valid.
963
1020
 
964
- `auth signup` returns only two readiness results. `setupState: "ready"` is a
1021
+ `account retry` returns only two readiness results. `setupState: "ready"` is a
965
1022
  personal Account that the Account readiness owner reads as ready and deployed,
966
1023
  and its data carries the public identifiers: the Profile, the public wallet
967
1024
  address (`smartAccount.signerAddress`), the personal Smart Account address
@@ -994,7 +1051,7 @@ local sign-out remains in effect.
994
1051
 
995
1052
  `auth profile` returns a backend-read Profile and account lifecycle without opening
996
1053
  the browser. Successful email authentication can return `setupState: "setup-required"`.
997
- `auth signup` returns `setupState: "ready"` only after Core reads a ready Account.
1054
+ `account retry` returns `setupState: "ready"` only after Core reads a ready Account.
998
1055
  After logout, profile reads refuse with `NOT_AUTHENTICATED` and exit 3. An invalid
999
1056
  or expired OTP refuses with exit 2.
1000
1057
 
@@ -1007,15 +1064,15 @@ capxul account retry --email you@example.com --wizard
1007
1064
 
1008
1065
  The terminal shows the verified session, Account ID and current lifecycle before
1009
1066
  confirmation. A ready Account starts no wallet work. Missing Account or Profile
1010
- state directs to `auth signup`. A deadline stops waiting; check `account status`
1067
+ state directs to `account retry`. A deadline stops waiting; check `account status`
1011
1068
  for the same session before retrying.
1012
1069
 
1013
1070
  Read an Organization treasury or deposit target:
1014
1071
 
1015
1072
  ```sh
1016
- capxul org balance --org org_example --email you@example.com
1017
- capxul org deposit --org org_example --email you@example.com
1018
- capxul org balance --wizard
1073
+ capxul balance --org org_example --email you@example.com
1074
+ capxul address --org org_example --email you@example.com
1075
+ capxul balance --wizard
1019
1076
  ```
1020
1077
 
1021
1078
  These commands use the existing Organization read selection. Balances require
@@ -1027,11 +1084,11 @@ relationships and hidden state. JSON keeps the existing array, entry or null.
1027
1084
 
1028
1085
  ```sh
1029
1086
  capxul contact list --include-hidden
1030
- capxul contact get --entry-id party_example
1031
- capxul org contact get --org org_example --wizard
1087
+ capxul contact get party_example
1088
+ capxul contact get --org org_example --wizard
1032
1089
  ```
1033
1090
 
1034
- In a terminal, omit `--entry-id` to select a contact, including hidden contacts.
1091
+ In a terminal, omit the ID to select a contact, including hidden contacts.
1035
1092
  In a script, provide the exact Party ID. Organization contacts always require
1036
1093
  an explicit `--org`; they never use the personal book as a fallback.
1037
1094
 
@@ -1040,17 +1097,17 @@ Without an input file, the wizard asks for these values. On an uncertain respons
1040
1097
  use the printed list command to check the same address book before adding again.
1041
1098
  Adding an existing contact can unhide it or change its label.
1042
1099
 
1043
- Change a contact label with `contact label --entry-id party_example --label
1100
+ Change a contact label with `contact label party_example --label
1044
1101
  "New label" --confirm`. In a terminal, omit the Party ID to select from the
1045
1102
  same book, including hidden contacts. Organization labels require `--org`.
1046
1103
  After an uncertain response, use the exact get command printed by the CLI.
1047
1104
 
1048
- `contact hide` can select a contact in a terminal when `--entry-id` is omitted.
1105
+ `contact hide` can select a contact in a terminal when the ID is omitted.
1049
1106
  It confirms the hidden state, then prints the exact `contact unhide` command for
1050
1107
  the same Party, session and scope. The contact's history remains available.
1051
1108
 
1052
1109
  `contact unhide` uses the same scoped selector, including hidden contacts, when
1053
- a terminal omits `--entry-id`. It confirms the change and shows the visible
1110
+ a terminal omits the ID. It confirms the change and shows the visible
1054
1111
  contact. Scripts provide the exact Party ID and `--confirm`.
1055
1112
 
1056
1113
  ## Fixed offers
@@ -1061,10 +1118,10 @@ These commands do not sign payments or create checkout purchases.
1061
1118
  ```sh
1062
1119
  capxul offer create --input offer.json --request-key consulting-001 --confirm
1063
1120
  capxul offer list
1064
- capxul offer get --offer-id OFFER_ID
1065
- capxul offer revise --offer-id OFFER_ID --expected-revision 1 --input offer.json --confirm
1066
- capxul offer deactivate --offer-id OFFER_ID --expected-revision 2 --confirm
1067
- capxul org offer list --org ORG_ID
1121
+ capxul offer get OFFER_ID
1122
+ capxul offer revise OFFER_ID --expected-revision 1 --input offer.json --confirm
1123
+ capxul offer deactivate OFFER_ID --expected-revision 2 --confirm
1124
+ capxul offer list --org ORG_ID
1068
1125
  ```
1069
1126
 
1070
1127
  Use `org offer` and `--org ORG_ID` for each Organization command. Use `--email`
@@ -1105,7 +1162,7 @@ reference. Separate purchasers receive separate checkout and settlement IDs.
1105
1162
  Alice issues a basic request or an Invoice to Bob with `request issue`. For an Organization issuer,
1106
1163
  Alice uses `org request issue --org ORGANIZATION_ID`. Issuance saves Alice's PDF
1107
1164
  by default and returns the request ID, document references, and checkout URL.
1108
- Bob runs `inbox list`, then `inbox get --request-id REQUEST_ID`. An Organization
1165
+ Bob runs `inbox list`, then `inbox get REQUEST_ID`. An Organization
1109
1166
  payer uses the equivalent `org inbox` commands with its explicit Organization.
1110
1167
 
1111
1168
  Bob's Inbox contains the request and document references. It does not receive a