@capxul/cli 4.20.0-beta.3 → 4.20.0-beta.31
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 +1159 -21
- package/dist/browser/GeistVF.woff +0 -0
- package/dist/browser/signer.js +85954 -0
- package/dist/browser/signer.js.map +1 -0
- package/dist/entry-CmnyAyYp.mjs +46446 -0
- package/dist/entry-CmnyAyYp.mjs.map +1 -0
- package/dist/fast-Dvf2EM7j.mjs +57 -0
- package/dist/fast-Dvf2EM7j.mjs.map +1 -0
- package/dist/{lib-BOge5QZP.mjs → lib-5nM6ORJd.mjs} +5 -4
- package/dist/{lib-BOge5QZP.mjs.map → lib-5nM6ORJd.mjs.map} +1 -1
- package/dist/{lib-DH_xJGSE.mjs → lib-BJgR4mWJ.mjs} +6 -5
- package/dist/{lib-DH_xJGSE.mjs.map → lib-BJgR4mWJ.mjs.map} +1 -1
- package/dist/lib-BlUleR2B.mjs +3 -0
- package/dist/{lib-C8ENT9j6.mjs → lib-BspI667y.mjs} +7 -6
- package/dist/{lib-C8ENT9j6.mjs.map → lib-BspI667y.mjs.map} +1 -1
- package/dist/{lib-C4fpnzyy.mjs → lib-Buegx0dz.mjs} +6 -5
- package/dist/{lib-C4fpnzyy.mjs.map → lib-Buegx0dz.mjs.map} +1 -1
- package/dist/{lib-DVGoRCJN.mjs → lib-CJw8te9L.mjs} +38 -38
- package/dist/{lib-DVGoRCJN.mjs.map → lib-CJw8te9L.mjs.map} +1 -1
- package/dist/lib-C_-etuHZ.mjs +3 -0
- package/dist/lib-CoGPQsbr.mjs +655 -0
- package/dist/lib-CoGPQsbr.mjs.map +1 -0
- package/dist/lib-Dd_fsz7h.mjs +3 -0
- package/dist/lib-DnmstTkB.mjs +578 -0
- package/dist/lib-DnmstTkB.mjs.map +1 -0
- package/dist/lib-IlYdzOHo.mjs +3 -0
- package/dist/main.mjs +22 -51062
- package/dist/main.mjs.map +1 -1
- package/dist/organizations-CbmvwYH7.mjs +37607 -0
- package/dist/organizations-CbmvwYH7.mjs.map +1 -0
- package/dist/permission-approvals-CKzN6tEO.mjs +139 -0
- package/dist/permission-approvals-CKzN6tEO.mjs.map +1 -0
- package/dist/record-U7Yu4KQP.mjs +1295 -0
- package/dist/record-U7Yu4KQP.mjs.map +1 -0
- package/dist/{secp256k1-Cc9JhcTQ.mjs → secp256k1-D8L212-Z.mjs} +5 -298
- package/dist/secp256k1-D8L212-Z.mjs.map +1 -0
- package/dist/sha2-CR2DnMEk.mjs +298 -0
- package/dist/sha2-CR2DnMEk.mjs.map +1 -0
- package/dist/utils-DmKXBQjM.mjs +130 -0
- package/dist/utils-DmKXBQjM.mjs.map +1 -0
- package/dist/where-view-DuGbrSLp.mjs +1420 -0
- package/dist/where-view-DuGbrSLp.mjs.map +1 -0
- package/package.json +18 -10
- package/dist/secp256k1-Cc9JhcTQ.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -1,46 +1,844 @@
|
|
|
1
1
|
# Capxul CLI
|
|
2
2
|
|
|
3
|
-
The CLI provides
|
|
4
|
-
|
|
3
|
+
The CLI provides email OTP login, persistent first-party sessions, a handover to
|
|
4
|
+
the web app for Account setup, personal and Organization contacts, a bundled
|
|
5
|
+
Openfort wallet page for Organization setup,
|
|
6
|
+
backend profile and account reads, diagnostics, and one global collection
|
|
7
|
+
preference. It requires Node 24 or later on macOS or Linux.
|
|
5
8
|
|
|
6
9
|
```sh
|
|
7
10
|
capxul --help
|
|
8
11
|
capxul --version
|
|
9
12
|
capxul --completions bash
|
|
10
13
|
capxul doctor --json
|
|
11
|
-
capxul telemetry status --json
|
|
12
|
-
capxul telemetry
|
|
13
|
-
capxul telemetry
|
|
14
|
+
capxul config telemetry status --json
|
|
15
|
+
capxul config telemetry off --json
|
|
16
|
+
capxul config telemetry on --json
|
|
14
17
|
capxul doctor --online --timeout-ms 30000 --json
|
|
15
18
|
```
|
|
16
19
|
|
|
17
20
|
Help and version do not require application credentials or a working backend.
|
|
21
|
+
With no arguments, `capxul` shows the same generated help as `capxul --help`.
|
|
18
22
|
They use the same observation policy as ordinary commands. Shell completion
|
|
19
23
|
machinery and collection controls send no observation records.
|
|
20
24
|
`doctor` checks local configuration unless `--online` is present. An online
|
|
21
25
|
check uses the public Capxul SDK and verifies the backend response nonce.
|
|
22
26
|
It does not authenticate a person or submit a transaction.
|
|
23
27
|
|
|
28
|
+
## Agent plugin
|
|
29
|
+
|
|
30
|
+
The Claude Code plugin lives in its own private repository,
|
|
31
|
+
[`Xelmar-tech/capxul-plugin`](https://github.com/Xelmar-tech/capxul-plugin): one
|
|
32
|
+
`capxul` skill that makes an agent act as the person's Capxul through this CLI,
|
|
33
|
+
with journeys as references, local memory under `~/.capxul/`, and the
|
|
34
|
+
paste-a-prompt. Install it with:
|
|
35
|
+
|
|
36
|
+
```sh
|
|
37
|
+
claude plugin marketplace add Xelmar-tech/capxul-plugin
|
|
38
|
+
claude plugin install capxul@capxul
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
That repository's CI checks every command the skill names against
|
|
42
|
+
`capxul schema --json` from `@capxul/cli@latest`, so a renamed or removed command
|
|
43
|
+
fails there.
|
|
44
|
+
|
|
45
|
+
## Command schema
|
|
46
|
+
|
|
47
|
+
```sh
|
|
48
|
+
capxul schema
|
|
49
|
+
capxul schema payment send
|
|
50
|
+
capxul schema org payroll
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
`capxul schema` prints every command as JSON: its name, what it does and whether
|
|
54
|
+
it moves money, with the global flags and what each exit code means.
|
|
55
|
+
`capxul schema <command…>` prints one command: usage, arguments, flags, global
|
|
56
|
+
flags and examples, read from the command's own definition (Effect's help
|
|
57
|
+
document, so `--help` and the schema always agree), plus `movesMoney`, `output`
|
|
58
|
+
(what `data` is) and `errors` (the codes it can answer with). A group lists its
|
|
59
|
+
commands. Agents look commands up here instead of copying flags.
|
|
60
|
+
|
|
61
|
+
## Home screen
|
|
62
|
+
|
|
63
|
+
```sh
|
|
64
|
+
capxul
|
|
65
|
+
capxul --json
|
|
66
|
+
capxul --org acme
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Bare `capxul` is the home screen. It prints where you are at once, from this
|
|
70
|
+
machine: who you are, who you act as and the Safe. Then one backend read
|
|
71
|
+
(`accounts.summaries.home`) returns your balances (or the Organization
|
|
72
|
+
treasury) and what needs you, each with the command that resolves it (requests
|
|
73
|
+
to pay, payroll runs to approve, payments to retry), and it shows a few
|
|
74
|
+
commands to try. A backend without that read gets the separate reads instead.
|
|
75
|
+
A read that fails shows its section as unavailable, never as empty. Signed out,
|
|
76
|
+
it prints `Not signed in · capxul auth login` without a network call. `--json`
|
|
77
|
+
returns the same as data: `where`, `signedIn`, `balances` (the asset
|
|
78
|
+
positions), `needsYou` (each with `next.argv`) and `try`. `capxul --help` is
|
|
79
|
+
the command list.
|
|
80
|
+
|
|
81
|
+
## Where you are
|
|
82
|
+
|
|
83
|
+
```sh
|
|
84
|
+
capxul whoami # local, under 0.3 s
|
|
85
|
+
capxul whoami --json # the same, with where each value came from
|
|
86
|
+
capxul auth login # sign in with an email code
|
|
87
|
+
capxul auth verify 123456 # finish a sign-in that auth login started (scripts and agents)
|
|
88
|
+
capxul auth switch ada@example.com
|
|
89
|
+
capxul auth logout
|
|
90
|
+
capxul use org acme # act as one of your Organizations
|
|
91
|
+
capxul use personal # act as yourself
|
|
92
|
+
capxul use env devnet # use this environment from now on
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
`whoami` prints the signed-in person, who you act as, the Safe, and the
|
|
96
|
+
environment with its network. It reads only this machine's files and makes no
|
|
97
|
+
network call. With `--json`, each value carries its `source`: `flag`, `env`
|
|
98
|
+
(a variable), `saved`, or `default`.
|
|
99
|
+
|
|
100
|
+
Every human command prints one header line on stderr when someone is signed in:
|
|
101
|
+
`▸ <actor> · <environment> · <network>`, for example
|
|
102
|
+
`▸ Acme Ltd · staging · Base Sepolia`. The environment name is highlighted on a
|
|
103
|
+
terminal. Production is the normal case and will show no environment label.
|
|
104
|
+
Red is only used for errors. JSON output has no header.
|
|
105
|
+
|
|
106
|
+
The environment comes from `--env <name>`, then `CAPXUL_ENV`, then
|
|
107
|
+
`CAPXUL_BOOTSTRAP_URL`, then the environment `use env` saved, then staging. The
|
|
108
|
+
names are `staging` and `devnet`; production is not available in this CLI yet.
|
|
109
|
+
The devnet uses its fixed test key, so it needs no `CAPXUL_PUBLISHABLE_KEY`.
|
|
110
|
+
|
|
111
|
+
`use org <handle>` finds the Organization among those you belong to and saves
|
|
112
|
+
it for this environment. It grants no authority; the backend checks every
|
|
113
|
+
command. `org` commands act as the saved Organization unless `--org` names
|
|
114
|
+
another. `use personal` forgets it. Signing in as a different person forgets the
|
|
115
|
+
previous person's Organization and Safe.
|
|
116
|
+
|
|
117
|
+
Scripts and agents sign in with two commands: `auth login --email EMAIL` sends
|
|
118
|
+
the code and returns `next.argv` for `auth verify <code>`, which finishes it.
|
|
119
|
+
`--email` is not needed on later commands.
|
|
120
|
+
|
|
121
|
+
## Guided terminal input
|
|
122
|
+
|
|
123
|
+
In a human terminal, these commands collect missing required fields one step at
|
|
124
|
+
a time:
|
|
125
|
+
|
|
126
|
+
```sh
|
|
127
|
+
capxul org permission change
|
|
128
|
+
capxul org member invite
|
|
129
|
+
capxul payment get
|
|
130
|
+
capxul document get
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Supplied valid values remain in the command. Preview and confirmation still
|
|
134
|
+
apply to writes. `--wizard` provides an explicit entry to the same native input
|
|
135
|
+
flow. Ctrl+C or Ctrl+D cancels with exit 130. Bare groups show help. JSON, CI,
|
|
136
|
+
and noninteractive runs require their declared input and do not prompt.
|
|
137
|
+
|
|
138
|
+
## Waiting output
|
|
139
|
+
|
|
140
|
+
Pending setup and observation commands show a waiting message. Human terminals
|
|
141
|
+
also show an activity indicator. The indicator stops before a prompt or final
|
|
142
|
+
result. Noninteractive human output uses text without animation.
|
|
143
|
+
|
|
144
|
+
Payment, Payroll, Permission, Organization, and Invitation waits print observed
|
|
145
|
+
state changes on stderr. JSON mode uses declared progress objects on stderr and
|
|
146
|
+
one final version 1 result on stdout. Account setup reports public signer states.
|
|
147
|
+
Activity shows that the CLI is waiting. It does not prove settlement or a healthy
|
|
148
|
+
connection. A deadline stops observation; it does not cancel a submitted operation.
|
|
149
|
+
|
|
150
|
+
## Sending money through the approval page
|
|
151
|
+
|
|
152
|
+
```sh
|
|
153
|
+
capxul payment send rex@example.com 50
|
|
154
|
+
capxul payment send @rex 12.5 --asset USDT
|
|
155
|
+
capxul payment send 0x91f2…aa10 40
|
|
156
|
+
capxul payment send rex@example.com 50 --json
|
|
157
|
+
capxul payment send rex@example.com 50 --org acme [--from BUDGET]
|
|
158
|
+
capxul payment send --input payment.json [--org acme] [--request-key K]
|
|
159
|
+
capxul payment wait PAYMENT_ID_OR_APPROVAL_ID [--org acme] [--timeout-seconds N] [--json]
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
`send` prepares the payment and opens its approval page. The page is the one
|
|
163
|
+
and only confirmation: there is no `[y/N]` and no `--confirm`. Nothing moves
|
|
164
|
+
until a person approves it there with their own key; the CLI never signs.
|
|
165
|
+
|
|
166
|
+
`<to>` is an email, a @handle or an 0x address (an address you type is your
|
|
167
|
+
own choice, and the page shows it again). `<amount>` is in `--asset`, a symbol
|
|
168
|
+
the payer holds (USDC by default). With `--org`, the payment spends from a
|
|
169
|
+
Budget you hold in that Organization: the one Budget for the asset, or the one
|
|
170
|
+
`--from` names (by its name or ID). `--input FILE|-` takes the SDK's payment JSON instead, with
|
|
171
|
+
documents; an Organization's adds its `permissionId`.
|
|
172
|
+
|
|
173
|
+
A person sees what they are approving (who pays and what is left, who receives
|
|
174
|
+
it, the amount, and that there is no fee: every operation is sponsored). The
|
|
175
|
+
CLI opens the page on a terminal, prints the link, and follows it: `✓ Signed`
|
|
176
|
+
when the person approves, `✓ Confirmed` when the payment settles, then the paid
|
|
177
|
+
amount, the transaction and the receipt command. A rejection on the page ends
|
|
178
|
+
`✗ Not sent` with exit 130; an approval that lapses sends nothing (exit 2).
|
|
179
|
+
Ctrl-C stops following; the link still works, and `payment wait` follows it.
|
|
180
|
+
|
|
181
|
+
With `--json`, `send` returns at once:
|
|
182
|
+
|
|
183
|
+
```json
|
|
184
|
+
{
|
|
185
|
+
"status": "awaiting_approval",
|
|
186
|
+
"approvalId": "approval_01JA…",
|
|
187
|
+
"approvalUrl": "https://app.staging.capxul.com/approve/approval_01JA…",
|
|
188
|
+
"paymentIds": ["payment_01JB…"],
|
|
189
|
+
"expiresAt": 1791359237000,
|
|
190
|
+
"next": { "argv": ["capxul", "payment", "wait", "approval_01JA…", "--json"] }
|
|
191
|
+
}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
An agent gives the person the link and runs `next.argv`. `payment wait
|
|
195
|
+
APPROVAL_ID` follows the approval: once it is approved it sends it (unless the
|
|
196
|
+
page already did; only one send can claim it) and waits for the payment to
|
|
197
|
+
settle. Its result is the SDK's `{ approval, payments }`. An Organization
|
|
198
|
+
payment's wait carries `--org`. Without `--timeout-seconds`, `payment wait` follows
|
|
199
|
+
until the approval lapses and the payment settles, as `send` does; with it, the wait
|
|
200
|
+
stops after that many seconds (1 to 3600) with exit 5 and the same command to run again.
|
|
201
|
+
|
|
202
|
+
## Personal Payments
|
|
203
|
+
|
|
204
|
+
```sh
|
|
205
|
+
capxul payment retry PAYMENT_ID --json
|
|
206
|
+
capxul payment send rex@capxul.com 50 --json
|
|
207
|
+
capxul payment cancel PAYMENT_ID --json
|
|
208
|
+
capxul payment redirect PAYMENT_ID sam@acme.co --json
|
|
209
|
+
capxul payment list --json
|
|
210
|
+
capxul payment get PAYMENT_ID --json
|
|
211
|
+
capxul payment wait PAYMENT_ID --json
|
|
212
|
+
capxul payment wait PAYMENT_ID --timeout-seconds 120 --json
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
These commands use the current authenticated session. Add `--email EMAIL` to
|
|
216
|
+
select a saved session. In a terminal, omit the required Payment ID to enter it.
|
|
217
|
+
`wait` follows a Payment until it ends unless `--timeout-seconds` bounds it.
|
|
218
|
+
`get` refuses when the Payment is absent or unavailable to the session. Human
|
|
219
|
+
output shows the full ID, status, amount, counterparty and available receipt.
|
|
220
|
+
|
|
221
|
+
`wait` observes the exact Payment until it reaches a terminal state or needs an
|
|
222
|
+
action. A failed Payment can be a completed observation. The timeout accepts
|
|
223
|
+
1–3600 seconds and includes session restoration. A timeout or unavailable read
|
|
224
|
+
prints exact get/wait commands. Waiting never resubmits a Payment.
|
|
225
|
+
|
|
226
|
+
Scheduled sends are unavailable while scheduled payments are rebuilt.
|
|
227
|
+
`send` has no release-date flag. The backend refuses scheduled timing with
|
|
228
|
+
`INVALID_INPUT` on `timing`: `scheduled payments are being rebuilt`.
|
|
229
|
+
|
|
230
|
+
Existing holds keep their claim, cancel and redirect operations. `cancel` returns
|
|
231
|
+
a held payment to whoever funded it; `redirect` sends it to someone else. For an
|
|
232
|
+
Organization's held payment only an Owner may cancel or redirect it; anyone else,
|
|
233
|
+
a Budget member included, is refused before anything is prepared. Both hand over
|
|
234
|
+
to the approval page as `send` does, then read the Payment until the chain shows
|
|
235
|
+
the step (`payment wait <approval id>` reports them once sent). A cancelled
|
|
236
|
+
payment keeps the amount it was for. A cancel or redirect of a payment that is
|
|
237
|
+
no longer held is refused (`WRONG_STATE`, exit 2) with `Payment <id> is already
|
|
238
|
+
cancelled.` or the state it is in. A held payment that was never signed reads
|
|
239
|
+
`failed`, not `scheduled`.
|
|
240
|
+
|
|
241
|
+
Retry prepares the retry of the exact Payment and hands over to the approval
|
|
242
|
+
page, exactly as `payment send` does: the page is the one and only
|
|
243
|
+
confirmation, and `--json` returns `awaiting_approval`, the link and
|
|
244
|
+
`next.argv` for `payment wait <approval id>`. It addresses the existing Payment
|
|
245
|
+
command and never creates a replacement send.
|
|
246
|
+
|
|
247
|
+
## Activity
|
|
248
|
+
|
|
249
|
+
```sh
|
|
250
|
+
capxul activity list --limit 25 --json
|
|
251
|
+
capxul activity get --kind payment --id PAYMENT_ID --json
|
|
252
|
+
capxul activity get --kind movement --id MOVEMENT_ID --json
|
|
253
|
+
capxul activity summary --from 1790553600000 --to 1790639999999 --json
|
|
254
|
+
capxul activity annotate --input annotation.json --confirm --json
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
Add explicit `--org ORGANIZATION_ID` for Organization scope. The saved
|
|
258
|
+
Organization read default does not select this scope. List supports kind,
|
|
259
|
+
direction, status and inclusive epoch-millisecond bounds. Reuse a cursor with
|
|
260
|
+
the same filters and actor. An unavailable indexer produces a visible incomplete
|
|
261
|
+
activity warning. Movement rows remain Movements.
|
|
262
|
+
|
|
263
|
+
Summary keeps exact per-asset raw-unit totals. Get returns exact detail and
|
|
264
|
+
refuses a missing or unavailable reference. Annotation accepts only `reference`,
|
|
265
|
+
`accountingCategory` and `memo`; it cannot alter settlement or documents. Human
|
|
266
|
+
writes require preview and confirmation. Scripted writes require `--confirm`.
|
|
267
|
+
In a terminal, omit required fields for guided flags and annotation input.
|
|
268
|
+
|
|
269
|
+
## Issued requests and received Inbox
|
|
270
|
+
|
|
271
|
+
```sh
|
|
272
|
+
capxul request list
|
|
273
|
+
capxul request issue --input invoice.json --confirm
|
|
274
|
+
capxul request get REQUEST_ID
|
|
275
|
+
capxul request cancel REQUEST_ID --confirm
|
|
276
|
+
capxul inbox list
|
|
277
|
+
capxul inbox get REQUEST_ID
|
|
278
|
+
capxul inbox pay REQUEST_ID
|
|
279
|
+
capxul inbox decline REQUEST_ID --confirm
|
|
280
|
+
capxul request list --org ORGANIZATION_ID
|
|
281
|
+
capxul request issue --org ORGANIZATION_ID --input invoice.json --confirm
|
|
282
|
+
capxul request get --org ORGANIZATION_ID REQUEST_ID
|
|
283
|
+
capxul request cancel --org ORGANIZATION_ID REQUEST_ID --confirm
|
|
284
|
+
capxul inbox list --org ORGANIZATION_ID
|
|
285
|
+
capxul inbox get --org ORGANIZATION_ID REQUEST_ID
|
|
286
|
+
capxul inbox pay --org ORGANIZATION_ID REQUEST_ID --permission-id PERMISSION_ID
|
|
287
|
+
capxul inbox decline --org ORGANIZATION_ID REQUEST_ID --confirm
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
`request` reads the issued Invoice and payment requests of whoever you act as:
|
|
291
|
+
you, or the Organization `--org`, `CAPXUL_ORG` or `use org` names. `inbox` reads
|
|
292
|
+
payment requests addressed to that actor. Add `--email EMAIL` to select a saved
|
|
293
|
+
session. No signer is required for these reads.
|
|
294
|
+
|
|
295
|
+
For human reads, start with `capxul request --help` or `capxul inbox --help`.
|
|
296
|
+
Run `request list` for requests you issued. Run `inbox list` for requests you
|
|
297
|
+
received. Copy the full request ID from the list into the matching `get` command.
|
|
298
|
+
In a terminal, omit required fields to start guided input. Ctrl+C or Ctrl+D
|
|
299
|
+
cancels with exit 130. The wizard can ask about optional email selection before
|
|
300
|
+
required fields. Provide `--email EMAIL` when you need one saved session.
|
|
301
|
+
|
|
302
|
+
For agent reads, supply all required flags and add `--json`. Capture stdout,
|
|
303
|
+
stderr, and the process exit code separately. A refusal is still a version 1
|
|
304
|
+
result on stdout. Inspect `outcome` and `error.code`; do not infer success from
|
|
305
|
+
valid JSON. Missing required input exits 2. A missing authenticated session exits 3. Noninteractive human refusals use stderr. These runs do not prompt.
|
|
306
|
+
|
|
307
|
+
Agents pass `--org` on every Organization command, so a saved choice never
|
|
308
|
+
decides whose money a command touches. `--org` takes a handle or an
|
|
309
|
+
Organization ID.
|
|
310
|
+
|
|
311
|
+
Local help, refusal, and cancellation checks do not prove authenticated
|
|
312
|
+
request reads, document output, issuance, or payment; those are separate
|
|
313
|
+
journey checks.
|
|
314
|
+
|
|
315
|
+
Human output shows request ID, reference, amount, status, counterparty
|
|
316
|
+
reference, and document references. An unpaid Invoice can have a document
|
|
317
|
+
before any Payment exists. The document guidance preserves the selected
|
|
318
|
+
session. Run that explicit command to save a PDF. Request and Inbox reads do
|
|
319
|
+
not render or download PDFs. JSON output preserves scope, direction, and the
|
|
320
|
+
SDK item or list. Unavailable reads remain failures, not empty lists.
|
|
321
|
+
|
|
322
|
+
Cancel changes an issued request. Decline changes a received request. Both
|
|
323
|
+
commands read the exact request in the selected scope before the write.
|
|
324
|
+
Terminal writes show a preview and ask for confirmation. Scripted writes
|
|
325
|
+
require `--confirm` before session restoration. A lost write reply gives an
|
|
326
|
+
exact readback command in the same scope and session. It never repeats the
|
|
327
|
+
write. These commands start no signer and move no funds.
|
|
328
|
+
|
|
329
|
+
Issue accepts a basic payment request or an Invoice request JSON object from
|
|
330
|
+
`--input FILE` or `--input -`. Both require `payer` and an exact positive
|
|
331
|
+
`amount`. A basic request requires an explicit `reference` and accepts an
|
|
332
|
+
optional private `memo`. An Invoice request also supplies `invoice`.
|
|
333
|
+
Issue saves no file. Its human output names the `document render` command for
|
|
334
|
+
each document, and its JSON result is `{ scope, direction, item }`: the issued
|
|
335
|
+
request with its document references, with no document output.
|
|
336
|
+
Human and JSON output include `checkoutUrl` for an Invoice or Memo request
|
|
337
|
+
instruction with a link token. Invoice requests keep `/checkout/invoices/`.
|
|
338
|
+
Basic requests use `/checkout/requests/`. Movement documents do not create
|
|
339
|
+
request links.
|
|
340
|
+
The PDF includes the checkout link from the authorized backend render context.
|
|
341
|
+
For a custom deployment, set `CAPXUL_CHECKOUT_FRONTEND_ORIGIN` in both the CLI
|
|
342
|
+
and backend environments. Use the same frontend origin for both.
|
|
343
|
+
Offer create, get, list, revise, and deactivate output also include `checkoutUrl`.
|
|
344
|
+
The checkout page reads current terms and status when the link opens.
|
|
345
|
+
Save a PDF with the printed `document render` command. Do not issue the request
|
|
346
|
+
again to get a PDF.
|
|
347
|
+
|
|
348
|
+
```json
|
|
349
|
+
{
|
|
350
|
+
"payer": { "kind": "email", "email": "bob@example.com" },
|
|
351
|
+
"amount": { "asset": "<admitted asset ID>", "value": "9" },
|
|
352
|
+
"invoice": {
|
|
353
|
+
"kind": "invoice",
|
|
354
|
+
"invoiceNumber": "INV-002",
|
|
355
|
+
"payerRef": "Bob",
|
|
356
|
+
"payeeRef": "Alice",
|
|
357
|
+
"dueAt": 1900000000000,
|
|
358
|
+
"note": "Thank you",
|
|
359
|
+
"discountMinor": "1000000",
|
|
360
|
+
"lineItems": [{ "description": "Consulting", "quantity": 1, "unitMinor": "10000000" }]
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
For a basic request, omit `invoice`:
|
|
366
|
+
|
|
367
|
+
```json
|
|
368
|
+
{
|
|
369
|
+
"payer": { "kind": "email", "email": "bob@example.com" },
|
|
370
|
+
"amount": { "asset": "<admitted asset ID>", "value": "9" },
|
|
371
|
+
"reference": "SESSION-001",
|
|
372
|
+
"memo": "Counselling session"
|
|
373
|
+
}
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
Supply your Invoice number. The request reference defaults to that number;
|
|
377
|
+
optional `reference` changes the request reference only. `dueAt` uses epoch
|
|
378
|
+
milliseconds, as the shared Invoice document and frontend do. Set it to zero
|
|
379
|
+
for no due date. Optional `expiresAt` also uses epoch milliseconds. `discountMinor` and
|
|
380
|
+
`unitMinor` use the asset's exact minor units. The example is 10 USDC less
|
|
381
|
+
1 USDC for a six-decimal USDC asset. The backend checks the Invoice total,
|
|
382
|
+
registered payer, and issuer authority before creation. Optional `memo` is a
|
|
383
|
+
request memo; `invoice.note` is the document note. Unknown fields refuse.
|
|
384
|
+
|
|
385
|
+
Earlier CLI guidance incorrectly named Unix seconds for `dueAt`. Convert those
|
|
386
|
+
values to milliseconds for new drafts. Rendering does not change the dates in
|
|
387
|
+
an issued document. Inspect an incorrect Invoice before cancelling it and
|
|
388
|
+
issuing a corrected request.
|
|
389
|
+
|
|
390
|
+
A lost issuance reply provides issued-list readback in the same scope and
|
|
391
|
+
session. Issuance has no automatic resend.
|
|
392
|
+
|
|
393
|
+
Inbox pay reads and confirms exact backend-owned request terms. It uses the existing
|
|
394
|
+
CLI signer and the SDK fulfillment API. Organization payment requires the
|
|
395
|
+
selected Permission; the backend checks Budget and spending authority. The
|
|
396
|
+
command publishes prepared Payment IDs before signing. A submitted Payment
|
|
397
|
+
is not a settled Payment. Use the printed get/wait commands to inspect its state.
|
|
398
|
+
|
|
399
|
+
A lost reply or timeout gives exact readback in the same session and scope.
|
|
400
|
+
Pay refuses an already prepared Invoice unless you explicitly use `--resume`
|
|
401
|
+
after readback. Resumption must retain its linked Payment ID and original
|
|
402
|
+
Invoice terms. It does not create another request or Payment. Use
|
|
403
|
+
`--timeout-seconds N` to change the bounded signing wait (default 120).
|
|
404
|
+
An Invoice retains its issued instruction. A generic request uses a deterministic
|
|
405
|
+
Memo instruction. Reading terms creates no Payment or document. Fulfillment
|
|
406
|
+
checks those terms again and stores the Memo with the original request birth.
|
|
407
|
+
|
|
408
|
+
## Payment documents
|
|
409
|
+
|
|
410
|
+
```sh
|
|
411
|
+
capxul document get --document-hash H --content-hash C --json
|
|
412
|
+
capxul document verify --document-hash H --content-hash C --json
|
|
413
|
+
capxul document render --document-hash H --content-hash C
|
|
414
|
+
capxul document render --document-hash H --content-hash C --output-dir ./documents --json
|
|
415
|
+
capxul document export --document-hash H --content-hash C --out original.bin
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
Each command uses the current authenticated session. Add `--email EMAIL` to
|
|
419
|
+
select a saved session. In a terminal, omit required fields to enter them.
|
|
420
|
+
`get` returns document metadata and the `render` command for it; it writes no
|
|
421
|
+
file and does not print source bytes.
|
|
422
|
+
`verify` reports `ok: false` when verification fails. `render` saves a PDF and its
|
|
423
|
+
self-contained HTML source in the `documents` directory next to CLI settings.
|
|
424
|
+
Use `--output-dir` to change this directory. Human and JSON output contain
|
|
425
|
+
file metadata. Each render uses a new private directory and preserves earlier
|
|
426
|
+
files. `export` writes the original bytes to a new file.
|
|
427
|
+
It refuses an existing output file.
|
|
428
|
+
|
|
429
|
+
Only `document render` and `document export` write files. Reads name each
|
|
430
|
+
document with the `document render` command that saves it: Payment `get`, `wait`
|
|
431
|
+
and `list`, Activity detail, Payroll `get` and `wait`. Writes save nothing either.
|
|
432
|
+
Payment `send` and `retry`, Payroll `run` and Inbox `pay` end with
|
|
433
|
+
`Save the receipt: capxul document render …` once the receipt exists, and
|
|
434
|
+
`request issue` prints that command for each document it issued. No write
|
|
435
|
+
result carries document output. A document that is still pending is named by
|
|
436
|
+
`payment get`.
|
|
437
|
+
|
|
438
|
+
## Contact commands
|
|
439
|
+
|
|
440
|
+
```sh
|
|
441
|
+
capxul contact list [--include-hidden]
|
|
442
|
+
capxul contact get PARTY_ID
|
|
443
|
+
capxul contact add --input FILE|- [--confirm]
|
|
444
|
+
capxul contact label PARTY_ID --label TEXT [--confirm]
|
|
445
|
+
capxul contact hide PARTY_ID [--confirm]
|
|
446
|
+
capxul contact unhide PARTY_ID [--confirm]
|
|
447
|
+
capxul contact list --org acme
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
Contacts belong to whoever you act as: your Account's address book, or the
|
|
451
|
+
Organization `--org`, `CAPXUL_ORG` or `use org` names. `list` omits hidden entries unless
|
|
452
|
+
`--include-hidden` is present. `get`, `label`, `hide`, and `unhide` address one
|
|
453
|
+
stable Party by its ID.
|
|
454
|
+
|
|
455
|
+
`add --input` reads the existing `AddressBookAddInput` JSON shape. For example:
|
|
456
|
+
|
|
457
|
+
```json
|
|
458
|
+
{
|
|
459
|
+
"ref": { "kind": "email", "email": "supplier@example.test" },
|
|
460
|
+
"label": "New Supplier"
|
|
461
|
+
}
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
Use `--input -` to read the same object from stdin. An interactive `add` can
|
|
465
|
+
collect the reference kind, value, and optional label instead. Interactive
|
|
466
|
+
writes show the actor and exact contact change, then ask a default-no question.
|
|
467
|
+
JSON, CI, and other noninteractive writes require `--confirm` before the CLI
|
|
468
|
+
creates a client. Contact writes do not start a browser signer.
|
|
469
|
+
|
|
470
|
+
Success data is the SDK value without a CLI wrapper: `list` returns
|
|
471
|
+
`AddressBookEntry[]`, `get` returns `AddressBookEntry | null`, and each mutation
|
|
472
|
+
returns `AddressBookEntry`. Human `get` prints `No contact found` for null and
|
|
473
|
+
exits successfully. Entries retain their stable PartyId, exact reference,
|
|
474
|
+
relationships, hidden state, and last activity time.
|
|
475
|
+
|
|
476
|
+
## Personal Account reads
|
|
477
|
+
|
|
478
|
+
```bash
|
|
479
|
+
capxul account show --email person@example.com
|
|
480
|
+
capxul balance --json
|
|
481
|
+
capxul address --wizard
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
These commands reuse your verified current session unless you provide an email.
|
|
485
|
+
They do not start setup or open a signer. `account show` shows lifecycle and
|
|
486
|
+
transaction readiness; a failed lifecycle exposes its stage and error code.
|
|
487
|
+
`balance` and `address` act for whoever you act as: your Account, or the
|
|
488
|
+
Organization's treasury with `--org`. Balance shows exact asset quantities and
|
|
489
|
+
available fiat valuations. An unavailable valuation or failed read is not zero.
|
|
490
|
+
`address` uses the SDK's address and network.
|
|
491
|
+
|
|
492
|
+
Account setup finishes in the Capxul web app, not in the CLI: it creates your
|
|
493
|
+
wallet, which needs you in a browser, and the CLI never opens one. `account retry`
|
|
494
|
+
reads your Account; when it is not ready, it prints the web app link. Run it again
|
|
495
|
+
to check: it returns the same handover until the Account is ready.
|
|
496
|
+
|
|
497
|
+
## Organization commands
|
|
498
|
+
|
|
499
|
+
```sh
|
|
500
|
+
capxul org list --json
|
|
501
|
+
capxul org show --org acme --json
|
|
502
|
+
capxul org show --json
|
|
503
|
+
capxul org me --json
|
|
504
|
+
capxul org member list --json
|
|
505
|
+
capxul org member get ACCOUNT_ID --json
|
|
506
|
+
capxul org wait --timeout-seconds 120 --json
|
|
507
|
+
capxul org create --name NAME --handle HANDLE --country CC [--bio TEXT] [--size TEXT] [--confirm]
|
|
508
|
+
capxul org retry --org ORGANIZATION_ID [--confirm]
|
|
509
|
+
```
|
|
510
|
+
|
|
511
|
+
These commands accept `--email`. Without it, they restore the protected current
|
|
512
|
+
session. `org` commands act as the Organization `--org` names (a handle or an
|
|
513
|
+
ID), then `CAPXUL_ORG`, then the one `use org` saved. Two different `--org`
|
|
514
|
+
values are refused.
|
|
515
|
+
|
|
516
|
+
A read without --org uses the Organization `use org` saved, then this machine's
|
|
517
|
+
recovery ID, then the one unfinished setup returned by the backend. org list
|
|
518
|
+
includes unfinished founder setups. This works from a clean authenticated home.
|
|
519
|
+
Interactive status/wait offers a choice when several unfinished setups exist.
|
|
520
|
+
Scripted and JSON reads require an exact --org in that case. A ready
|
|
521
|
+
Organization must still appear in current access.
|
|
522
|
+
|
|
523
|
+
Human output shows Organization identity and setup, with a separate unfinished
|
|
524
|
+
setup section and explicit empty results. Members without an Account ID remain
|
|
525
|
+
visible. `org me` shows backend capabilities and exact per-payment Budget caps;
|
|
526
|
+
these caps are not available balances. `--json` keeps the structured SDK data.
|
|
527
|
+
|
|
528
|
+
Member lookup uses an exact AccountId. In a human terminal, omit the ID to
|
|
529
|
+
select an attached Account from the authorized member list. Members without an
|
|
530
|
+
Account ID cannot be selected. Scripted and JSON lookup requires the ID. Reads do not sign or change
|
|
531
|
+
setup state.
|
|
532
|
+
|
|
533
|
+
org wait opens one exact setup subscription. It continues when needsAttention
|
|
534
|
+
has a scheduled next check. It stops at ready, failed, awaitingAuthorization,
|
|
535
|
+
or attention without a next check. It does not request a check or poll. The
|
|
536
|
+
timeout accepts 1 to 3600 seconds and defaults to 120. A deadline returns
|
|
537
|
+
CLI_DEADLINE at exit 5; Ctrl-C returns CANCELLED at exit 130.
|
|
538
|
+
|
|
539
|
+
## Organization Payment reads
|
|
540
|
+
|
|
541
|
+
```sh
|
|
542
|
+
capxul payment list --org O [--json]
|
|
543
|
+
capxul payment get P --org O [--json]
|
|
544
|
+
capxul payment wait P --org O [--timeout-seconds N] [--json]
|
|
545
|
+
```
|
|
546
|
+
|
|
547
|
+
With `--org`, `CAPXUL_ORG` or `use org`, these commands read the Organization's
|
|
548
|
+
Payments; without one they read yours. The backend checks current Organization participation and returns
|
|
549
|
+
only that Organization's outgoing, incoming, and self Payments. Get refuses
|
|
550
|
+
a missing or mismatched Payment ID. Reads do not need a signer.
|
|
551
|
+
|
|
552
|
+
Wait observes the exact Organization and Payment through the SDK subscription.
|
|
553
|
+
It stops on a terminal state, required action, or required retry. The timeout
|
|
554
|
+
accepts 1 to 3600 seconds and defaults to 120. It covers session restoration
|
|
555
|
+
and observation. Deadline exit 5 and interruption exit 130 retain read/wait
|
|
556
|
+
instructions with both Organization and Payment IDs.
|
|
557
|
+
|
|
558
|
+
## Organization Payment retry
|
|
559
|
+
|
|
560
|
+
```sh
|
|
561
|
+
capxul payment retry P --org O --json
|
|
562
|
+
```
|
|
563
|
+
|
|
564
|
+
Retry addresses the original command and every Payment in that command. It
|
|
565
|
+
creates no replacement send or request key. The Organization's retry is
|
|
566
|
+
prepared for your own key and handed over to the approval page; the page
|
|
567
|
+
shows the whole cohort. `--json` returns the link and `next.argv` for
|
|
568
|
+
`payment wait <approval id> --org O`, which follows every Payment to its end.
|
|
569
|
+
|
|
570
|
+
## Permissions
|
|
571
|
+
|
|
572
|
+
```sh
|
|
573
|
+
capxul org permission list [--org O] [--json]
|
|
574
|
+
capxul org permission get B [--org O] [--json]
|
|
575
|
+
capxul org permission create --org O --input budget.json --request-key K [--wait] [--json]
|
|
576
|
+
capxul org permission change B --org O --input budget.json --request-key K [--wait] [--json]
|
|
577
|
+
```
|
|
578
|
+
|
|
579
|
+
These commands use `--org`, then `CAPXUL_ORG`, then the Organization `use org` saved.
|
|
580
|
+
A human terminal can select an accessible Organization when neither exists.
|
|
581
|
+
Each read checks current Organization access. `get` requires an exact Permission
|
|
582
|
+
ID and refuses a missing or mismatched result. Reads do not need a signer.
|
|
583
|
+
|
|
584
|
+
Human output shows Permission and assignment IDs, revisions, and states.
|
|
585
|
+
Budget output labels the exact per-payment cap or no cap. It does not show a
|
|
586
|
+
remaining balance. JSON preserves the public SDK result.
|
|
587
|
+
|
|
588
|
+
Every Budget write supplies the complete policy:
|
|
589
|
+
|
|
590
|
+
```json
|
|
591
|
+
{
|
|
592
|
+
"type": "budget",
|
|
593
|
+
"asset": "A",
|
|
594
|
+
"limit": { "asset": "A", "value": "500" },
|
|
595
|
+
"scope": {
|
|
596
|
+
"recipients": { "type": "allowlist", "accounts": ["account_alice"] },
|
|
597
|
+
"actions": ["pay"]
|
|
598
|
+
},
|
|
599
|
+
"refill": "monthly"
|
|
600
|
+
}
|
|
601
|
+
```
|
|
602
|
+
|
|
603
|
+
Use an exact admitted AssetId for `A`. The cap must be positive and finite.
|
|
604
|
+
`refill` is `monthly`, which refills the cap every 30 days (a fixed period from
|
|
605
|
+
the block that sets it, not a calendar month), or `none`. A create without
|
|
606
|
+
`refill` means `none`. A change without `refill` keeps the Budget's current
|
|
607
|
+
refill; write `"refill": "none"` to turn a refill off.
|
|
608
|
+
Recipients are `anyone` or 1 to 32 unique Account IDs. Actions are `pay`,
|
|
609
|
+
`commitments`, or both. `pay` covers single and batch Payments. Missing scope,
|
|
610
|
+
duplicate recipients/actions, unknown fields, and an asset mismatch refuse.
|
|
611
|
+
A Budget change keeps its asset. Management input is `{"type":"managePeople"}`.
|
|
612
|
+
Use `--input -` for stdin. Input is limited to 64 KiB.
|
|
613
|
+
|
|
614
|
+
A human terminal can guide policy input. Change prefills the exact active
|
|
615
|
+
revision's complete stored policy. Every Permission write (`create`, `change`,
|
|
616
|
+
`assign`, `revoke`, `replace`) goes through the approval page, as `payment
|
|
617
|
+
send` does: the preview shows all before/after rights and any allowance reset,
|
|
618
|
+
then the CLI prepares the command, records the verified prepared IDs, compares
|
|
619
|
+
the frozen policy with the preview, and opens the approval. If the policy
|
|
620
|
+
changed, nothing opens and the prepared command is closed. A person sees
|
|
621
|
+
`✓ Prepared`, `… Approve in your browser` and the link; the page is the one and
|
|
622
|
+
only confirmation, and the CLI follows it to `✓ Signed`. A rejection on the
|
|
623
|
+
page is `cancelled` (exit 130). With `--json` the command returns at once with
|
|
624
|
+
`status: "awaiting_approval"`, `approvalUrl` and `next.argv` for
|
|
625
|
+
`payment wait <approval id> --org O`. A missing human key is generated and
|
|
626
|
+
printed before the first write. Scripted runs require `--request-key`.
|
|
627
|
+
|
|
628
|
+
Success means sent and pending application. It does not prove active rights.
|
|
629
|
+
Add `--wait` to follow it through, as `org permission command wait` does: after
|
|
630
|
+
you approve it, the CLI follows the command until it is applied (`✓ Confirmed`),
|
|
631
|
+
failed or needs action. The result then also holds `command`, the command's view
|
|
632
|
+
(`status` is `applied`, `failed` or `actionable`), and exits 0 in each case;
|
|
633
|
+
read `status`. `--json --wait` writes the approval link to stderr as one
|
|
634
|
+
`approval.awaiting` event and returns once it is followed through.
|
|
635
|
+
`--timeout-seconds` bounds how long the CLI follows it (default: until the
|
|
636
|
+
approval lapses). A follow that runs out of time fails with exit 5 and names the
|
|
637
|
+
wait command. The same write run again with a request key whose command was
|
|
638
|
+
already sent opens no approval and shows no link: it reads the command and
|
|
639
|
+
prints `Already applied: …` (or where it stands), with the command's view in
|
|
640
|
+
`command`. After an interruption or uncertain result, retain the original
|
|
641
|
+
input, Organization ID, key, command ID, and execution ID. The key alone cannot
|
|
642
|
+
restore wizard/stdin input.
|
|
643
|
+
|
|
644
|
+
`org permission replace --org O --request-key K` replaces the current
|
|
645
|
+
Roles module and carries its active Permissions, assignments, and admitted
|
|
646
|
+
Invitation rights. Human mode guides missing scope and shows the full frozen
|
|
647
|
+
before/after snapshot, then hands over to the approval page. Machine mode
|
|
648
|
+
requires scope and key. A changed snapshot opens no approval. Unfinished Invitation configuration must complete or cancel first.
|
|
649
|
+
Submission remains pending application. After an uncertain result, follow the
|
|
650
|
+
exact command with `org permission command get` or `org permission command wait`
|
|
651
|
+
and the request key (not listed in the help); the command does not promise
|
|
652
|
+
unconditional replacement replay.
|
|
653
|
+
|
|
654
|
+
## Payroll runs, rosters, and reads
|
|
655
|
+
|
|
656
|
+
```sh
|
|
657
|
+
capxul org payroll groups list --org O [--json]
|
|
658
|
+
capxul org payroll groups save --org O --input group.json --confirm [--json]
|
|
659
|
+
capxul org payroll groups remove G --org O --confirm [--json]
|
|
660
|
+
capxul org payroll terms --org O [--json]
|
|
661
|
+
capxul org payroll list --org O [--json]
|
|
662
|
+
capxul org payroll run --org O --input run.json --request-key K [--json]
|
|
663
|
+
capxul org payroll run --org O --resume K [--json]
|
|
664
|
+
capxul org payroll get --org O R [--json]
|
|
665
|
+
capxul org payroll wait --org O R --timeout-seconds 120 [--json]
|
|
666
|
+
```
|
|
667
|
+
|
|
668
|
+
Group input contains `name`, `tone`, and `members`. Each member supplies a
|
|
669
|
+
canonical `partyId`, draft `amount` text, and `currency`. An optional `id`
|
|
670
|
+
updates that exact group. These commands do not sign or transfer money.
|
|
671
|
+
Group amounts stay unchanged, including unfinished draft text. They do not
|
|
672
|
+
supply payout quantities or currency conversion. A lost create response must
|
|
673
|
+
be reconciled with the same scoped group list before another create.
|
|
674
|
+
|
|
675
|
+
Terms retain raw rates, decimals, units, and effective dates. Run listing
|
|
676
|
+
retains the backend `settledThisMonth` aggregate. The CLI does not sum a partial
|
|
677
|
+
run page or compute earned pay.
|
|
678
|
+
|
|
679
|
+
Run input contains `permissionId`, `asset`, `period`, and ordered `items`.
|
|
680
|
+
Each item supplies a recipient Ref, asserted `partyId`, settlement `amount`,
|
|
681
|
+
raw-unit `gross` and `net`, and signed `adjustments`. Net must equal the exact
|
|
682
|
+
settlement quantity and gross plus adjustments. Keep Organization, actor, signer,
|
|
683
|
+
and request-key routing outside the JSON. `--input -` reads bounded stdin.
|
|
684
|
+
The current Payroll producer accepts email and Party Refs. Other Ref kinds
|
|
685
|
+
refuse before client work.
|
|
686
|
+
|
|
687
|
+
In a human terminal, `capxul org payroll run` guides the current Organization,
|
|
688
|
+
Budget, settlement asset, date, roster or known Parties, and actual payout
|
|
689
|
+
quantities. Roster amounts and terms are reference data. The complete preview
|
|
690
|
+
shows each recipient and Safe, quantity, raw units, and adjustment. The run
|
|
691
|
+
is then prepared and handed over to the approval page, the one and only
|
|
692
|
+
confirmation. Machine runs require exact scope, input and key; `--json`
|
|
693
|
+
returns the approval link and `next.argv` for `payment wait <approval id> --org O`.
|
|
694
|
+
|
|
695
|
+
The command saves the exact input in protected storage under the verified actor,
|
|
696
|
+
Organization, and key before execution. `--resume K` restores that snapshot.
|
|
697
|
+
It requires the same explicit Organization and cannot combine fresh input or
|
|
698
|
+
another key. Payroll accepts email and Party references. Raw external addresses
|
|
699
|
+
are outside the current run contract.
|
|
700
|
+
`--resume K` prepares the same run again, so it reopens a pending approval
|
|
701
|
+
rather than paying twice.
|
|
702
|
+
|
|
703
|
+
Get returns the full authorized run detail, command, ordered items, and recorded
|
|
704
|
+
times. Wait observes the exact run without polling or submitting. It keeps
|
|
705
|
+
waiting through partial settlement and ends when all Payments settle, a failure
|
|
706
|
+
is recorded, or action is required. Timeout exits 5. Cancellation exits 130.
|
|
707
|
+
Recovery retains exact Organization, run, and any observed request key.
|
|
708
|
+
|
|
709
|
+
## Invitation commands
|
|
710
|
+
|
|
711
|
+
```sh
|
|
712
|
+
capxul invite list [--limit N] [--after C] [--phase PHASE ...]
|
|
713
|
+
capxul invite accept [ID] --offer-digest D [--confirm] [--timeout-seconds N]
|
|
714
|
+
capxul invite decline [ID] [--confirm]
|
|
715
|
+
capxul org invite list [--limit N] [--after C] [--phase PHASE ...]
|
|
716
|
+
capxul org invite cancel [ID] [--confirm]
|
|
717
|
+
capxul org invite resend [ID] [--confirm]
|
|
718
|
+
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]
|
|
719
|
+
```
|
|
720
|
+
|
|
721
|
+
`invite` holds the invitations you received; `org invite` holds the invitations
|
|
722
|
+
the Organization you act as sent. `invite list` returns your own offers.
|
|
723
|
+
`org invite list` returns that Organization's invitations for a current Admin.
|
|
724
|
+
Both accept `--limit` (1--100), `--after`, and repeated `--phase` values, and
|
|
725
|
+
their result carries `invitations`, `nextCursor`, and `observedAt`: pass
|
|
726
|
+
`nextCursor` back as `--after`, and change no other filter between the two calls.
|
|
727
|
+
|
|
728
|
+
A received invitation names its own Organization: `invite accept` and
|
|
729
|
+
`invite decline` walk your own-offer pages, 100 rows per request, to find it.
|
|
730
|
+
`org invite cancel` and `org invite resend` act in the Organization `--org`,
|
|
731
|
+
`CAPXUL_ORG` or `use org` names.
|
|
732
|
+
|
|
733
|
+
Recovery guidance can also name `invite get`, `invite review`, `invite wait`,
|
|
734
|
+
`org invite get`, `org invite wait` and `org invite retry`. They work as before
|
|
735
|
+
but are not listed in the help: `get` and `review` read one offer, `wait`
|
|
736
|
+
follows it until it settles with one SDK subscription, and `retry` resumes the
|
|
737
|
+
backend's own recovery action. None of them writes a new offer.
|
|
738
|
+
|
|
739
|
+
Invitation lists label own-offer or Organization Admin scope and the verified
|
|
740
|
+
actor. They show an explicit empty page, next cursor, or end of results.
|
|
741
|
+
|
|
742
|
+
Invitation human output shows the authoritative phase, delivery, expiry, and
|
|
743
|
+
offered policies. An offer does not prove active membership. Manual resend/retry commands come only
|
|
744
|
+
from the backend action projection, with exact scope/session and earliest time.
|
|
745
|
+
Member-invite previews show exact per-payment caps and allowed recipients/actions;
|
|
746
|
+
expiry is unavailable before authoring. Every authoring write prints its request
|
|
747
|
+
key before submission. JSON result data stays unchanged.
|
|
748
|
+
|
|
749
|
+
Uncertain decline/cancel/resend/retry failures and transition deadlines print an
|
|
750
|
+
exact `get` command for the offer with the resolved session. Read the current
|
|
751
|
+
offer before another transition; a lost response does not authorize replay.
|
|
752
|
+
|
|
753
|
+
The transitions never author a new offer. A noninteractive or JSON run requires
|
|
754
|
+
`--confirm`. An interactive run shows the resolved current offer and asks a
|
|
755
|
+
default-no question.
|
|
756
|
+
|
|
757
|
+
`org member invite` authorizes one exact offer. `--preview` writes nothing and
|
|
758
|
+
needs no request key. A noninteractive write requires `--request-key`. Every
|
|
759
|
+
run prints the request key it used before it prepares, so a lost response is
|
|
760
|
+
recoverable with the same identity. The write authors the invitation, prepares
|
|
761
|
+
the configuration that sets up its offered rights, and hands over to the
|
|
762
|
+
approval page, as `payment send` does: a person sees the preview, `✓ Prepared`,
|
|
763
|
+
`… Approve in your browser` and the link, the CLI follows it to `✓ Signed`, and
|
|
764
|
+
it prints the invitation as it stands. With `--json` it returns at once with
|
|
765
|
+
`status: "awaiting_approval"`, `approvalUrl` and `next.argv` for
|
|
766
|
+
`payment wait <approval id> --org O`. A request key whose invitation is already
|
|
767
|
+
set up returns that invitation. At most one `--new-budget-name` is accepted per
|
|
768
|
+
command.
|
|
769
|
+
|
|
770
|
+
`invite accept` is the exact grantee's consent commit. It takes the exact
|
|
771
|
+
digest the offer shows as `--offer-digest`: a noninteractive or JSON run must
|
|
772
|
+
supply it, and without it the command refuses with exit 2 before it creates a
|
|
773
|
+
client. An interactive run may omit it, and then reads the offer and fills the
|
|
774
|
+
digest from the value it displayed. A digest you state is never replaced by the
|
|
775
|
+
displayed one. `--expected-offer` remains a compatibility spelling, and both
|
|
776
|
+
spellings must match when supplied together. The command returns the
|
|
777
|
+
`InvitationView` directly in `data`. The grant is executed by the deployment's
|
|
778
|
+
technical executor, so the command needs no browser bridge and works in a
|
|
779
|
+
headless or CI session. A repeat with the stored digest returns the same
|
|
780
|
+
accepted result; a different digest refuses and cannot overwrite consent.
|
|
781
|
+
|
|
782
|
+
## Organization writes
|
|
783
|
+
|
|
784
|
+
org create and org retry use the protected current session unless --email names
|
|
785
|
+
one. A JSON or noninteractive write requires --confirm. A terminal write shows
|
|
786
|
+
the current Organization and recovery information, then asks a default-no
|
|
787
|
+
question. The signer starts after confirmation.
|
|
788
|
+
|
|
789
|
+
`org create --wizard` guides name, handle, country, optional bio and size, then
|
|
790
|
+
session email. Supplied flags remain in the generated command. The final write
|
|
791
|
+
preview names the verified actor and starts with No selected.
|
|
792
|
+
`org retry --wizard` collects the exact Organization ID before session email.
|
|
793
|
+
Its final preview shows the verified actor and current lifecycle. Saved read
|
|
794
|
+
defaults and creation recovery records cannot change that retry ID.
|
|
795
|
+
|
|
796
|
+
org create validates name, handle, and country before client work. It calls
|
|
797
|
+
onboarding.beginOrganization, saves and prints the exact Organization ID,
|
|
798
|
+
authorizes only an awaitingAuthorization setup, then subscribes to setup
|
|
799
|
+
changes. It reports success only after ready and current access. JSON progress
|
|
800
|
+
uses one line per state:
|
|
801
|
+
|
|
802
|
+
{ "type": "organization.lifecycle", "organizationId": "O", "status": "processing" }
|
|
803
|
+
|
|
804
|
+
org retry requires one exact --org. It authorizes only awaitingAuthorization.
|
|
805
|
+
For an accepted setup it asks the backend to check the same operation hash
|
|
806
|
+
through setup.resume, then subscribes. Neither command replaces a submitted
|
|
807
|
+
operation. The local recovery record keeps a safe handle and Organization ID
|
|
808
|
+
for convenience; the backend unfinished list supports recovery without it.
|
|
809
|
+
|
|
810
|
+
--timeout-seconds sets one 1-to-3600-second deadline for the command. A
|
|
811
|
+
deadline stops local work and returns exit 5. If the last observed setup has
|
|
812
|
+
another automatic check scheduled, the message is "Stopped waiting.
|
|
813
|
+
Organization setup continues in the background." Before acceptance or without
|
|
814
|
+
a scheduled check, the message is "Stopped waiting. Read the Organization
|
|
815
|
+
setup status." The error details include the safe Organization ID when known,
|
|
816
|
+
last observed setup state, setup reason, and bounded provider diagnostics.
|
|
817
|
+
Ctrl-C stops local work at exit 130. Neither stop writes a backend failure.
|
|
818
|
+
|
|
24
819
|
## Configuration
|
|
25
820
|
|
|
26
|
-
| Variable
|
|
27
|
-
|
|
|
28
|
-
| `CAPXUL_CLI_HOME`
|
|
29
|
-
| `CAPXUL_PUBLISHABLE_KEY`
|
|
30
|
-
| `
|
|
31
|
-
| `
|
|
32
|
-
| `
|
|
33
|
-
| `
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
821
|
+
| Variable | Use |
|
|
822
|
+
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
823
|
+
| `CAPXUL_CLI_HOME` | Directory for global CLI settings. Defaults to `$XDG_CONFIG_HOME/capxul/cli`, or `$HOME/.config/capxul/cli`. |
|
|
824
|
+
| `CAPXUL_PUBLISHABLE_KEY` | Optional developer override for the bundled first-party staging key. |
|
|
825
|
+
| `CAPXUL_ENV` | Environment for this process: `staging` or `devnet`. Beats `CAPXUL_BOOTSTRAP_URL` and the saved `use env`; `--env` beats it. |
|
|
826
|
+
| `CAPXUL_BOOTSTRAP_URL` | Bootstrap origin. Defaults to `https://api.staging.capxul.com`. Convex Cloud origins are rejected. |
|
|
827
|
+
| `CAPXUL_CHECKOUT_FRONTEND_ORIGIN` | Checkout frontend origin. Staging uses `https://app.staging.capxul.com`. Devnet at `http://127.0.0.1:3211` uses `http://127.0.0.1:3002`. Custom bootstrap origins require this value. |
|
|
828
|
+
| `CAPXUL_POSTHOG_HOST` | Optional development override for the built-in public PostHog ingestion origin. |
|
|
829
|
+
| `CAPXUL_POSTHOG_PROJECT_TOKEN` | Optional development override for the built-in public project ingestion token. |
|
|
830
|
+
| `CAPXUL_TELEMETRY_DISABLED` | Set to `true` to disable remote observation regardless of the saved preference. |
|
|
831
|
+
|
|
832
|
+
The published CLI includes the verified first-party staging application key and
|
|
833
|
+
Capxul-owned public ingestion configuration. You do not need key or PostHog
|
|
834
|
+
environment variables. A different bootstrap origin requires an explicit key. Collection defaults to enabled for
|
|
37
835
|
ordinary local and online commands, help, version, and safely attributed argument
|
|
38
836
|
refusals. Parser refusals produce a completion without a start. Early native
|
|
39
837
|
global errors with no resolved command route send nothing, because the CLI
|
|
40
838
|
cannot determine whether they belong to a silent collection control.
|
|
41
|
-
`telemetry
|
|
839
|
+
`config telemetry off` saves one preference for the OS user and sends no final
|
|
42
840
|
remote event. Already running CLI processes check the current preference before
|
|
43
|
-
each export. Requests already sent cannot be recalled. `telemetry status`
|
|
841
|
+
each export. Requests already sent cannot be recalled. `config telemetry status`
|
|
44
842
|
reports the stored preference, effective policy, configuration, and reason.
|
|
45
843
|
`--log-level` controls normal diagnostic output, not collection. An eligible
|
|
46
844
|
invocation still produces its remote completion unless collection is disabled.
|
|
@@ -59,8 +857,68 @@ unsafe permissions, symlinks, and corrupt state produce a storage failure.
|
|
|
59
857
|
|
|
60
858
|
## Output
|
|
61
859
|
|
|
62
|
-
|
|
63
|
-
|
|
860
|
+
Organization setup failures include a copyable command with the exact ID and
|
|
861
|
+
selected email. When state is uncertain, read status first. A supported retry
|
|
862
|
+
includes `--confirm`; terminal runs still ask for confirmation. If no ID is
|
|
863
|
+
known, the command lists your Organizations instead of guessing one.
|
|
864
|
+
`--json` writes one version 1 envelope to stdout. Success contains `data`: the
|
|
865
|
+
SDK's own value for the command, with no CLI wrapper. A list is the SDK page,
|
|
866
|
+
`{ items, nextCursor }`; pass `nextCursor` back as `--after` where the command
|
|
867
|
+
takes one. A list whose next cursor would show the same page again fails with
|
|
868
|
+
exit 1 and `The list did not advance past the cursor <cursor>`, so a paging loop
|
|
869
|
+
ends. `--fields a,b` keeps only those fields of `data` (`amount.value`
|
|
870
|
+
reaches inside an object; a list keeps `nextCursor` and picks from each item).
|
|
871
|
+
`--fields` without `--json` refuses, and so does a typo: a name the result lacks that is a
|
|
872
|
+
letter or two off a name it has (exit 2, `field: "fields"`); the message names it, the
|
|
873
|
+
closest real field and the fields in this result. Any other name the result lacks, such as
|
|
874
|
+
an optional `execution` on a Payment that has none, is left out, as `jq` would.
|
|
875
|
+
The commands that move money (`payment send`, `payment retry`, `payment cancel`,
|
|
876
|
+
`payment redirect`, `inbox pay`,
|
|
877
|
+
`org payroll run`) check the names against the result they declare before they
|
|
878
|
+
run, so a typo never costs an approval: `status`, `approvalId`, `approvalUrl`,
|
|
879
|
+
`paymentIds`, `expiresAt` and `next`.
|
|
880
|
+
|
|
881
|
+
A failure contains `error`:
|
|
882
|
+
|
|
883
|
+
```json
|
|
884
|
+
{
|
|
885
|
+
"code": "CLI_USAGE",
|
|
886
|
+
"message": "Unknown command \"paymnt\".",
|
|
887
|
+
"hint": "Did you mean: capxul payment list",
|
|
888
|
+
"next": { "argv": ["capxul", "payment", "list"] }
|
|
889
|
+
}
|
|
890
|
+
```
|
|
891
|
+
|
|
892
|
+
`code` and `message` are always present. `hint` says what to do when a sentence
|
|
893
|
+
helps, `field` names the refused input, and `next.argv` is the command that
|
|
894
|
+
fixes it or reads where an interrupted command stands: `capxul auth login` when
|
|
895
|
+
no one is signed in, the corrected command for a typo, or the exact `get` for an
|
|
896
|
+
uncertain write. `next` preserves the same scope as the human command; it does
|
|
897
|
+
not grant authority or bypass current checks. `error.details.recovery` keeps
|
|
898
|
+
its `kind` (`read` or `retry`) next to the same `argv`.
|
|
899
|
+
|
|
900
|
+
A person sees one red line for what happened and one for what fixes it (on the
|
|
901
|
+
same line when both fit in 80 columns), then a dim last line, `ref <id>`, for
|
|
902
|
+
support:
|
|
903
|
+
|
|
904
|
+
```text
|
|
905
|
+
✗ Unknown command "paymnt". Did you mean: capxul payment list
|
|
906
|
+
✗ Not signed in. Try: capxul auth login
|
|
907
|
+
ref 6a0e10d1-06fb-4eed-9c2a-1f6f0c2b7d11
|
|
908
|
+
```
|
|
909
|
+
|
|
910
|
+
The `ref` is the backend's request ID when the error carries one, else its
|
|
911
|
+
correlation ID, else this run's `invocationId`. A mistyped command has none,
|
|
912
|
+
because no command started. An error that already quotes its request ID in its
|
|
913
|
+
sentence (a redacted backend error) has no `ref` line. JSON output has no `ref`
|
|
914
|
+
line and is unchanged: read `error.details.requestId` or `invocationId`.
|
|
915
|
+
|
|
916
|
+
A wallet failure
|
|
917
|
+
also includes its known `error.mode` and allowed `error.details`: wallet stage,
|
|
918
|
+
operation, provider, provider code, and HTTP status. An unknown browser failure
|
|
919
|
+
uses mode `unknown`. No provider message, token, signature, or native cause enters
|
|
920
|
+
the result. These fields remain available when collection is off or
|
|
921
|
+
`--log-level none` is set. Each envelope has
|
|
64
922
|
`command`, `invocationId`, and `outcome`. An invocation ID is null before a
|
|
65
923
|
command starts. Human errors go to stderr.
|
|
66
924
|
|
|
@@ -109,15 +967,295 @@ compinit
|
|
|
109
967
|
Use `npm update -g @capxul/cli` or `brew upgrade xelmar-tech/tap/capxul` to update.
|
|
110
968
|
Use one installer for the `capxul` executable to avoid conflicting PATH entries.
|
|
111
969
|
|
|
970
|
+
After a successful human command, help, or version request, the CLI can show an
|
|
971
|
+
update notice on terminal stderr. It checks the public npm `latest` tag at most
|
|
972
|
+
once per 24 hours. It shows only the command for the verified running npm-global
|
|
973
|
+
or Homebrew installation. It does not execute that command. Unknown installations,
|
|
974
|
+
development versions, JSON output, redirected stderr, CI, shell completion, and
|
|
975
|
+
all `telemetry` commands receive no notice. The optional check has one 500 ms
|
|
976
|
+
budget. Safe failed attempts are cached. Storage or network failures remain
|
|
977
|
+
silent and do not change the command result. This check sends no telemetry.
|
|
978
|
+
|
|
979
|
+
## Sandbox: `capxul dev`
|
|
980
|
+
|
|
981
|
+
`capxul dev` is for building and testing on Capxul, agents included, without real
|
|
982
|
+
money. It works on a test deployment: staging, or a local DevNet
|
|
983
|
+
(`capxul-devnet up --browser-origin http://localhost:3000` in this repository, then
|
|
984
|
+
`capxul use env devnet`). Production refuses both commands.
|
|
985
|
+
|
|
986
|
+
```sh
|
|
987
|
+
capxul dev fund 100 # test money into your own Safe (default 100 USDC)
|
|
988
|
+
capxul dev fund 50 --asset USDT
|
|
989
|
+
capxul dev key # a test publishable key for http://localhost:3000, into .env.local
|
|
990
|
+
capxul dev key --origin http://localhost:3100 --print
|
|
991
|
+
```
|
|
992
|
+
|
|
993
|
+
`dev fund` needs you signed in and funds only your own Safe. `dev key` needs no
|
|
994
|
+
sign-in; it sets `NEXT_PUBLIC_CAPXUL_PUBLISHABLE_KEY` and `CAPXUL_SITE_URL` in
|
|
995
|
+
`.env.local` and keeps every other line. On staging, sign-in works only from
|
|
996
|
+
`http://localhost:3000` or `http://localhost:3100`.
|
|
997
|
+
|
|
998
|
+
[`tests/dev-journeys.mjs`](tests/dev-journeys.mjs) runs the agent plugin's
|
|
999
|
+
journeys with the built CLI against the local DevNet: sign in, `dev fund`, the home
|
|
1000
|
+
screen, a payment (refused with its fix while the wallet setup is unfinished, as
|
|
1001
|
+
it is on a DevNet with no wallet provider), requests, offers, Inbox, Organizations,
|
|
1002
|
+
the account, `schema`, a typo's fix and `dev key`. The `cli-journeys` job in
|
|
1003
|
+
`.github/workflows/devnet-integration.yml` starts the DevNet and runs it.
|
|
1004
|
+
|
|
112
1005
|
## Development commands
|
|
113
1006
|
|
|
114
1007
|
```sh
|
|
115
1008
|
vp test run apps/cli
|
|
116
1009
|
vp run --filter @capxul/cli check-types
|
|
1010
|
+
vp run --filter @capxul/cli lint
|
|
117
1011
|
vp run --filter @capxul/cli build
|
|
118
|
-
vp exec node --test --test-name-pattern='@capxul/cli'
|
|
1012
|
+
vp exec node --test --test-name-pattern='@capxul/cli' packages/tools/src/modules/release/release.pack-install.test.mjs
|
|
119
1013
|
```
|
|
120
1014
|
|
|
121
1015
|
The last command installs the tarball outside the workspace and exercises the
|
|
122
1016
|
installed executable with isolated settings and a local HTTP server. The CI
|
|
123
1017
|
`CLI / Linux / Node 24.0.0` job runs this proof at the declared minimum version.
|
|
1018
|
+
|
|
1019
|
+
## Email login and session restoration
|
|
1020
|
+
|
|
1021
|
+
This CLI establishes a first-party BetterAuth session. An older native
|
|
1022
|
+
`account:read` grant does not count as sign-in and cannot read the profile.
|
|
1023
|
+
Logout clears the selected email's session and attempts to revoke any native
|
|
1024
|
+
grant that was stored before the first-party flow replaced it.
|
|
1025
|
+
|
|
1026
|
+
On a terminal, `auth login` is a wizard. It asks for the email and a masked OTP.
|
|
1027
|
+
It accepts the code as a paste. It retries an invalid code at most three times
|
|
1028
|
+
for one request.
|
|
1029
|
+
|
|
1030
|
+
`auth login` and `account retry` never open a browser, in any output mode. When
|
|
1031
|
+
your Account is not set up, they print where to finish it:
|
|
1032
|
+
|
|
1033
|
+
```text
|
|
1034
|
+
Signed in as person@example.com.
|
|
1035
|
+
Account setup required.
|
|
1036
|
+
Finish setting up your Account in your browser, signed in as person@example.com:
|
|
1037
|
+
https://app.staging.capxul.com/
|
|
1038
|
+
Then check it with: capxul account retry --email 'person@example.com'
|
|
1039
|
+
```
|
|
1040
|
+
|
|
1041
|
+
With `--json`, `data` carries the same handover:
|
|
1042
|
+
`setupState: "setup-required"`, `status: "awaiting_setup"`, `setupUrl` and
|
|
1043
|
+
`next.argv` (`["capxul", "account", "retry", "--email", EMAIL, "--json"]`, with the
|
|
1044
|
+
`--org` and `--env` you typed). That read exits 0 and returns the handover again,
|
|
1045
|
+
or the ready report. `capxul schema auth login` declares the shape.
|
|
1046
|
+
|
|
1047
|
+
Ctrl+C or Ctrl+D at a wizard prompt cancels the command. The command prints no
|
|
1048
|
+
success result and exits 130. A step that already finished keeps its result: a
|
|
1049
|
+
completed sign-in keeps its session.
|
|
1050
|
+
|
|
1051
|
+
For an agent, send and verify in separate processes:
|
|
1052
|
+
|
|
1053
|
+
```sh
|
|
1054
|
+
capxul auth login --email "$TEST_EMAIL" --json
|
|
1055
|
+
# The code from the email, as an argument or on stdin with --otp-stdin.
|
|
1056
|
+
capxul auth verify "$CODE" --json
|
|
1057
|
+
# A later process uses the same protected CLI home; no new code is required.
|
|
1058
|
+
capxul whoami --json
|
|
1059
|
+
capxul auth logout --json
|
|
1060
|
+
```
|
|
1061
|
+
|
|
1062
|
+
After sending a code, the output names `capxul auth verify <code>`. If
|
|
1063
|
+
verification has no waiting sign-in, the error names `capxul auth login`.
|
|
1064
|
+
Neither command prints the code itself.
|
|
1065
|
+
|
|
1066
|
+
Human profile/status output labels your Profile fields and available Account,
|
|
1067
|
+
wallet and Smart Account identifiers. Failed setup includes its stage and error
|
|
1068
|
+
code. These reads do not open the wallet browser. `--json` retains the structured
|
|
1069
|
+
result, including the same Profile and lifecycle values.
|
|
1070
|
+
|
|
1071
|
+
A machine run never prompts. `auth login` with `--otp-stdin` sends the OTP and
|
|
1072
|
+
verifies one code from stdin. It returns the profile report, with the setup
|
|
1073
|
+
handover when the Account is not ready. It starts no setup work.
|
|
1074
|
+
|
|
1075
|
+
`--otp-stdin` reads up to 64 bytes, ending at EOF. Pipe from a secret provider or
|
|
1076
|
+
use input redirection from a protected file. An invalid value refuses with exit 2.
|
|
1077
|
+
Only `auth verify <code>` accepts a code as an argument: the code is single-use
|
|
1078
|
+
and expires in minutes. Codes are never persisted or included in output.
|
|
1079
|
+
|
|
1080
|
+
`setupState: "ready"` is a personal Account that the Account readiness owner
|
|
1081
|
+
reads as ready and deployed. Its data carries the public identifiers: the
|
|
1082
|
+
Profile, the public wallet address (`smartAccount.signerAddress`), the personal
|
|
1083
|
+
Smart Account address (`smartAccount.smartAccountAddress`), the Account ID
|
|
1084
|
+
(`lifecycle.accountId`), and the ready status. Any other state is
|
|
1085
|
+
`setupState: "setup-required"` with the lifecycle, its failure code, and the
|
|
1086
|
+
handover above.
|
|
1087
|
+
|
|
1088
|
+
A ready personal Account continues the same journey into Organization creation
|
|
1089
|
+
with `capxul org create --name NAME --handle HANDLE --country CC`. The create
|
|
1090
|
+
command records the safe recovery handle for that Organization, so an
|
|
1091
|
+
interruption or a restart resumes the exact same Organization.
|
|
1092
|
+
|
|
1093
|
+
The version 2 `first-party-session` record stores the opaque provider credential
|
|
1094
|
+
in the existing protected plaintext store. Its scope includes the application
|
|
1095
|
+
key, issuer, environment, and email. Each process validates restoration with the
|
|
1096
|
+
backend; cached session data is not authority. Conditional replacement prevents
|
|
1097
|
+
a concurrent logout from being undone by a delayed credential save. The backend
|
|
1098
|
+
owns expiry and revocation. A failed remote logout is reported as `unconfirmed`;
|
|
1099
|
+
local sign-out remains in effect.
|
|
1100
|
+
|
|
1101
|
+
`account show` returns a backend-read Profile and account lifecycle without opening
|
|
1102
|
+
the browser. Successful email authentication can return `setupState: "setup-required"`.
|
|
1103
|
+
`account retry` returns `setupState: "ready"` only after Core reads a ready Account;
|
|
1104
|
+
otherwise it returns the web app handover.
|
|
1105
|
+
After logout, profile reads refuse with `NOT_AUTHENTICATED` and exit 3. An invalid
|
|
1106
|
+
or expired OTP refuses with exit 2.
|
|
1107
|
+
|
|
1108
|
+
Find where to finish an incomplete personal Account:
|
|
1109
|
+
|
|
1110
|
+
```sh
|
|
1111
|
+
capxul account retry --email you@example.com
|
|
1112
|
+
```
|
|
1113
|
+
|
|
1114
|
+
It writes nothing and opens no browser. Missing Account or Profile state in other
|
|
1115
|
+
commands directs to `account retry`.
|
|
1116
|
+
|
|
1117
|
+
Read an Organization treasury or deposit target:
|
|
1118
|
+
|
|
1119
|
+
```sh
|
|
1120
|
+
capxul balance --org org_example --email you@example.com
|
|
1121
|
+
capxul address --org org_example --email you@example.com
|
|
1122
|
+
capxul balance --wizard
|
|
1123
|
+
```
|
|
1124
|
+
|
|
1125
|
+
These commands use the existing Organization read selection. Balances require
|
|
1126
|
+
backend treasury access. Deposit instructions use the public SDK's own-access
|
|
1127
|
+
projection. Neither command starts a signer or changes Organization setup.
|
|
1128
|
+
|
|
1129
|
+
Contact reads show the selected scope, label, full Party ID, reference,
|
|
1130
|
+
relationships and hidden state. JSON keeps the existing array, entry or null.
|
|
1131
|
+
|
|
1132
|
+
```sh
|
|
1133
|
+
capxul contact list --include-hidden
|
|
1134
|
+
capxul contact get party_example
|
|
1135
|
+
capxul contact get --org org_example --wizard
|
|
1136
|
+
```
|
|
1137
|
+
|
|
1138
|
+
In a terminal, omit the ID to select a contact, including hidden contacts.
|
|
1139
|
+
In a script, provide the exact Party ID. Organization contacts always require
|
|
1140
|
+
an explicit `--org`; they never use the personal book as a fallback.
|
|
1141
|
+
|
|
1142
|
+
Contact add shows the reference and optional label before terminal confirmation.
|
|
1143
|
+
Without an input file, the wizard asks for these values. On an uncertain response,
|
|
1144
|
+
use the printed list command to check the same address book before adding again.
|
|
1145
|
+
Adding an existing contact can unhide it or change its label.
|
|
1146
|
+
|
|
1147
|
+
Change a contact label with `contact label party_example --label
|
|
1148
|
+
"New label" --confirm`. In a terminal, omit the Party ID to select from the
|
|
1149
|
+
same book, including hidden contacts. Organization labels require `--org`.
|
|
1150
|
+
After an uncertain response, use the exact get command printed by the CLI.
|
|
1151
|
+
|
|
1152
|
+
`contact hide` can select a contact in a terminal when the ID is omitted.
|
|
1153
|
+
It confirms the hidden state, then prints the exact `contact unhide` command for
|
|
1154
|
+
the same Party, session and scope. The contact's history remains available.
|
|
1155
|
+
|
|
1156
|
+
`contact unhide` uses the same scoped selector, including hidden contacts, when
|
|
1157
|
+
a terminal omits the ID. It confirms the change and shows the visible
|
|
1158
|
+
contact. Scripts provide the exact Party ID and `--confirm`.
|
|
1159
|
+
|
|
1160
|
+
## Fixed offers
|
|
1161
|
+
|
|
1162
|
+
Manage fixed service offers in your personal Account or an explicit Organization.
|
|
1163
|
+
These commands do not sign payments or create checkout purchases.
|
|
1164
|
+
|
|
1165
|
+
```sh
|
|
1166
|
+
capxul offer create --input offer.json --request-key consulting-001 --confirm
|
|
1167
|
+
capxul offer list
|
|
1168
|
+
capxul offer get OFFER_ID
|
|
1169
|
+
capxul offer revise OFFER_ID --expected-revision 1 --input offer.json --confirm
|
|
1170
|
+
capxul offer deactivate OFFER_ID --expected-revision 2 --confirm
|
|
1171
|
+
capxul offer list --org ORG_ID
|
|
1172
|
+
```
|
|
1173
|
+
|
|
1174
|
+
Add `--org ORG_ID` to run any of these as an Organization. Use `--email`
|
|
1175
|
+
to select a saved session. Scripts must supply `--confirm` for each write.
|
|
1176
|
+
A terminal shows the proposed change and asks for confirmation. Use `--json`
|
|
1177
|
+
for structured output. Lists and reads create no PDF.
|
|
1178
|
+
|
|
1179
|
+
The input file contains the complete offer terms. Use `--input -` to read stdin.
|
|
1180
|
+
The input limit is 64 KiB. Supply an admitted Base Sepolia asset ID from the
|
|
1181
|
+
existing asset catalog. Amounts use exact decimal strings. Quantity limits use
|
|
1182
|
+
positive whole numbers.
|
|
1183
|
+
|
|
1184
|
+
```json
|
|
1185
|
+
{
|
|
1186
|
+
"title": "Consulting",
|
|
1187
|
+
"description": "One hour of consulting",
|
|
1188
|
+
"unitLabel": "hour",
|
|
1189
|
+
"unitAmount": { "asset": "ASSET_ID", "value": "12" },
|
|
1190
|
+
"quantity": { "min": 1, "max": 8 }
|
|
1191
|
+
}
|
|
1192
|
+
```
|
|
1193
|
+
|
|
1194
|
+
Creation requires an explicit replay key. Keep the key and identical terms when
|
|
1195
|
+
recovering an uncertain result. Read the offer list before another write. Revision
|
|
1196
|
+
and deactivation require the revision you observed. A conflict requires a fresh
|
|
1197
|
+
read. The CLI does not retry a write automatically. Successful offer results
|
|
1198
|
+
include `checkoutUrl`. Share that URL for another purchase of the same offer.
|
|
1199
|
+
An offer link is not a saved purchase or proof of payment.
|
|
1200
|
+
|
|
1201
|
+
The checkout page reads the current offer before the payer continues. A quantity
|
|
1202
|
+
in the URL is a hint. The backend checks its bounds and freezes the selected
|
|
1203
|
+
revision, quantity, price, asset, network, and recipient for that purchase.
|
|
1204
|
+
Changing the URL cannot change a saved purchase. Refresh retains its checkout
|
|
1205
|
+
reference. Separate purchasers receive separate checkout and settlement IDs.
|
|
1206
|
+
|
|
1207
|
+
## Request and document flow
|
|
1208
|
+
|
|
1209
|
+
Alice issues a basic request or an Invoice to Bob with `request issue`. For an Organization issuer,
|
|
1210
|
+
Alice uses `request issue --org ORGANIZATION_ID`. Issuance returns the request ID,
|
|
1211
|
+
document references, and checkout URL. Alice saves her PDF with the printed
|
|
1212
|
+
`document render` command.
|
|
1213
|
+
Bob runs `inbox list`, then `inbox get REQUEST_ID`. An Organization
|
|
1214
|
+
payer uses the same `inbox` commands with `--org`.
|
|
1215
|
+
|
|
1216
|
+
Bob's Inbox contains the request and document references. Bob uses the printed
|
|
1217
|
+
`document render` command to save his copy. Both participants read the same verified document. Their files can
|
|
1218
|
+
have different local paths. The home screen (`capxul`) shows how many requests wait
|
|
1219
|
+
for you; it does not download documents.
|
|
1220
|
+
|
|
1221
|
+
A direct Payment uses the existing Payment and Activity commands. Alice inspects
|
|
1222
|
+
her outgoing records. Bob inspects his incoming records after the backend observes
|
|
1223
|
+
them. Available document references can then be rendered by an authorized
|
|
1224
|
+
participant. Issuance, signing, submission, and settlement are separate states.
|
|
1225
|
+
A PDF file or checkout link does not prove that funds moved.
|
|
1226
|
+
|
|
1227
|
+
Cancellation removes the request from the received Inbox list. Because `inbox get`
|
|
1228
|
+
reads that list, it cannot find the cancelled ID. Existing participant document
|
|
1229
|
+
access remains available through the saved document and content hashes. Keep
|
|
1230
|
+
those references when retaining a cancelled Invoice.
|
|
1231
|
+
|
|
1232
|
+
The shared document directory is `documents` next to the CLI settings directory.
|
|
1233
|
+
`CAPXUL_CLI_HOME` selects a separate CLI settings directory. `document render
|
|
1234
|
+
--output-dir` changes the document output location. Each render preserves
|
|
1235
|
+
previous files. A failed PDF render does not repeat issuance or payment. Retry
|
|
1236
|
+
`document render` with the existing document references.
|
|
1237
|
+
|
|
1238
|
+
## Checkout links
|
|
1239
|
+
|
|
1240
|
+
A basic request URL has the form `/checkout/requests/LINK_TOKEN`. Existing Invoice
|
|
1241
|
+
URLs use `/checkout/invoices/LINK_TOKEN`. An offer URL uses `/checkout/offers/OFFER_ID`. Use the complete `checkoutUrl` returned by the
|
|
1242
|
+
CLI. Do not build a payment by sending funds directly to the printed Safe.
|
|
1243
|
+
|
|
1244
|
+
A valid request link holder can fund its fixed obligation. The named debtor and
|
|
1245
|
+
actual sender remain separate. Public checkout shows the approved payment
|
|
1246
|
+
summary. It does not expose private billing details or original document bytes.
|
|
1247
|
+
Only authorized participants can open the private Invoice document.
|
|
1248
|
+
|
|
1249
|
+
The checkout page offers registered Account or Organization funding and supported
|
|
1250
|
+
external wallet funding. Registered funding uses the selected actor's authority.
|
|
1251
|
+
External funding requires the correct network, balance, gas, and any exact token
|
|
1252
|
+
approval. Payment goes through the Payments contract with the validated snapshot.
|
|
1253
|
+
Inspect the resulting state and receipt before reporting payment complete.
|
|
1254
|
+
|
|
1255
|
+
CLI `inbox pay` prepares the request's Payment and hands over to the approval
|
|
1256
|
+
page, as `payment send` does. It does not depend on the hosted checkout page.
|
|
1257
|
+
A rejection on the approval page is not permission to send another Payment.
|
|
1258
|
+
`--resume` reopens the approval of a request whose Payment is already prepared.
|
|
1259
|
+
|
|
1260
|
+
Checkout links do not create recurring billing, automatic debits, booking,
|
|
1261
|
+
refunds, or QR codes.
|