@ghostlytools/cli 1.11.2 → 1.11.4
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 +34 -28
- package/SKILL.md +4 -2
- package/dist/assets/{api-CtXgscmK.js → api-BwyFq4lA.js} +2 -2
- package/dist/assets/{api-BM3PsXbB.js → api-MYc6QNRs.js} +306 -114
- package/dist/assets/api-MYc6QNRs.js.map +1 -0
- package/dist/assets/{apiKit-lCTQ0EBG.js → apiKit-CfsNx9ZR.js} +62 -16
- package/dist/assets/apiKit-CfsNx9ZR.js.map +1 -0
- package/dist/assets/{appFetch-BKHy5H8J.js → appFetch-DVYZOZFw.js} +3 -3
- package/dist/assets/{appFetch-BKHy5H8J.js.map → appFetch-DVYZOZFw.js.map} +1 -1
- package/dist/assets/{apps-DO_gAZgm.js → apps-Dbw2Hcko.js} +1 -1
- package/dist/assets/{apps-Do26w3c7.js → apps-h12II1us.js} +150 -57
- package/dist/assets/apps-h12II1us.js.map +1 -0
- package/dist/assets/{arkade-CZrLbz-M.js → arkade-Bw_4PZRG.js} +2 -2
- package/dist/assets/{arkade-CZrLbz-M.js.map → arkade-Bw_4PZRG.js.map} +1 -1
- package/dist/assets/{backup-D21x1f5P.js → backup-CdEzTq5C.js} +1 -1
- package/dist/assets/{backup-j47AzDvG.js → backup-Chvy79SN.js} +60 -55
- package/dist/assets/backup-Chvy79SN.js.map +1 -0
- package/dist/assets/bark_ffi_wasm_bg-EY2uc0Bx.js.map +1 -1
- package/dist/assets/bitcoindevkit_bg-B-iLWrmX.js.map +1 -1
- package/dist/assets/{buttons-CiGlBVBT.js → buttons-BgoExb4E.js} +37 -7
- package/dist/assets/buttons-BgoExb4E.js.map +1 -0
- package/dist/assets/buttons-DK2aAGat.js +2 -0
- package/dist/assets/{client-raIncVtF.js → client-DY8tZZWi.js} +28 -8
- package/dist/assets/client-DY8tZZWi.js.map +1 -0
- package/dist/assets/{codec-DcG2AeyE.js → codec-BnMg-Grj.js} +2 -2
- package/dist/assets/{codec-DcG2AeyE.js.map → codec-BnMg-Grj.js.map} +1 -1
- package/dist/assets/{envelope-Dud6lntA.js → envelope-CdV7vHVZ.js} +2 -2
- package/dist/assets/{envelope-Dud6lntA.js.map → envelope-CdV7vHVZ.js.map} +1 -1
- package/dist/assets/{errors-Dt-ZnyOX.js → errors-CAh6GLJZ.js} +27 -2
- package/dist/assets/errors-CAh6GLJZ.js.map +1 -0
- package/dist/assets/{fedimintSdk-DRKRSw14.js → fedimintSdk-CPFfVK-G.js} +2 -2
- package/dist/assets/{fedimintSdk-DRKRSw14.js.map → fedimintSdk-CPFfVK-G.js.map} +1 -1
- package/dist/assets/{fixedHosts-CNX7QiUD.js → fixedHosts-CbgqrIKs.js} +3 -3
- package/dist/assets/{fixedHosts-CNX7QiUD.js.map → fixedHosts-CbgqrIKs.js.map} +1 -1
- package/dist/assets/{host-8RskzQgB.js → host-C0NMNQLl.js} +702 -143
- package/dist/assets/host-C0NMNQLl.js.map +1 -0
- package/dist/assets/{hyperdhtRelay-uAThbFub.js → hyperdhtRelay-Dz7pvcBA.js} +2 -2
- package/dist/assets/{hyperdhtRelay-uAThbFub.js.map → hyperdhtRelay-Dz7pvcBA.js.map} +1 -1
- package/dist/assets/{irohWeb-DGelfgDJ.js → irohWeb-caAj4Dms.js} +19 -12
- package/dist/assets/irohWeb-caAj4Dms.js.map +1 -0
- package/dist/assets/{main-BC33ooYg.js → main-C6t5zrD5.js} +383 -110
- package/dist/assets/main-C6t5zrD5.js.map +1 -0
- package/dist/assets/{mainline-DYrjsS1t.js → mainline-DCuGUSZF.js} +35 -18
- package/dist/assets/mainline-DCuGUSZF.js.map +1 -0
- package/dist/assets/{networkReason-n2oBs4by.js → networkReason-BbQW1Xpc.js} +3 -3
- package/dist/assets/{networkReason-n2oBs4by.js.map → networkReason-BbQW1Xpc.js.map} +1 -1
- package/dist/assets/{nwc-Do3VSlIS.js → nwc-CSDRMZ0e.js} +3 -3
- package/dist/assets/{nwc-Do3VSlIS.js.map → nwc-CSDRMZ0e.js.map} +1 -1
- package/dist/assets/{nwcProvider-Du5aWNIn.js → nwcProvider-PE0wli8n.js} +2 -2
- package/dist/assets/{nwcProvider-Du5aWNIn.js.map → nwcProvider-PE0wli8n.js.map} +1 -1
- package/dist/assets/{ownDid-CwwYu8s2.js → ownDid-C1R5Kd8q.js} +2 -2
- package/dist/assets/{ownDid-CwwYu8s2.js.map → ownDid-C1R5Kd8q.js.map} +1 -1
- package/dist/assets/{ownStatus-D7dB4zJB.js → ownStatus-BoTf5WqQ.js} +27 -9
- package/dist/assets/ownStatus-BoTf5WqQ.js.map +1 -0
- package/dist/assets/{profiles-NyF5FnYF.js → profiles-DszHjEJi.js} +25 -10
- package/dist/assets/profiles-DszHjEJi.js.map +1 -0
- package/dist/assets/{registry-DKDInr0A.js → registry-Da-r6eC3.js} +30 -12
- package/dist/assets/registry-Da-r6eC3.js.map +1 -0
- package/dist/assets/{registry-C734VrO9.js → registry-zUZBSHYv.js} +1 -1
- package/dist/assets/{resolve-3Tqh9AWQ.js → resolve-tUzh4lHh.js} +2 -2
- package/dist/assets/{resolve-3Tqh9AWQ.js.map → resolve-tUzh4lHh.js.map} +1 -1
- package/dist/assets/{secretGuard-B7Hj0Kvz.js → secretGuard-CsVHDdYk.js} +68 -6
- package/dist/assets/{secretGuard-B7Hj0Kvz.js.map → secretGuard-CsVHDdYk.js.map} +1 -1
- package/dist/assets/secretGuard-DCb1I0_B.js +2 -0
- package/dist/assets/{server-B6PQ6iae.js → server-C1jZZ61O.js} +896 -277
- package/dist/assets/server-C1jZZ61O.js.map +1 -0
- package/dist/assets/{src-ChJijTlM.js → src-DJe-OYxd.js} +1010 -236
- package/dist/assets/src-DJe-OYxd.js.map +1 -0
- package/dist/assets/{sshForges-Brf0fslM.js → sshForges-C9zTO72R.js} +4 -3
- package/dist/assets/sshForges-C9zTO72R.js.map +1 -0
- package/dist/assets/{translate-xLme9Rdh.js → translate-CUuC5szR.js} +36 -15
- package/dist/assets/translate-CUuC5szR.js.map +1 -0
- package/dist/assets/{usdt-CSU5KzTV.js → usdt-DI51znt-.js} +3 -3
- package/dist/assets/{usdt-CSU5KzTV.js.map → usdt-DI51znt-.js.map} +1 -1
- package/dist/ghostly.mjs +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/dist/assets/api-BM3PsXbB.js.map +0 -1
- package/dist/assets/apiKit-lCTQ0EBG.js.map +0 -1
- package/dist/assets/apps-Do26w3c7.js.map +0 -1
- package/dist/assets/backup-j47AzDvG.js.map +0 -1
- package/dist/assets/buttons-CiGlBVBT.js.map +0 -1
- package/dist/assets/buttons-D2l2bVCG.js +0 -2
- package/dist/assets/client-raIncVtF.js.map +0 -1
- package/dist/assets/errors-Dt-ZnyOX.js.map +0 -1
- package/dist/assets/host-8RskzQgB.js.map +0 -1
- package/dist/assets/irohWeb-DGelfgDJ.js.map +0 -1
- package/dist/assets/main-BC33ooYg.js.map +0 -1
- package/dist/assets/mainline-DYrjsS1t.js.map +0 -1
- package/dist/assets/ownStatus-D7dB4zJB.js.map +0 -1
- package/dist/assets/profiles-NyF5FnYF.js.map +0 -1
- package/dist/assets/registry-DKDInr0A.js.map +0 -1
- package/dist/assets/secretGuard-DUr6bgKc.js +0 -2
- package/dist/assets/server-B6PQ6iae.js.map +0 -1
- package/dist/assets/src-ChJijTlM.js.map +0 -1
- package/dist/assets/sshForges-Brf0fslM.js.map +0 -1
- package/dist/assets/translate-xLme9Rdh.js.map +0 -1
package/README.md
CHANGED
|
@@ -62,8 +62,9 @@ ghostly listen --type message.received --cursor "${GHOSTLY_HOME:-$HOME/.ghostly}
|
|
|
62
62
|
```
|
|
63
63
|
|
|
64
64
|
The cursor file keeps the last event handled, so a restarted bot goes on where it stopped; it sits in the Ghostly
|
|
65
|
-
folder in use. With another folder
|
|
66
|
-
|
|
65
|
+
folder in use. With another folder, set `GHOSTLY_HOME` rather than `--home`: the cursor's path above reads it. The
|
|
66
|
+
hook's own `ghostly send` runs on the folder and profile `listen` runs on, given as a flag or in the environment
|
|
67
|
+
(`listen` sets `GHOSTLY_HOME` and `GHOSTLY_PROFILE` for it). The example script takes
|
|
67
68
|
`ECHO_CURSOR` for the cursor's path (default `echo.cursor` in `GHOSTLY_HOME`, else `~/.ghostly`); give each bot and
|
|
68
69
|
profile its own.
|
|
69
70
|
|
|
@@ -95,7 +96,8 @@ Bots should run the daemon: a one-shot is offline between commands.
|
|
|
95
96
|
|
|
96
97
|
## Commands
|
|
97
98
|
|
|
98
|
-
Every command prints one JSON object on stdout. A failure prints `{"error":{"code","message"}}`
|
|
99
|
+
Every command prints one JSON object on stdout. A failure prints `{"error":{"code","message"}}` (on stderr for `call pipe`,
|
|
100
|
+
whose stdout is the call's audio) and exits with:
|
|
99
101
|
`1` failed (the engine or the network refused), `2` usage, `3` not found, `4` timed out, `5` needs a confirmation
|
|
100
102
|
(`--force`, `--yes`, `--confirm-real`), `130` stopped with Ctrl-C (`interrupted`: a one-shot closes its profile first,
|
|
101
103
|
and a line on stderr says what became of what it waited on). A daemon that does not answer a read or `daemon status` within 15 seconds, or
|
|
@@ -114,36 +116,36 @@ The rows are in alphabetical order of their first command, and every command of
|
|
|
114
116
|
|---|---|
|
|
115
117
|
| `app init <dir> [--name <name>] [--title <title>] [--force]` | Start an app (WISP 1200, Apps), run here with no profile or daemon: a small working one in `<dir>` (made when missing), which `app publish <dir>` signs as it is. It writes `ghostly-app.json` (`view: chat`, the `chat` permission), an `index.html` that says hello to the same app on the contact's side, typed against `@ghostlytools/sdk/app`, and a `README.md` with build, publish, verify and how to list it in a store. The name is `--name` (a lowercase letter, then up to 31 lowercase letters, digits or hyphens), else the folder's (`My App` gives `my-app`); the title is `--title` (one line, up to 40 characters), else the name's. When one of the three files is there nothing is written and it is `refused` (`details.reason` `exists`, `details.files`), unless `--force`, which replaces those three only. Answers `{dir, name, title, files, replaced?, next}` |
|
|
116
118
|
| `app open <chat> <ref\|name> [--no-card]`, `app close <chat> <ref\|name>` | A served app in a chat, as a bot (WISP 1200, Apps; needs the daemon, and `app serve` first). `app open` says the app is open on this side, in the version served, and sends the contact the app's card ("opened Chess", with what their app needs to get the same app and check it), unless their app is open in that chat already or `--no-card`. The two sides talk once both opened it; while the app stays open here, the engine says so again on every session that comes back. It answers `{chat, app, version, card, peer, live}`: `card` is the card's message id or null, `peer` the version the contact has open or null. A card that cannot go leaves nothing open. `app close` ends it: `{chat, app, closed}`. What is open is kept in memory: a restarted daemon opens again. `unavailable` in a one-shot, or on a daemon that started before the first app was served (`daemon restart`); `not_found` for an app not served; `refused`, in the engine's words, for a chat that is not a paired 1:1 chat |
|
|
117
|
-
| `app publish <dir> --key <file> [--out <file>] [--sequence n]`, `app verify <bundle\|url>` | The publisher tools of WISP 1200 (Apps), run here with no profile or daemon. `app publish` bundles and signs an app: `<dir>/ghostly-app.json` holds the manifest's fields but `publisher`, `sequence` and `files`, and every other file in `<dir>` goes in (dot files are left out and listed in `skipped`). It writes `<dir>/app.ghostlyapp` (or `--out`), its `sequence` one more than the bundle already there, which only the same key may follow (`--sequence n` sets it, refused unless higher); a sequence that `<dir>/ghostly-revoke.json` already revokes is `refused` (`details.reason` `revoked`, `details.sequence` the first one it leaves alone). `--key` names the publisher key file, a PKCS #8 PEM: made owner-only on first use (back it up: an app is updated only with its key), refused when others may read it or when it is inside `<dir>`, never printed; a folder holding any private key file is refused (`details.reason` `private-key`). `app verify` checks a bundle from a file or an `https` URL as a client does (jsDelivr only at a full commit, 16 MiB at most) and answers its manifest and digest, or `refused` (exit 1) with the WISP's reason in `details.reason` |
|
|
118
|
-
| `app revoke <dir> --key <file> (--digest <digest>… \| --up-to <sequence>) [--reason <text>] [--bundle <file>] [--force]` | Revoke versions of your app (WISP 1200 · Revocation): by digest (base64url, as `app verify` prints it; `--digest` again for each, up to 64) or every version up to a `sequence`, with an optional reason of one line of 1 to 200 characters (a bad or repeated `--digest`, or an empty or longer `--reason`, is a usage error naming the option). Clients keep a revocation for good, so `--up-to` past the bundle's own sequence
|
|
119
|
+
| `app publish <dir> --key <file> [--out <file>] [--sequence n]`, `app verify <bundle\|url>` | The publisher tools of WISP 1200 (Apps), run here with no profile or daemon. `app publish` bundles and signs an app: `<dir>/ghostly-app.json` holds the manifest's fields but `publisher`, `sequence` and `files`, and every other file in `<dir>` goes in (dot files are left out and listed in `skipped`). It writes `<dir>/app.ghostlyapp` (or `--out`), its `sequence` one more than the bundle already there, which only the same key may follow (`--sequence n` sets it, refused unless higher); a sequence that `<dir>/ghostly-revoke.json` or the one beside `--out` already revokes is `refused` (`details.reason` `revoked`, `details.sequence` the first one it leaves alone). `--key` names the publisher key file, a PKCS #8 PEM: made owner-only on first use (back it up: an app is updated only with its key), refused when others may read it or when it is inside `<dir>`, never printed; a folder holding any private key file is refused (`details.reason` `private-key`). `app verify` checks a bundle from a file or an `https` URL as a client does (jsDelivr only at a full commit, 16 MiB at most) and answers its manifest and digest, or `refused` (exit 1) with the WISP's reason in `details.reason` |
|
|
120
|
+
| `app revoke <dir> --key <file> (--digest <digest>… \| --up-to <sequence>) [--reason <text>] [--bundle <file>] [--force]` | Revoke versions of your app (WISP 1200 · Revocation): by digest (base64url, as `app verify` prints it; `--digest` again for each, up to 64) or every version up to a `sequence`, with an optional reason of one line of 1 to 200 characters (a bad or repeated `--digest`, or an empty or longer `--reason`, is a usage error naming the option). Clients keep a revocation for good, so `--up-to` past the bundle's own sequence asks for `--force` (`confirm`, exit 5; versions published from elsewhere), and `app publish` refuses a sequence that list already stops, naming the `--sequence` that clears it. The statement names the app of `<dir>/app.ghostlyapp` (or `--bundle`), is signed with that app's publisher key (any other key is refused, and none is made here), and is added to the `ghostly-revoke.json` beside that bundle, where `app verify`, `app serve` and a client read it and stop those versions (publish it beside the bundle). Answers `{app, digests \| upTo, current, added, revocations, file}`; `current` says whether that bundle is among them, `file` the list written |
|
|
119
121
|
| `app send <chat> <ref\|name> <json\|->` | One message of a served app's own protocol to the same app on the contact's side (WISP 1200, Apps; needs the daemon): any JSON value, on the command line or `-` for stdin, at most 32 KiB, at most 48 a second. It goes on the live session only, while both sides have the app open, and is never kept for later: `{chat, app, sent: true}`, or an error whose `details.reason` is the WISP's name for why it did not go: `not-open` (`refused`: `app open` first), `too-large` (`bad_request`), `offline` and `peer-closed` (`unavailable`: the chat is not live, or the contact's app is not open; wait for `app.opened`), `too-fast` (`refused`). The contact's messages come as `app.message` events |
|
|
120
|
-
| `app serve <bundle\|url> --grant chat [--grant name] [--url <url>]`, `app served`, `app unserve <ref\|name>` | Serve an app as a bot (WISP 1200, Apps): the profile speaks the app's messages in its chats itself, and no app runs here. `app serve` reads the signed bundle from a file or an `https` URL and checks it as `app verify` does (`refused` with the WISP's reason in `details.reason`). Each permission the manifest asks needs its `--grant`: `chat` (talk to the same app on the contact's side) and `name` (the profile's name in that chat); one left out is `confirm` (exit 5), naming it in `details.missing`. `internet` cannot be granted (no page runs here), a permission the app does not ask is `bad_request`, and an app that does not ask for `chat` is `refused`. A newer version replaces the one served; an older one, or another bundle under the same `sequence`, is `refused`. It answers `{served: {ref, title, version, sequence, digest, url?, permissions, granted, servedAt}, offered, restart?}`; `url` is where a contact's app reads the bundle
|
|
122
|
+
| `app serve <bundle\|url> --grant chat [--grant name] [--url <url>]`, `app served`, `app unserve <ref\|name>` | Serve an app as a bot (WISP 1200, Apps): the profile speaks the app's messages in its chats itself, and no app runs here. `app serve` reads the signed bundle from a file or an `https` URL and checks it as `app verify` does (`refused` with the WISP's reason in `details.reason`). Each permission the manifest asks needs its `--grant`: `chat` (talk to the same app on the contact's side) and `name` (the profile's name in that chat); one left out is `confirm` (exit 5), naming it in `details.missing`. `internet` cannot be granted (no page runs here), a permission the app does not ask is `bad_request`, and an app that does not ask for `chat` is `refused`. A newer version replaces the one served; an older one, or another bundle under the same `sequence`, is `refused`. It answers `{served: {ref, title, version, sequence, digest, url?, permissions, granted, servedAt}, offered, restart?}`; `url` is where a contact's app reads the bundle, on raw.githubusercontent.com or cdn.jsdelivr.net at a full commit: `--url` (any other link is `bad_request`), else the first of the URL served from and the manifest's sources that a contact's app reads from, and none when there is no such link. The list is kept in the profile's folder (`apps.json`), and a `profile backup` carries it to the restored copy. A profile's engine offers `apps/1` to contacts only while it serves an app, and reads the list when it starts: `offered` says whether it does now, and `restart: true` that `daemon restart` is needed for it. `app served` answers `{apps, offered, restart?}`; `app unserve` removes one by its reference or its name |
|
|
121
123
|
| `button press <chat\|group> <message> <button> [--wait none\|sent\|delivered] [--timeout s]` | Press a button of someone else's question, as a tap in the app does (WISP 406 · Message Buttons): the reply carries the button's label, and the asker hears `button.pressed`. `<message>` is the question's id (its event or `chat history`), `<button>` a button's id from its `card`. Refused (exit 1) like a tap: closed buttons, a second answer past `--once`, a second press within a second. A one-shot in a chat waits until it went out, as `send`. Answers `{chat \| group, messageId, button, label, replyId, delivery \| edges}` |
|
|
122
|
-
| `button update <chat\|group> <message> [--chosen <button>] [--close] [--text <text>] [--force] [--wait none\|confirmed\|sent] [--timeout s]` | Answer a question you sent with `send --button` (WISP 406 · Message Buttons): `--chosen` shows which button won, `--close` takes presses no more, `--text` changes the text (shown as edited; refused if it looks like a secret, unless `--force`); the buttons and, unless given, the text stay. `<message>` is the `messageId` send gave. Answers `{chat \| group, buttons, messageId, card, edits}` |
|
|
124
|
+
| `button update <chat\|group> <message> [--chosen <button>] [--close] [--text <text>] [--force] [--wait none\|confirmed\|sent] [--timeout s]` | Answer a question you sent with `send --button` (WISP 406 · Message Buttons): `--chosen` shows which button won, `--close` takes presses no more, `--text` changes the text (shown as edited; refused if blank, or if it looks like a secret, unless `--force`); the buttons and, unless given, the text stay. `<message>` is the `messageId` send gave. Answers `{chat \| group, buttons, messageId, card, edits}` |
|
|
123
125
|
| `call auto [on\|off] [--from <chat>]… [--rate n]` | Answer calls by themselves, from anyone or the chats named (kept in the profile) |
|
|
124
126
|
| `call hangup [<chat\|call>]`, `call list`, `call flush [<chat\|call>]` | Hang up (or decline); calls on now; drop the audio queued and not played yet |
|
|
125
127
|
| `call pipe [<chat\|call>]` | A call's audio on stdin and stdout, for shell pipelines (sox, ffmpeg) |
|
|
126
128
|
| `call start <chat> [--rate 48000]`, `call answer [<chat\|call>] [--rate n]` | Voice calls (daemon): the result names the call's audio socket ([Calls](#calls)) |
|
|
127
129
|
| `chat accept <chat> [<method> [--off] [--networks mainnet,testnet]]` | Which ways of paying the chat takes (no method: the ones it takes now, per network) |
|
|
128
|
-
| `chat connect <chat>`, `chat disconnect <chat> [--hold <minutes>]` | Reconnect now (ends a hold); close the live session, or with `--hold` stay off the direct link that long ([Staying off the direct link](#staying-off-the-direct-link)) |
|
|
130
|
+
| `chat connect <chat>`, `chat disconnect <chat> [--hold <minutes>]` | Reconnect now (ends a hold; a contact whose app is not there is `unavailable`, the dial's own words in `details.reason`); close the live session, or with `--hold` stay off the direct link that long ([Staying off the direct link](#staying-off-the-direct-link)) |
|
|
129
131
|
| `chat history <chat> [--limit n] [--before x] [--after x] [--translate lang]` | Messages, oldest first; `x` is a message id or a time in ms ([Translation](#translation)) |
|
|
130
132
|
| `chat list [--show-secret]`, `chat show <chat> [--show-secret]` | Chats, and one chat's connection: transports, last attempt, comparison code. `pairing` is connecting, negotiating, confirm, waiting, ready or error, and `connectionError` says why it failed (null when nothing did). A pending chat's `invite` prints as `<hidden>` without `--show-secret`. `lastMessageAt` is null until the chat's first message, as every time not reached yet is |
|
|
131
133
|
| `chat pay <chat> <sats> [--memo t] [--network n] [--confirm-real]` | Ecash to a contact. A contact that offers no way of paying is `refused`: `details.reason` `contact_no_wallet` (it has no wallet yet) or `contact_payments_off` (it has payments off in this chat, or an older app). With no Cashu wallet of the network on this side, `refused` with `details.reason` `no_wallet` and the `wallet create` command to run; with one too short of sats, `refused`. It names its chat by the chat's id, its contact's key or a label given here, never only by the contact's own name or a prefix of its id |
|
|
132
|
-
| `chat rename <chat>
|
|
133
|
-
| `chat request <chat> <sats> [--memo t] [--method m] [--rail r]`, `chat pay-request <chat> <payment>` | Ask a contact to pay; pay the contact's request. Refused as `chat pay` is when the contact offers no way of paying, or when `chat request` has no Cashu wallet of the network here (`no_wallet`). `chat pay-request` names its chat by the chat's id, its contact's key or a label given here, never only by the contact's own name or a prefix of its id |
|
|
134
|
+
| `chat rename <chat> [name...]`, `chat remove <chat> --yes [--force]` | Name it here (up to 48 characters, counted as stored: a tab or a line break is a space and invisible characters go, so a name with nothing that shows is refused; counted in code points, so a joined emoji counts as several, and a name too long is refused with its count in `details.length` and `details.max`; no name, or an empty one, gives back the contact's own); delete it (keys and history) here, closing the contact's services opened from it (`service open`), refused (`busy`) while a call is on in it: hang the call up first; refused (`confirm`, the messages in `details.messages`) while a message you deleted for everyone has not reached the contact yet, as removing the chat would leave it on their device: `--force` removes it anyway |
|
|
135
|
+
| `chat request <chat> <sats> [--memo t] [--method m] [--rail r]`, `chat pay-request <chat> <payment>` | Ask a contact to pay; pay the contact's request. With `--method usdt` the amount is in USDT, as the app reads it (`5` is 5 USDT, `0.25` a quarter; on the socket API, `amount` as text: a number there is base units). The answer says the amount asked: `amount` and `unit`, and for USDT `decimals` (base units make one USDT), with the few base units the app adds so the payment can be told apart (5.000417 USDT); `payment list` carries `decimals` for USDT too. Refused as `chat pay` is when the contact offers no way of paying (`contact_no_wallet` too when it has no wallet of the `--method` or network asked, with the `wallet create` command it needs), or when `chat request` has no Cashu wallet of the network here (`no_wallet`). `chat pay-request` names its chat by the chat's id, its contact's key or a label given here, never only by the contact's own name or a prefix of its id |
|
|
134
136
|
| `chat transport <chat> <auto\|dht\|webrtc\|iroh\|hyperdht>` | What carries the chat |
|
|
135
137
|
| `chat verify <chat> --code <code>` | Mark the contact verified after comparing the codes out of band |
|
|
136
138
|
| `chat wait <chat> [--until live\|text\|paired] [--timeout s]` | Wait for a chat to go live, carry text, or see its contact. Live means a session that exists now, in this run of the daemon: a chat that was live before a restart counts once its contact answers again. Paired answers at once for a chat that paired before, whether its contact is online or not |
|
|
137
139
|
| `daemon [--detach] [--timeout s]`, `daemon status [--timeout s]`, `daemon stop [--timeout s]`, `daemon restart [--timeout s]` | Keep the profile online; `status` names its version and its socket (`socket`, for the [socket API](#the-socket-api)), or says `"starting": true` with the `pid` of a daemon whose socket does not listen yet (`stop` and `restart` wait up to `--timeout` for that socket, then stop it); `restart` stops it and starts this release's code in the background ([After an upgrade](#after-an-upgrade)), keeping the profile for the new daemon in between: other commands wait for its socket rather than open the profile. Ctrl-C, SIGTERM and the terminal closing (SIGHUP) stop it cleanly. A command that holds the profile for a moment (a bot's `send` while a service manager restarts it) is waited for, up to `--timeout` (60 s): still held then, `busy` with its pid |
|
|
138
140
|
| `edit <chat> <message> [text… \| --text <text> \| --stdin] [--force] [--wait none\|confirmed] [--timeout s]` | Replace the text of a message you sent (1:1 chats, `group edit` for a group; `<message>` is the `messageId` `send` gave, or its wire id). The contact sees it in place, marked edited; `--wait confirmed` waits for its app to confirm (the default without a daemon). At most 100 edits a message, no time limit; an older contact app gets it once it shows edits |
|
|
139
|
-
| `engine <method> [json \| -] [--confirm-real] [--show-secret] [--yes] [--force]`, `engine --list [--verbose]` | Any call of the app's engine; `--verbose` lists what each takes (`{ linkId, label }`, `?` for an optional key). A call given less than it takes is refused as `bad_request`. One that deletes chats or groups (`clearProfileData`, `removeLink`, `leaveGroup`, `forgetGroup`, `deviceRemove`) needs `--yes`; `clearProfileData` answers what it removed and stops a daemon. `removeLink`, and `setChatTransport` or `setDeliveryMode` to `dht`, are refused (`busy`) while a call is on in the chat, as `chat remove` and `chat transport dht` are; `clearProfileData` while a call is on in any chat. One that sends a text that looks like a secret (`sendMessage`, `sendGroupMessage`, `editMessage`, `forwardMessages`, a payment's memo or comment, a file's name, a group's name in `createGroup` or `renameGroup`, the nick in `updateSettings`) needs `--force` |
|
|
141
|
+
| `engine <method> [json \| -] [--confirm-real] [--show-secret] [--yes] [--force]`, `engine --list [--verbose]` | Any call of the app's engine; `--verbose` lists what each takes (`{ linkId, label }`, `?` for an optional key). A call given less than it takes is refused as `bad_request`. One that deletes chats or groups (`clearProfileData`, `removeLink`, `leaveGroup`, `forgetGroup`, `deviceRemove`) needs `--yes`; `clearProfileData` answers what it removed and stops a daemon. `removeLink`, and `setChatTransport` or `setDeliveryMode` to `dht`, are refused (`busy`) while a call is on in the chat, as `chat remove` and `chat transport dht` are; `removeLink` while a delete for everyone has not reached the contact, as `chat remove` is, and `clearProfileData` while one has not in any chat, until `--force`; `clearProfileData` while a call is on in any chat. One that sends a text that looks like a secret (`sendMessage`, `sendGroupMessage`, `editMessage`, `forwardMessages`, a payment's memo or comment, a file's name, a group's name in `createGroup` or `renameGroup`, the nick in `updateSettings`) needs `--force` |
|
|
140
142
|
| `events [--since seq] [--translate lang]` | What the event journal holds, without following ([Translation](#translation)) |
|
|
141
|
-
| `file list <chat\|group>`, `file accept\|decline\|pause\|resume\|cancel [<chat>] <file>` | Transfers; a file over 25 MiB waits for `file accept` (files/3), and so does a group's file that did not come by itself (over 8 MiB): its row's `transfer` says `stage: "asking"`, `waitingFor: "me"` (a file sent from here that the contact has not taken yet: `waitingFor: "contact"`; one sent while the contact is away: `stage: "waiting"`, `waitingFor: "contact"`). A file's id names its chat or its group, so `<chat>` may be left out |
|
|
143
|
+
| `file list <chat\|group>`, `file accept\|decline\|pause\|resume\|cancel [<chat>] <file>` | Transfers; a file over 25 MiB waits for `file accept` (files/3), and so does a group's file that did not come by itself (over 8 MiB): its row's `transfer` says `stage: "asking"`, `waitingFor: "me"` (a file sent from here that the contact has not taken yet: `waitingFor: "contact"`; one sent while the contact is away: `stage: "waiting"`, `waitingFor: "contact"`). A file's id names its chat or its group, so `<chat>` may be left out. One the contact paused (`pausedBy: "peer"`) goes on only when they resume it: `file resume`, `file request` and `file resend` of it are `refused`, as are `file pause`, `file resume` and `file request` of one offered here that waits for `file accept` |
|
|
142
144
|
| `file resend [<chat>] <file>`, `file request [<chat>] <file>` | A file that stopped moving: sent again from here, or asked for again from the contact (a group's file: from whoever holds it); either goes on from the bytes the receiver holds (files/3) |
|
|
143
|
-
| `file save [<chat>] <file> [--dir d \| --path p] [--force] [--wait [--timeout s]]` | Write a received file to disk: to `--path`, or into `--dir` under the name its sender gave it, with a `_` first when that name starts with `-`, so no tool run in the folder takes it for an option; a voice message goes in under the name Ghostly makes for it (`Ghostly voice <date time>`), and when that name is taken (two of one second) under a free `… (2)` (the answer's `path` is what was written). Never over a file without `--force
|
|
145
|
+
| `file save [<chat>] <file> [--dir d \| --path p] [--force] [--wait [--timeout s]]` | Write a received file to disk: to `--path`, or into `--dir` under the name its sender gave it, with a `_` first when that name starts with `-`, so no tool run in the folder takes it for an option; a voice message goes in under the name Ghostly makes for it (`Ghostly voice <date time>`), and when that name is taken (two of one second) under a free `… (2)` (the answer's `path` is what was written). Never over a file without `--force`: a name taken in `--dir` is answered with the next free `--path … (2)` that keeps both; an unfinished one says how many bytes are here (exit `1`), one that waits for you to take it answers `5` naming `file accept`, with or without `--wait`; `--wait` waits for a received one first (a sent one is all here) |
|
|
144
146
|
| `file send <chat\|group> <path> [--name n] [--mime t] [--voice [ms] [--peaks …]] [--reply <message>] [--force] [--wait none\|sent] [--timeout s]` | A file, or a voice note (its length and waveform measured from the file unless given); `--reply` quotes a message, as `send --reply` does. Answers the message's `messageId` (what `message delete`, `react` and `pin` take) and the file's id. Without a daemon, a file to a chat stays until the contact has all of it (`--wait sent`, the default there; `--timeout`, 300 s, then exit 4 with the `messageId` and the file's id in `details`, and it goes on with your next command; a file over 25 MiB waits for the contact's `file accept` meanwhile); `--wait none` answers at once, as a daemon does by default. To a group (`group:<id>` when a chat has the same name), up to 100 MiB: every member sees it at once and each member's app fetches it from a member who has it (WISP 503) |
|
|
145
147
|
| `file wait [<chat>] <file> [--timeout s]` | Wait until a transfer ends: exit `0` when the file is all here, `1` with the transfer's error when it failed (`details.retry`: `file resend` can go on), `4` on timeout (default 300 s), `5` at once when a received file waits for you to take it (over 25 MiB, or a group's file that did not come by itself): the message names `file accept` |
|
|
146
|
-
| `forward <chat\|group> <message>… --to <chat\|group>… [--force] [--wait none\|sent] [--timeout s]` | Forward messages to up to 5 chats and groups (`--to` again for each; `group:<id>` names a group when a chat has the same name; an id that starts with a dash is taken as it is, `--to -Ab…` or `--to=-Ab…`). Each is a new message of yours that says it was forwarded (`forwarded`, the hop count) and nothing of who wrote it. Files go from the bytes this profile holds, never fetched again; a group takes texts only. A text that looks like a seed, a key or ecash needs `--force`. Answers `{from, results: [{to, kind, messageIds, error}]}`, a group's with `edges` (how many edges took its copies so far, as for `group send`); any refusal fails the command (exit 1) with the results in `details`. `--wait sent`: each text on its way (a group's taken by an edge), each file's transfer done; without a daemon a group's copies wait for an edge by default (`--wait none` answers at once) |
|
|
148
|
+
| `forward <chat\|group> <message>… --to <chat\|group>… [--force] [--wait none\|sent] [--timeout s]` | Forward messages to up to 5 chats and groups (`--to` again for each; `group:<id>` names a group when a chat has the same name; an id that starts with a dash is taken as it is, `--to -Ab…` or `--to=-Ab…`). Each is a new message of yours that says it was forwarded (`forwarded`, the hop count) and nothing of who wrote it. Files go from the bytes this profile holds, never fetched again; a group takes texts only. A text that looks like a seed, a key or ecash needs `--force`. Answers `{from, results: [{to, kind, messageIds, error}]}`, a group's with `edges` (how many edges took its copies so far, as for `group send`); any refusal fails the command (exit 1) with the results in `details`. `--wait sent`: each text on its way (a group's taken by an edge), each file's transfer done; without a daemon a group's copies wait for an edge by default (`--wait none` answers at once). A wait that ends short (a timeout, exit 4) has the results in `details` too, next to the copy's `messageId`; a refusal comes first |
|
|
147
149
|
| `group auto [on\|off] [--from <chat>]…` | Accept group invitations by themselves, only those over the chats named (their id, their contact's key or a label given here; `on` needs at least one, and names them all: a new `on` replaces the list): the daemon accepts them at once, and on start those that came while it was down; any other waits for `group accept`. Kept in the profile's `groups.json` with each chat's contact key: a removed chat, or one whose contact's key changed, leaves the list. When the 32 waiting invitations are full, one over a chat on the list takes the place of the oldest waiting from the chat that holds the most (its inviter is told no). An invitation over a chat on the list kept beside another contact's under the same group id (`others`) is the one taken, the other told no, while the group held is only an invitation not answered yet; beside a group joined or accepted it waits for you (a line in the log). With no argument, prints `{autoJoin: {on, from}}`; `group list` carries it too. Each accept is a line in the daemon's log |
|
|
148
150
|
| `group create <name> [--mesh] [--force]`, `group join [<link> \| -]` | A community (a link anyone can open), or a private mesh. `group join` reads the link from stdin when none is given or `-` (on the command line it shows in `ps` and the shell's history, and the CLI warns). `group join` with the link of a community the profile was removed from asks to be let in again, and keeps its history |
|
|
149
151
|
| `group edit <group> <message> [text… \| --text <text> \| --stdin] [--mention <member>]… [--force]` | Replace the text of a message you sent to the group (`<message>` is the `messageId` `group send` gave). Every member sees it in place, marked edited; mentions whose `@name` is still in the text stay, `--mention` adds more. Answers `{group, messageId, edits, sent, edges}`: `edges` and `sent` as for `group send` (`sent: false` while no edge took this edit, also while it waits for the pace); `--wait sent` and `--timeout` as for `group send`. The text the message already has is no edit: `sent: false, unchanged: true`. A profile that is not a member any more (removed from the group) gets `refused`, with the reason, as does `message delete <group> <message> --everyone`. A private group's members whose edge is down get it when it opens, a community's with the catch-up; a member on an older app keeps the old text |
|
|
@@ -151,10 +153,10 @@ The rows are in alphabetical order of their first command, and every command of
|
|
|
151
153
|
| `group invite <group> <chat>`, `group remove <group> <member>`, `group admin <group> <member>` | Membership, for the admin (each prints the group; `--show-secret` for its link). While the group's link is on, a member removed can join again with it: `group remove` says so on stderr, and `group link <group> --reset` keeps them out. `group invite` names its chat by the chat's id, its contact's key or a label given here, never only by the contact's own name or a prefix of its id; `group admin` (and `group hub --pin`) names its member by its key or a prefix of it, never only by the name the member gave itself |
|
|
152
154
|
| `group leave <group> --yes`, `group forget <group> --yes`, `group accept\|decline <group>` | Membership. Leaving deletes the group's history and files on this device, so it asks for `--yes` (`confirm`, exit 5, without it), as `group forget` does; forget also deletes a group you were removed from, which keeps its history. An admin's leave hands the role to a member who is online and names them: `{left, admin: {key, name}}` |
|
|
153
155
|
| `group list [--show-secret]`, `group show <group> [--show-secret]`, `group history <group>` | Groups (and `autoJoin`, as `group auto` prints it), members, history; a message names its author (`member` key, `nick` from the roster, or the name an author no longer in it had). A payment note's line (`gpay:<id>`) carries `groupPay`: `{id, kind, from, to, by, claims, amount, decimals, unit, rail, state, test}` (member keys as `group show` prints them, `from` `*` for a request to the whole group; `state` `open`, `sent`, `paid` or `closed`; `by` null when nobody can tell who paid), and the payment's own line on this profile (the request you made, a request that came to you) says `twinOf: "gpay:<id>"`: the same payment, which the app draws once The entry link prints as `<hidden>` without `--show-secret`. `lastMessageAt` is null until the group's first message. `others` (only when there are some): other groups that came under the same id, kept beside it until you pick, each a contact's invitation (`chat`, `name`, `members`) or a link opened (`link`, hidden the same way); `engine keepGroup '{"groupId":"<id>"}'` keeps the one shown, `engine switchGroup '{"groupId":"<id>","to":"<chat or link>"}'` takes another |
|
|
154
|
-
| `group react <group> <message> <emoji> [--remove] [--wait none\|sent] [--timeout s]` | React to a group's message. `refused` when the profile is not a member any more. `edges`: how many took it (`sent`: whether one did). Without a daemon it waits by default until an edge took it (`--wait sent`, up to `--timeout`, 30 s): a timeout (exit 4) says it is kept and goes with the next command that opens the group |
|
|
156
|
+
| `group react <group> <message> <emoji> [--remove] [--wait none\|sent] [--timeout s]` | React to a group's message. An `<emoji>` that is not one emoji is a usage error (exit 2), as for `react`. `refused` when the profile is not a member any more. `edges`: how many took it (`sent`: whether one did). Without a daemon it waits by default until an edge took it (`--wait sent`, up to `--timeout`, 30 s): a timeout (exit 4) says it is kept and goes with the next command that opens the group |
|
|
155
157
|
| `group rename <group> <name> [--force]` | A new name, for the admin (up to 64 characters, cleaned and counted as a chat's name is; one that looks like a secret needs `--force`, as for `group create`); the picture stays. Members see it once it reaches them; until then, and on apps from before names, the group keeps the name it had when they got in |
|
|
156
158
|
| `group rotate <group>`, `group link <group> [--off] [--reset]`, `group picture <group> <jpeg> \| --clear` | A fresh secret; the link (printed: asking for it is asking for the secret); the picture |
|
|
157
|
-
| `group send <group> [text…] [--mention <member>]… [--reply <message>] [--button id:Label]… [--style id=primary\|neutral\|danger]… [--once] [--id id] [--wait none\|sent] [--timeout s]` | Send; each mentioned member is written as `@name` in the text. `--button` puts buttons under it, as `send --button`. Answers `{group, messageId, sent, edges}`: the id `--reply`, `group react` and `group edit` take, how many edges took it so far, and `sent`, true once one did. A profile that is not a member any more (removed from the group) gets `refused`, with the reason, and nothing is sent. A group has no receipts: `--wait sent` waits until at least one edge took it (a member's in a private group, one of your hubs' in a community), and exits 4 after `--timeout` (default 30 s) if none did; the message still goes when an edge opens, while the profile is online. Use it for a one-shot send with no daemon. In a private group with nobody else in it (they all left, or nobody accepted yet), nobody gets the message, not even someone who joins later: the answer comes at once with `sent: false` and a `note` saying so |
|
|
159
|
+
| `group send <group> [text…] [--mention <member>]… [--reply <message>] [--button id:Label]… [--style id=primary\|neutral\|danger]… [--once] [--id id] [--wait none\|sent] [--timeout s]` | Send; each mentioned member is written as `@name` in the text. `--button` puts buttons under it, as `send --button`. Answers `{group, messageId, sent, edges}`: the id `--reply`, `group react` and `group edit` take, how many edges took it so far, and `sent`, true once one did. A profile that is not a member any more (removed from the group) gets `refused`, with the reason, and nothing is sent. A group has no receipts: `--wait sent` waits until at least one edge took it (a member's in a private group, one of your hubs' in a community), and exits 4 after `--timeout` (default 30 s) if none did; the message still goes when an edge opens, while the profile is online. Use it for a one-shot send with no daemon. In a private group with nobody else in it (they all left, or nobody accepted yet), nobody gets the message, not even someone who joins later: the answer comes at once with `sent: false` and a `note` saying so. A profile removed while it was away learns it only once it is back: a wait that learns it ends at once as `refused` (exit 1) with the reason and the `messageId`, since nothing goes any more |
|
|
158
160
|
| `group typing <group> [--kind typing\|recording\|thinking] [--status "<text>"] [--for s] [--stop]` | `typing` in a private group: the members whose edge is open see "Ana is typing…" (or recording, thinking, or your status line), with the same rules, 6 s hold and `--for` (a one-shot without `--for` reaches nobody and says so in a `note`). Answers `{group, typing, kind, status, reached, sendTyping}` (`reached`: members with an open edge). A community does not carry typing yet (exit 1, `unavailable`) |
|
|
159
161
|
| `identity add <provider> [subject] [--signer id] [--field name=value]… [--stdin] [--days n] [--timeout s]` | A proof: an in-app signer (NIP-46 and the like) finishes here; a tool or a published record answers with the statement; `--timeout` is how long it waits for an approval (300 s). With `--stdin`, fields come as `name=value` lines on stdin, out of `ps` and the shell's history; a `--field` the signer marks secret (a NIP-46 `bunker://` link) is warned about |
|
|
160
162
|
| `identity complete <draft> [--evidence-file f \| --stdin]`, `identity cancel <draft>` | Finish it with the tool's output, from a file, `--stdin` or piped to it (or nothing, for a published record); needs the daemon that began it. Cancel drops one not finished |
|
|
@@ -169,11 +171,11 @@ The rows are in alphabetical order of their first command, and every command of
|
|
|
169
171
|
| `pay <invoice\|address\|lnurl> [--amount sats] [--network n] [--max-fee sats] [--chat <chat>] [--confirm-real]` | Pay over Lightning (Testnet unless `--network mainnet`). `--chat`: the chat the invoice came from, whose contact is told a Testnet invoice was paid, named by the chat's id, its contact's key or a label given here, never only by the contact's own name or a prefix of its id |
|
|
170
172
|
| `payment list [--chat c]`, `payment check <chat> <payment>`, `payment reclaim <payment>` | Payments and requests |
|
|
171
173
|
| `pin <chat\|group> <message> \| --remove [--wait none\|confirmed\|sent] [--timeout s]` | Pin a message at the top of a chat or group, for everyone in it: one per chat, a new pin replaces it; `pin <chat\|group> --remove` unpins (it names no message). In a community only the admin pins. A profile that is not a member of the group any more (removed from it) gets `refused`, with the reason, and nothing is pinned. A 1:1 pin reaches the contact on the next live session; without a daemon `pin` stays until the contact confirmed it (`--wait confirmed`, the default there; `--timeout`, 30 s), and `confirmed` says whether it has. A group has no receipts: without a daemon a group's pin stays until a member's edge (a hub's, in a community) took it (`--wait sent`, the default there), and the answer's `edges` and `sent` say how many did, as for `group react`. The other side hears `chat.pinned` or `group.pinned`. `chat show`, `group show` and `group list` say what is pinned now: `pin: {messageId, ref, by, at}` (`messageId` null when the message is not here), or `pin: null` |
|
|
172
|
-
| `profile backup --out <file>`, `profile restore <file> <new profile>` | A backup (WISP 05 envelope, written and read a piece at a time), encrypted with the passphrase from `--passphrase-file` or `GHOSTLY_BACKUP_PASSPHRASE`. `--no-passphrase` makes one that is not encrypted: the file then holds the profile's keys and wallet secrets in the clear. Neither given, nothing is made. It holds the store, the files, the `group auto` and `call auto` settings and the chats' holds (`chat disconnect --hold`): the restored copy joins and answers by itself as the original did, and a held chat comes back to its live link when its hold ends (at its first start, when that time passed already). `--light` leaves out files over 1 MB (voice messages over 4 MB): their messages stay, and the restored copy says each one is not in this backup |
|
|
174
|
+
| `profile backup --out <file>`, `profile restore <file> <new profile>` | A backup (WISP 05 envelope, written and read a piece at a time), encrypted with the passphrase from `--passphrase-file` (`-` reads it from stdin, e.g. a pipe from a password manager) or `GHOSTLY_BACKUP_PASSPHRASE`. `--no-passphrase` makes one that is not encrypted: the file then holds the profile's keys and wallet secrets in the clear. Neither given, nothing is made. It holds the store, the files, the `group auto` and `call auto` settings and the chats' holds (`chat disconnect --hold`): the restored copy joins and answers by itself as the original did, and a held chat comes back to its live link when its hold ends (at its first start, when that time passed already). `--light` leaves out files over 1 MB (voice messages over 4 MB): their messages stay, and the restored copy says each one is not in this backup |
|
|
173
175
|
| `profile create <name> [--use] [--name <shown>] [--force]`, `profile list`, `profile use <name>` | Profiles |
|
|
174
176
|
| `profile picture <jpeg> \| --clear` | The picture contacts see (a JPEG within 512 px; 128 px is what the app sends) |
|
|
175
177
|
| `profile show`, `profile set [--name <name>] [--share-profile \| --no-share-profile] [--force]` | The name contacts see (up to 64 characters, cleaned as a chat's or a group's name is, and counted once cleaned; empty is no name; a longer `--name`, or one with nothing that shows, is a usage error naming it, as for `profile create --name`; one that looks like a secret needs `--force`) |
|
|
176
|
-
| `react <chat> <message> <emoji> [--remove] [--wait none\|confirmed] [--timeout s]` | React to a message with one emoji; a new one replaces yours, `--remove` takes it back. Without a daemon it stays until the contact confirmed it (`--wait confirmed`, the default there; `--timeout`, 30 s): a one-shot that left at once took the reaction along unsaid. `confirmed` says whether the contact has it |
|
|
178
|
+
| `react <chat> <message> <emoji> [--remove] [--wait none\|confirmed] [--timeout s]` | React to a message with one emoji; a new one replaces yours, `--remove` takes it back. Anything else as `<emoji>` (a word, two emoji) is a usage error (exit 2) before the profile opens. Without a daemon it stays until the contact confirmed it (`--wait confirmed`, the default there; `--timeout`, 30 s): a one-shot that left at once took the reaction along unsaid. `confirmed` says whether the contact has it |
|
|
177
179
|
| `routine send <chat\|group> --name <name> --schedule "every day 01:00" [--cron "0 1 * * *"] [--state active\|paused] [--next <time>] [--run ok\|failed\|skipped[:summary]] [--link url]… [--id id] [--text <text>] [--json json\|-\|file] [--force]`, `routine update <chat\|group> <routine> [fields…]` | A routine card for something a bot runs on a schedule (WISP 405 · Status Cards): its name, schedule (and cron line, shown only), state, last run and result, next run and up to 10 recent runs. `--run` records a run now as the last one; `--next` takes milliseconds or a date within a year (no zone: local time, a bare `2026-09-30` local midnight; `Z` or `+02:00` as given). Updates merge and are paced as `task update`'s, and wait as `task send` and `task update` do. The app shows it, and runs nothing |
|
|
178
180
|
| `saved add\|remove <chat\|group> <message>`, `saved list` | Saved messages: mark a message of a chat or a group to find it again, kept for this profile on this device and never sent (the app shows the same list in its Saved view). `saved list` gives them under `saved`, the last saved first, each as it is now (an edit shows its latest text) with its `chat` or `group` and `savedAt`; a deleted message drops out |
|
|
179
181
|
| `send <chat> [text…] [--reply <message>] [--button id:Label]… [--style id=primary\|neutral\|danger]… [--once] [--id id] [--stdin] [--force] [--wait none\|sent\|delivered] [--timeout s]` | Send text (arguments, or stdin); `--reply` quotes a message of the chat. `--button yes:Yes` (1 to 6; the id ends at the first colon; no two labels alike ignoring case and spaces, and no label that is another button's id, else exit 2) puts buttons under the text, which is the question and what older apps show, so say how to answer in words. `--once`: one answer a person. A question that goes on the DHT floor or into a hold (the contact's app closed) reaches them as text alone; the engine sends its buttons again once the chat is live, as an edit of the buttons alone (no `message.edited` for it). The answer adds `buttons` (the question's id, `ask-…` unless `--id`), `card`, and `pressable`: whether the contact's app shows buttons (null until it says). A press comes back as `button.pressed` ([Events](#events)) |
|
|
@@ -181,8 +183,8 @@ The rows are in alphabetical order of their first command, and every command of
|
|
|
181
183
|
| `service peer <chat>`, `service open <chat> <service> [--port p]`, `service close <chat> <service>` | A contact's app on a loopback port here (daemon). `url` is a link for your browser, `http://<random>.localhost:<port>/.ghostly-open/<token>`: it sets the service's cookie and shows the app on a host name of its own; any other host name, or a request without that cookie, gets 404. Chrome, Edge and curl reach `*.localhost` names by themselves; Safari and Node's `fetch` on macOS may not (add the name to `/etc/hosts` for them). With Hide my IP from contacts on, `service open` fails with `unavailable`: a browser tab cannot keep the app's page off WebRTC |
|
|
182
184
|
| `settings get [--show-secret]`, `settings set <key> <json> [--force]` | Relays, Iroh relays, the HyperDHT relay, ICE servers, `sendTyping` (false: contacts are never told you type), `daemonPresence` (true: while a daemon runs the profile, contacts see it online, WISP 401 § Presence and status; off by default, so a bot is never shown online unless you turn it on), … `settings get` shows every key `settings set` takes with its value in effect (one never set as its default: `sendTyping: true`, the default Iroh relays). `<json>` as `-`, or none on a pipe, is read from stdin: a TURN password stays out of `ps` |
|
|
183
185
|
| `status` | The profile, its chats, whether WebRTC and calls run, the last event seq |
|
|
184
|
-
| `status set [text…] [--emoji <emoji>] [--availability available\|busy\|away\|dnd] [--until <time>] [--force]`, `status show`, `status clear` | The status your paired contacts see (WISP 401 § Presence and status): a text of up to 60 characters on one line (no links or markup), one emoji, an availability (`dnd` is Do not disturb) and when it ends by itself: `--until 30m`, `2h` or `1d` from now, or milliseconds or a date within a year, written as `routine send --next` takes it. A new `set` replaces the whole status. A text too long or with a link, a word that is not one emoji, or a time already past is a usage error (exit 2) that names it, before the profile opens. The socket's `status.set` takes `until` in milliseconds and holds it to the same year (`bad_request`). All three answer `{"status": {"text", "emoji", "availability", "until"}}` (a field not set is null) or `{"status": null}` when there is none. A daemon tells every contact whose app offers `status/1` at once; without one the status is kept here and said on each chat's next live session. Plain `status` is unchanged.
|
|
185
|
-
| `store sign <index> --key <file> [--out <dir>]` | Sign a store index (WISP 1200 · Stores) with the store key file (kept offline; made when missing, the index names no `key` and no signed index is in the output folder): writes `ghostly-store.json`, canonical, and `ghostly-store.sig` beside the index or in `--out`. Refused, with the reason, when a client would refuse the index (`expires` more than 90 days ahead, a bad field), or when the index already there has a higher `sequence` (`rollback`), the same one with other content (`equivocation`), or is signed by another key (`store-key`: another store is another `--out`), or when a `ghostly-store.json` or `ghostly-store.sig` there does not read as a signed index (move them away, or name another `--out`) |
|
|
186
|
+
| `status set [text…] [--emoji <emoji>] [--availability available\|busy\|away\|dnd] [--until <time>] [--force]`, `status show`, `status clear` | The status your paired contacts see (WISP 401 § Presence and status): a text of up to 60 characters on one line (no links or markup), one emoji, an availability (`dnd` is Do not disturb) and when it ends by itself: `--until 30m`, `2h` or `1d` from now, or milliseconds or a date within a year, written as `routine send --next` takes it. A new `set` replaces the whole status. A text too long or with a link, a word that is not one emoji, or a time already past is a usage error (exit 2) that names it, before the profile opens. The socket's `status.set` takes `until` in milliseconds and holds it to the same year (`bad_request`). All three answer `{"status": {"text", "emoji", "availability", "until"}}` (a field not set is null) or `{"status": null}` when there is none. A daemon tells every contact whose app offers `status/1` at once; without one the status is kept here and said on each chat's next live session. Plain `status` is unchanged. These commands never say presence (online or idle): only a daemon does, and only with `settings set daemonPresence true`; a profile restored from an app with "Share when I'm online" off (`sharePresence: false`, not a key `settings set` takes) says none even then |
|
|
187
|
+
| `store sign <index> --key <file> [--out <dir>]` | Sign a store index (WISP 1200 · Stores) with the store key file (kept offline; made when missing, the index names no `key` and no signed index is in the output folder): writes `ghostly-store.json`, canonical, and `ghostly-store.sig` beside the index or in `--out`. Refused, with the reason, when a client would refuse the index (`expires` more than 90 days ahead, a bad field), or when the index already there has a higher `sequence` (`rollback`), the same one with other content (`equivocation`), or is signed by another key (`store-key`: another store is another `--out`), or when a `ghostly-store.json` or `ghostly-store.sig` there does not read as a signed index (move them away, or name another `--out`), or when `--key` is inside the output folder, which is published (`private-key`: keep the store key outside it, and outside its repository) |
|
|
186
188
|
| `task send <chat\|group> --title <title> [--status s] [--progress n \| --steps a/b] [--step "…"] [--item state:text]… [--pr-url url --pr-number n --additions n --deletions n --files n --pr-state s --pr-checks c] [--branch b] [--tag label]… [--parent task] [--link url]… [--id id] [--text <text>] [--json json\|-\|file] [--force]`, `task update <chat\|group> <task> [fields…]` | A task card for a bot's work (WISP 405 · Status Cards): a title, a status (queued, running, blocked, done, failed, cancelled), progress, the step it is on, up to 20 steps or log lines (`--item done:Codec`; the card holds at most 8 KiB in all, so 20 long items of non-Latin text are past it; a lowercase word before the colon must be an item state: pending, running, done, failed or skipped) and its pull request, shown as a small card that apps without cards read as text. Optional, and ignored by apps from before them: where the pull request stands (`--pr-state draft`, `open`, `merged` or `closed`; an open one puts the task in the board's Review column) and its checks (`--pr-checks passing`, `failing` or `pending`), up to 3 tags of 24 characters (`--tag core --tag web`; an update's tags replace the card's), and `--parent <task>`, a task of yours in the same chat that this one is a part of (sent first; its parts stack under it on the board). `send` prints the task's id and message; `update` merges the fields given over the card (an update's `--item` list replaces the card's: give all of them) and edits its message, at most once per 2.5 s (sooner updates merge into the next). `--json` takes the whole card; `null` in it removes a field. Without a daemon a card in a chat stays until it went out: `send` until it is sent (`--wait sent`), `update` until the contact confirmed it (`--wait confirmed`), up to `--timeout` (30 s, then exit 4: it goes with the next command); `--wait none` answers at once, as a daemon and a group do by default. Only the CLI sends cards: the app shows them |
|
|
187
189
|
| `typing <chat> [--kind typing\|recording\|thinking] [--status "<text>"] [--for s] [--stop]` | Show the contact you are writing, recording or thinking, or a short status line in its place ("Transcribing your audio…", 40 characters, no links): live chats only, it holds 6 s there; `--for s` keeps it on that long (up to 600 s; a one-shot stays that long once the chat is live, and stops with `live: false` when it is not live within 15 s; a one-shot without it reaches nobody, so it answers at once with a `note` saying so); a new kind or status shows at once; a message to the chat or `--stop` ends it |
|
|
188
190
|
| `usage send [<chat\|group>] [--all] --left <percent> [--window "5 h"] [--resets <time>] [--label Claude] [--account <name>] [--also week=80@<time>]… [--used n --limit n] [--id id] [--text <text>] [--json json\|-\|file] [--force]` | How much of a quota the bot has left (WISP 405 § Usage): the percent (or `--used` of `--limit`), what it is of, the account, the window, when it resets, and up to 3 other windows (`--also week=80@2026-10-10T00:00:00Z`); `--resets` and `@` take milliseconds or a date within a year (no zone: local time, a bare date local midnight). The app shows a small meter on the chat's row and in its header, amber under 20%, red under 5%, muted once 6 h old or past the reset. One card per chat: the first report sends it, later ones edit it in place (quiet, paced as `task update`'s); each report is whole, so a field it leaves out goes. Without a daemon a report in a chat stays until it went out (`--wait sent`: the first sent, a later one confirmed by the contact), up to `--timeout`; `--wait none` answers at once. `--all` reports to every 1:1 chat with a contact. See [docs/AI-AGENTS.md](../../docs/AI-AGENTS.md#reporting-usage) for where a bot gets its numbers |
|
|
@@ -242,7 +244,8 @@ is on in the chat is refused (`busy`): hang the call up first. `chat connect`, o
|
|
|
242
244
|
hold is kept in the profile folder, and a `profile backup` carries it: a daemon that restarts (or a restored copy
|
|
243
245
|
that starts) takes it back when its time is up, and a DHT only the chat had chosen itself (`chat transport dht`) is
|
|
244
246
|
never undone by it. A `chat transport` chosen during a hold ends the
|
|
245
|
-
hold (`lifted`) and stays as chosen
|
|
247
|
+
hold (`lifted`) and stays as chosen, as does the engine's own `setChatTransport` or `setDeliveryMode` (`ghostly
|
|
248
|
+
engine`); `chat remove`, or `engine removeLink`, drops it with the chat. Several chats held at once each keep their
|
|
246
249
|
own hold. `chat show` answers `heldUntil` (a time in ms, or
|
|
247
250
|
null; `hold` there is the store-and-forward state, something else), and the stream says `chat.held` and
|
|
248
251
|
`chat.released` (`reason`: expired, connect or lifted).
|
|
@@ -332,7 +335,7 @@ chat (`chat list`, `chat show`, `chat rename`, …) and `engine getState` print
|
|
|
332
335
|
Dedupe by `id`; resume with `--since <seq>`, or let `--cursor <file>` remember the last event handled. A cursor
|
|
333
336
|
file that holds no event number (empty, edited by hand) is refused at start (`bad_request`, naming the file): fix or
|
|
334
337
|
remove it, or give `--since`.
|
|
335
|
-
- Types: `daemon.started`, `chat.created`, `chat.removed
|
|
338
|
+
- Types: `daemon.started`, `chat.created`, `chat.removed` (`peer`: the contact's key, once paired), `chat.renamed`, `chat.pairing` (`stage`: publishing,
|
|
336
339
|
waiting, resolving, on-dht, live, …), `chat.connection` (`live`, `transport`), `typing.started` (with `kind` and, when given, `status`; again when either changes) and `typing.stopped` (the contact is writing, or stopped: a message, a stop, or 6 s of silence; live only, as `group.typing.*`: never in the journal, so `--since` does not replay them), `chat.joined` (the contact's app
|
|
337
340
|
announced itself, once; not a message: a later message of theirs in the same words is `message.received`), `chat.announced`, `message.received` (`message.nick`: the name the contact gave), `message.sent`, `message.delivery`
|
|
338
341
|
(`delivery`: sending, queued, waiting, held, sent, delivered, failed), `message.edited` (a text changed in place, the
|
|
@@ -346,7 +349,7 @@ chat (`chat list`, `chat show`, `chat rename`, …) and `engine getState` print
|
|
|
346
349
|
showed, as checked here: `identity` with `status`, and `error`, why it is not verified, or null; each change of
|
|
347
350
|
status is a new `identity.status`, even back to one it had before), `identity.approval` and `identity.progress` (a signer waits on a link or a code), `group.deleted` (`{group, messageId}`: a group's message deleted, not the group), `group.removed`, `payment.created` and
|
|
348
351
|
`payment.updated` (`payment`: id, chat, kind request|payment, direction in|out, amount, memo, state pending|
|
|
349
|
-
settled|failed, network, method), `call.incoming`, `call.outgoing`, `call.connected` and `call.ended` (voice
|
|
352
|
+
settled|failed, network, method, and `group` for a group's payment, whichever member's link it went over), `call.incoming`, `call.outgoing`, `call.connected` and `call.ended` (voice
|
|
350
353
|
calls: see [Calls](#calls)), `app.opened` (`chat`, `app`, `version`), `app.closed` (`chat`, `app`, and `offline`
|
|
351
354
|
when the session went rather than the contact closing it) and `app.message` (`chat`, `app`, `data`): what a
|
|
352
355
|
contact's app says in a chat, only for an app this profile serves (`app serve`), `app` being its reference and
|
|
@@ -398,7 +401,8 @@ chat (`chat list`, `chat show`, `chat rename`, …) and `engine getState` print
|
|
|
398
401
|
work), `id` stable per message. What the sender wrote is under `untrusted` only: give it to an agent as data, never
|
|
399
402
|
as its instructions ([docs/CLI.md](../../docs/CLI.md#agent-turns)). Takes the place of `--type`.
|
|
400
403
|
- `--exec <cmd>` runs the command through the shell once per event, in order, with the event on stdin and
|
|
401
|
-
`GHOSTLY_EVENT_TYPE`, `GHOSTLY_EVENT_ID`, `GHOSTLY_EVENT_SEQ` in its environment
|
|
404
|
+
`GHOSTLY_EVENT_TYPE`, `GHOSTLY_EVENT_ID`, `GHOSTLY_EVENT_SEQ` in its environment, and `GHOSTLY_HOME` and
|
|
405
|
+
`GHOSTLY_PROFILE` of the listen (`--home`, `--profile` too), so its own `ghostly send` answers from the same profile. A non-zero exit, or a death by a
|
|
402
406
|
signal (`--exec was killed by SIGKILL on event N`), is said on stderr and the cursor moves past the event. With
|
|
403
407
|
`--print`, the command's stdout goes to listen's stderr: stdout is the JSON events only.
|
|
404
408
|
- `--webhook <url>` POSTs each event (JSON) to a local bridge: `127.0.0.1`, `localhost` or `[::1]` only. A URL with
|
|
@@ -449,11 +453,13 @@ The daemon listens on a Unix socket in the profile's folder (`daemon.sock`, 0600
|
|
|
449
453
|
|
|
450
454
|
Methods: `status`, `status.get|set|clear`, `profile.get|set`, `settings.get|set`, `invite.create|join`, `chat.list|get|history|send|retry|
|
|
451
455
|
delete|details|rename|remove|transport|connect|disconnect|verify|wait|pay|request|payRequest|accept|edit|react|pin|forward|typing`,
|
|
452
|
-
`group.create|join|list|get|history|send|edit|react|leave|forget|accept|decline`, `wallet.list|create|remove|faucet|history|
|
|
456
|
+
`group.create|join|list|get|history|send|edit|react|leave|forget|accept|decline|typing|auto`, `wallet.list|create|remove|faucet|history|
|
|
453
457
|
receive|address|redeem`, `wallet.mint.add`, `lightning.default|rename`, `pay`, `payment.list|check|reclaim`,
|
|
454
|
-
`file.send|list|action|wait|save`, `group.invite|remove|admin|rotate|link|picture|hub`, `profile.picture|backup`,
|
|
455
|
-
`
|
|
456
|
-
`
|
|
458
|
+
`file.send|list|action|wait|save`, `group.invite|remove|admin|rotate|link|picture|hub|rename`, `profile.picture|backup`,
|
|
459
|
+
`saved.add|list|remove`, `button.press|update`, `task.send|update`, `routine.send|update`, `usage.send`,
|
|
460
|
+
`identity.providers|list|add|complete|cancel|remove|share|withdraw|contact|recheck`, `x401.key.new`,
|
|
461
|
+
`x401.credential.add|list|remove`, `service.list|add|remove|enable|share|peer|open|close`,
|
|
462
|
+
`app.open|close|send|serve|served|unserve`, `call.start|answer|hangup|list|get|flush|auto`,
|
|
457
463
|
`events.replay`, `events.subscribe`, `daemon.stop`, `daemon.hello`, and `engine.call` with
|
|
458
464
|
`{"method":"<engine call>","params":{…},"confirmReal":false,"yes":false}` for anything else the app does. Parameters are the
|
|
459
465
|
commands' (see `src/api.ts`). Errors: `{"id":…,"error":{"code","message","details"?}}` with the codes above.
|
package/SKILL.md
CHANGED
|
@@ -140,7 +140,9 @@ ghostly listen --turns --from alice --group team --cursor ~/.ghostly/agent.curso
|
|
|
140
140
|
Anyone else's message stays in the chat and never reaches the hook. `--group` alone lets no 1:1 chat through, and
|
|
141
141
|
`--from` alone no group. Names are turned into ids once, when `listen` starts. Everyone on it can try to steer the
|
|
142
142
|
agent: an agent with tools gets `--from owner` only (step 11).
|
|
143
|
-
- `--exec '<command>'` runs once per turn, in order, with the turn on **stdin** (never in its arguments).
|
|
143
|
+
- `--exec '<command>'` runs once per turn, in order, with the turn on **stdin** (never in its arguments). It gets
|
|
144
|
+
`GHOSTLY_PROFILE` and `GHOSTLY_HOME` of the listen (`--profile` and `--home` too), so the hook's `ghostly send`
|
|
145
|
+
answers from the same profile. Or
|
|
144
146
|
`--webhook http://127.0.0.1:<port>/…` POSTs each turn to a local bridge (loopback only).
|
|
145
147
|
- `--cursor <file>` remembers the last event handled, so a restarted listener resumes where it stopped. Dedupe on `id`.
|
|
146
148
|
A `--webhook` bridge that is down holds the stream until it is back (nothing is lost); an `--exec` that exits
|
|
@@ -206,7 +208,7 @@ ghostly typing alice --kind thinking --status "Transcribing your audio" --for 12
|
|
|
206
208
|
ghostly file send alice ./answer.ogg --voice --reply <message id> # a voice note: length and waveform from the file
|
|
207
209
|
ghostly file send alice ./note.m4a --voice 4200 # or its length given in ms (AAC needs ffmpeg for the waveform)
|
|
208
210
|
ghostly file send alice ./report.pdf # a file (no daemon: stays until alice has all of it)
|
|
209
|
-
ghostly file wait <file id> --timeout 120 # exit 0 when done, 1 when it failed, 4 on timeout
|
|
211
|
+
ghostly file wait <file id> --timeout 120 # exit 0 when done, 1 when it failed, 4 on timeout, 5 when it waits for file accept
|
|
210
212
|
ghostly file accept <file id> # a file over 25 MiB waits for this (file.offered event)
|
|
211
213
|
```
|
|
212
214
|
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as hideStateSecrets, c as settingsInEffect, i as groupSendRefused, n as SETTABLE, o as mentionsFor, r as callApi, s as redactSettings, t as API_METHODS } from "./api-
|
|
1
|
+
import { P as startNamedChats, l as findGroup, s as findChat } from "./apiKit-CfsNx9ZR.js";
|
|
2
|
+
import { a as hideStateSecrets, c as settingsInEffect, i as groupSendRefused, n as SETTABLE, o as mentionsFor, r as callApi, s as redactSettings, t as API_METHODS } from "./api-MYc6QNRs.js";
|
|
3
3
|
export { API_METHODS, SETTABLE, callApi, findChat, findGroup, groupSendRefused, hideStateSecrets, mentionsFor, redactSettings, settingsInEffect, startNamedChats };
|