]> nmode's Git Repositories - signal-cli/blob - man/signal-cli.1.adoc
Implement sendPayment notification command
[signal-cli] / man / signal-cli.1.adoc
1 /////
2 vim:set ts=4 sw=4 tw=82 noet:
3 /////
4
5 :quotes.~:
6
7 = signal-cli (1)
8
9 == Name
10
11 signal-cli - A commandline interface for the Signal messenger
12
13 == Synopsis
14
15 *signal-cli* [--config CONFIG] [-h | -v | -a ACCOUNT | --dbus | --dbus-system] command [command-options]
16
17 == Description
18
19 signal-cli is a commandline interface for libsignal-service-java.
20 It supports registering, verifying, sending and receiving messages.
21 For registering you need a phone number where you can receive SMS or incoming calls.
22 signal-cli was primarily developed to be used on servers to notify admins of important events.
23 For this use-case, it has a dbus and a JSON-RPC interface, that can be used to send messages from other programs.
24
25 For some functionality the Signal protocol requires that all messages have been received from the server.
26 The `receive` command should be regularly executed.
27 In daemon mode messages are continuously received.
28
29 == Options
30
31 *-h*, *--help*::
32 Show help message and quit.
33
34 *-v*, *--version*::
35 Print the version and quit.
36
37 *--verbose*::
38 Raise log level and include lib signal logs.
39
40 *--log-file* LOG_FILE::
41 Write log output to the given file.
42 If `--verbose` is also given, the detailed logs will only be written to the log file.
43
44 *--config* CONFIG::
45 Set the path, where to store the config.
46 Make sure you have full read/write access to the given directory.
47 (Default: `$XDG_DATA_HOME/signal-cli` (`$HOME/.local/share/signal-cli`))
48
49 *-a* ACCOUNT, *--account* ACCOUNT::
50 Specify your phone number, that will be your identifier.
51 The phone number must include the country calling code, i.e. the number must start with a "+" sign.
52
53 This flag must not be given for the `link` command.
54 It is optional for the `daemon` command.
55 For all other commands it is only optional if there is exactly one local user in the config directory.
56
57 *--service-environment* ENVIRONMENT::
58 Choose the server environment to use:
59
60 - `live` (default)
61 - `staging`
62
63 *--dbus*::
64 Make request via user dbus.
65
66 *--dbus-system*::
67 Make request via system dbus.
68
69 *-o* OUTPUT-MODE, *--output* OUTPUT-MODE::
70 Specify if you want commands to output in either "plain-text" mode or in "json".
71 Defaults to "plain-text"
72
73 *--trust-new-identities* TRUST-MODE::
74 Choose when to trust new identities:
75 - `on-first-use` (default): Trust the first seen identity key from new users, changed keys must be verified manually
76 - `always`: Trust any new identity key without verification
77 - `never`: Don't trust any unknown identity key, every key must be verified manually
78
79 == Commands
80
81 === register
82
83 Register a phone number with SMS or voice verification.
84 Use the verify command to complete the verification.
85
86 If the account is just deactivated, the register command will just reactivate account, without requiring an SMS verification.
87 By default the unregister command just deactivates the account, in which case it can be reactivated without sms verification if the local data is still available.
88 If the account was deleted (with --delete-account) it cannot be reactivated.
89
90 *-v*, *--voice*::
91 The verification should be done over voice, not SMS.
92
93 *--captcha*::
94 The captcha token, required if registration failed with a captcha required error.
95 To get the token, go to https://signalcaptchas.org/registration/generate.html
96 For the staging environment, use: https://signalcaptchas.org/staging/registration/generate.html
97 Check the developer tools for a redirect starting with signalcaptcha:// Everything after signalcaptcha:// is the captcha token.
98
99 === verify
100
101 Verify the number using the code received via SMS or voice.
102
103 VERIFICATIONCODE::
104 The verification code.
105
106 *-p* PIN, *--pin* PIN::
107 The registration lock PIN, that was set by the user.
108 Only required if a PIN was set.
109
110 === unregister
111
112 Disable push support for this device, i.e. this device won't receive any more messages.
113 If this is the master device, other users can't send messages to this number anymore.
114 Use "updateAccount" to undo this.
115 To remove a linked device, use "removeDevice" from the master device.
116
117 *--delete-account*::
118 Delete account completely from server.
119 Cannot be undone without loss.
120 You will have to be readded to each group.
121
122 CAUTION: Only delete your account if you won't use this number again!
123
124 === deleteLocalAccountData
125
126 Delete all local data for this account.
127 Data should only be deleted if the account is unregistered.
128
129 CAUTION: This cannot be undone.
130
131 *--ignore-registered*::
132 Delete the account data even though the account is still registered on the Signal servers.
133
134 === updateAccount
135
136 Update the account attributes on the signal server.
137 Can fix problems with receiving messages.
138
139 *-n* NAME, *--device-name* NAME::
140 Set a new device name for the main or linked device
141
142 === updateConfiguration
143
144 Update signal configs and sync them to linked devices.
145 This command only works on the main devices.
146
147 *--read-receipts* {true,false}::
148 Indicates if Signal should send read receipts.
149
150 *--unidentified-delivery-indicators* {true,false}::
151 Indicates if Signal should show unidentified delivery indicators.
152
153 *--typing-indicators* {true,false}::
154 Indicates if Signal should send/show typing indicators.
155
156 *--link-previews* {true,false}::
157 Indicates if Signal should generate link previews.
158
159 === setPin
160
161 Set a registration lock pin, to prevent others from registering this number.
162
163 REGISTRATION_LOCK_PIN::
164 The registration lock PIN, that will be required for new registrations (resets after 7 days of inactivity)
165
166 === removePin
167
168 Remove the registration lock pin.
169
170 === link
171
172 Link to an existing device, instead of registering a new number.
173 This shows a "sgnl://linkdevice?uuid=..." URI.
174 If you want to connect to another signal-cli instance, you can just use this URI.
175 If you want to link to an Android/iOS device, create a QR code with the URI (e.g. with qrencode) and scan that in the Signal app.
176
177 *-n* NAME, *--name* NAME::
178 Optionally specify a name to describe this new device.
179 By default "cli" will be used.
180
181 === addDevice
182
183 Link another device to this device.
184 Only works, if this is the master device.
185
186 *--uri* URI::
187 Specify the uri contained in the QR code shown by the new device.
188 You will need the full URI such as "sgnl://linkdevice?uuid=..." (formerly "tsdevice:/?uuid=...") Make sure to enclose it in quotation marks for shells.
189
190 === listDevices
191
192 Show a list of linked devices.
193
194 === removeDevice
195
196 Remove a linked device.
197 Only works, if this is the master device.
198
199 *-d* DEVICE_ID, *--device-id* DEVICE_ID::
200 Specify the device you want to remove.
201 Use listDevices to see the deviceIds.
202
203 === getUserStatus
204
205 Uses a list of phone numbers to determine the statuses of those users.
206 Shows if they are registered on the Signal Servers or not.
207 In json mode this is outputted as a list of objects.
208
209 [NUMBER [NUMBER ...]]::
210 One or more numbers to check.
211
212 === send
213
214 Send a message to another user or group.
215
216 RECIPIENT::
217 Specify the recipients’ phone number.
218
219 *--note-to-self*::
220 Send the message to self without notification.
221
222 *-g* GROUP, *--group-id* GROUP::
223 Specify the recipient group ID in base64 encoding.
224
225 *-m* MESSAGE, *--message* MESSAGE::
226 Specify the message.
227 Currently, signal-cli reads the message from stdin if `-m` is missing, but this will change in a future version and the explicit flag `--message-from-stdin` should be used instead.
228
229 *--message-from-stdin*::
230 Read the message from standard input.
231
232 *-a* [ATTACHMENT [ATTACHMENT ...]], *--attachment* [ATTACHMENT [ATTACHMENT ...]]::
233 Add one or more files as attachment.
234
235 *--sticker* STICKER::
236 Send a sticker of a locally known sticker pack (syntax: stickerPackId:stickerId).
237 Shouldn't be used together with `-m` as the official clients don't support this.
238 e.g.: `--sticker 00abac3bc18d7f599bff2325dc306d43:2`
239
240 *--mention*::
241 Mention another group member (syntax: start:length:recipientNumber) In the apps the mention replaces part of the message text, which is specified by the start and length values.
242 e.g.: `-m "Hi X!" --mention "3:1:+123456789"`
243
244 *--quote-timestamp*::
245 Specify the timestamp of a previous message with the recipient or group to add a quote to the new message.
246
247 *--quote-author*::
248 Specify the number of the author of the original message.
249
250 *--quote-message*::
251 Specify the message of the original message.
252
253 *--quote-mention*::
254 Specify the mentions of the original message (same format as `--mention`).
255
256 *-e*, *--end-session*::
257 Clear session state and send end session message.
258
259 === sendPaymentNotification
260
261 Send a payment notification.
262
263 RECIPIENT::
264 Specify the recipient’s phone number.
265
266 *--receipt* RECEIPT::
267 The base64 encoded receipt blob.
268
269 *--note* NOTE::
270 Specify a note for the payment notification.
271
272 === sendReaction
273
274 Send reaction to a previously received or sent message.
275
276 RECIPIENT::
277 Specify the recipients’ phone number.
278
279 *-g* GROUP, *--group-id* GROUP::
280 Specify the recipient group ID in base64 encoding.
281
282 *-e* EMOJI, *--emoji* EMOJI::
283 Specify the emoji, should be a single unicode grapheme cluster.
284
285 *-a* NUMBER, *--target-author* NUMBER::
286 Specify the number of the author of the message to which to react.
287
288 *-t* TIMESTAMP, *--target-timestamp* TIMESTAMP::
289 Specify the timestamp of the message to which to react.
290
291 *-r*, *--remove*::
292 Remove a reaction.
293
294 === sendReceipt
295
296 Send a read or viewed receipt to a previously received message.
297
298 RECIPIENT::
299 Specify the sender’s phone number.
300
301 *-t* TIMESTAMP, *--target-timestamp* TIMESTAMP::
302 Specify the timestamp of the message to which to react.
303
304 *--type* TYPE::
305 Specify the receipt type, either `read` (the default) or `viewed`.
306
307 === sendTyping
308
309 Send typing message to trigger a typing indicator for the recipient.
310 Indicator will be shown for 15seconds unless a typing STOP message is sent first.
311
312 RECIPIENT::
313 Specify the recipients’ phone number.
314
315 *-g* GROUP, *--group-id* GROUP::
316 Specify the recipient group ID in base64 encoding.
317
318 *-s*, *--stop*::
319 Send a typing STOP message.
320
321 === remoteDelete
322
323 Remotely delete a previously sent message.
324
325 RECIPIENT::
326 Specify the recipients’ phone number.
327
328 *-g* GROUP, *--group-id* GROUP::
329 Specify the recipient group ID in base64 encoding.
330
331 *-t* TIMESTAMP, *--target-timestamp* TIMESTAMP::
332 Specify the timestamp of the message to delete.
333
334 === receive
335
336 Query the server for new messages.
337 New messages are printed on standard output and attachments are downloaded to the config directory.
338 In json mode this is outputted as one json object per line.
339
340 *-t* TIMEOUT, *--timeout* TIMEOUT::
341 Number of seconds to wait for new messages (negative values disable timeout).
342 Default is 5 seconds.
343 *--ignore-attachments*::
344 Don’t download attachments of received messages.
345
346 === joinGroup
347
348 Join a group via an invitation link.
349
350 *--uri*::
351 The invitation link URI (starts with `https://signal.group/#`)
352
353 === updateGroup
354
355 Create or update a group.
356 If the user is a pending member, this command will accept the group invitation.
357
358 *-g* GROUP, *--group-id* GROUP::
359 Specify the recipient group ID in base64 encoding.
360 If not specified, a new group with a new random ID is generated.
361
362 *-n* NAME, *--name* NAME::
363 Specify the new group name.
364
365 *-d* DESCRIPTION, *--description* DESCRIPTION::
366 Specify the new group description.
367
368 *-a* AVATAR, *--avatar* AVATAR::
369 Specify a new group avatar image file.
370
371 *-m* [MEMBER [MEMBER ...]], *--member* [MEMBER [MEMBER ...]]::
372 Specify one or more members to add to the group.
373
374 *-r* [MEMBER [MEMBER ...]], *--remove-member* [MEMBER [MEMBER ...]]::
375 Specify one or more members to remove from the group
376
377 *--admin* [MEMBER [MEMBER ...]]::
378 Specify one or more members to make a group admin
379
380 *--remove-admin* [MEMBER [MEMBER ...]]::
381 Specify one or more members to remove group admin privileges
382
383 *--ban* [MEMBER [MEMBER ...]]::
384 Specify one or more members to ban from joining the group.
385 Banned members cannot join or request to join via a group link.
386
387 *--unban* [MEMBER [MEMBER ...]]::
388 Specify one or more members to remove from the ban list
389
390 *--reset-link*::
391 Reset group link and create new link password
392
393 *--link* LINK_STATE::
394 Set group link state: `enabled`, `enabled-with-approval`, `disabled`
395
396 *--set-permission-add-member* PERMISSION::
397 Set permission to add new group members: `every-member`, `only-admins`
398
399 *--set-permission-edit-details* PERMISSION::
400 Set permission to edit group details: `every-member`, `only-admins`
401
402 *--set-permission-send-messages* PERMISSION::
403 Set permission to send messages in group: `every-member`, `only-admins`
404 Groups where only admins can send messages are also called announcement groups
405
406 *-e* EXPIRATION_SECONDS, *--expiration* EXPIRATION_SECONDS::
407 Set expiration time of messages (seconds).
408 To disable expiration set expiration time to 0.
409
410 === quitGroup
411
412 Send a quit group message to all group members and remove self from member list.
413 If the user is a pending member, this command will decline the group invitation.
414
415 *-g* GROUP, *--group-id* GROUP::
416 Specify the recipient group ID in base64 encoding.
417
418 *--delete*::
419 Delete local group data completely after quitting group.
420
421 === listGroups
422
423 Show a list of known groups and related information.
424 In json mode this is outputted as an list of objects and is always in detailed mode.
425
426 *-d*, *--detailed*::
427 Include the list of members of each group and the group invite link.
428
429 *-g*, *--group-id*::
430 Filter the group list by one or more group IDs.
431
432 === listContacts
433
434 Show a list of known contacts with names and profiles.
435 When a specific recipient is given, its profile will be refreshed.
436
437 RECIPIENT::
438 Specify the recipients’ phone number.
439
440 *-a*, *--all-recipients*::
441 Include all known recipients, not only contacts.
442
443 *--blocked*::
444 Specify if only blocked or unblocked contacts should be shown (default: all contacts)
445
446 *--name*::
447 Find contacts with the given contact or profile name.
448
449 === listIdentities
450
451 List all known identity keys and their trust status, fingerprint and safety number.
452
453 *-n* NUMBER, *--number* NUMBER::
454 Only show identity keys for the given phone number.
455
456 === trust
457
458 Set the trust level of a given number.
459 The first time a key for a number is seen, it is trusted by default (TOFU).
460 If the key changes, the new key must be trusted manually.
461
462 number::
463 Specify the phone number, for which to set the trust.
464
465 *-a*, *--trust-all-known-keys*::
466 Trust all known keys of this user, only use this for testing.
467
468 *-v* VERIFIED_SAFETY_NUMBER, *--verified-safety-number* VERIFIED_SAFETY_NUMBER::
469 Specify the safety number of the key, only use this option if you have verified the safety number.
470 Can be either the plain text numbers shown in the app or the bytes from the QR-code, encoded as base64.
471
472 === updateProfile
473
474 Update the profile information shown to message recipients.
475 The profile is stored encrypted on the Signal servers.
476 The decryption key is sent with every outgoing messages to contacts and included in every group.
477
478 *--given-name* NAME, *--name* NAME::
479 New (given) name.
480
481 *--family-name* FAMILY_NAME::
482 New family name.
483
484 *--about* ABOUT_TEXT::
485 New profile status text.
486
487 *--about-emoji* EMOJI::
488 New profile status emoji.
489
490 *--avatar* AVATAR_FILE::
491 Path to the new avatar image file.
492
493 *--remove-avatar*::
494 Remove the avatar
495
496 === updateContact
497
498 Update the info associated to a number on our contact list.
499 This change is only local but can be synchronized to other devices by using `sendContacts` (see below).
500 If the contact doesn't exist yet, it will be added.
501
502 NUMBER::
503 Specify the contact phone number.
504
505 *-n*, *--name*::
506 Specify the new name for this contact.
507
508 *-e*, *--expiration* EXPIRATION_SECONDS::
509 Set expiration time of messages (seconds).
510 To disable expiration set expiration time to 0.
511
512 === removeContact
513
514 Remove the info of a given contact
515
516 NUMBER::
517 Specify the contact phone number.
518
519 *--forget*::
520 Delete all data associated with this contact, including identity keys and sessions.
521
522 === block
523
524 Block the given contacts or groups (no messages will be received).
525 This change is only local but can be synchronized to other devices by using `sendContacts` (see below).
526
527 [CONTACT [CONTACT ...]]::
528 Specify the phone numbers of contacts that should be blocked.
529
530 *-g* [GROUP [GROUP ...]], *--group-id* [GROUP [GROUP ...]]::
531 Specify the group IDs that should be blocked in base64 encoding.
532
533 === unblock
534
535 Unblock the given contacts or groups (messages will be received again).
536 This change is only local but can be synchronized to other devices by using `sendContacts` (see below).
537
538 [CONTACT [CONTACT ...]]::
539 Specify the phone numbers of contacts that should be unblocked.
540
541 *-g* [GROUP [GROUP ...]], *--group-id* [GROUP [GROUP ...]]::
542 Specify the group IDs that should be unblocked in base64 encoding.
543
544 === sendContacts
545
546 Send a synchronization message with the local contacts list to all linked devices.
547 This command should only be used if this is the master device.
548
549 === sendSyncRequest
550
551 Send a synchronization request message to the master device (for group, contacts, ...).
552 The master device will respond with synchronization messages with full contact and group lists.
553
554 === uploadStickerPack
555
556 Upload a new sticker pack, consisting of a manifest file and the sticker images.
557 Images must conform to the following specification: (see https://support.signal.org/hc/en-us/articles/360031836512-Stickers#sticker_reqs )
558
559 - Static stickers in PNG or WebP format
560 - Animated stickers in APNG format,
561 - Maximum file size for a sticker file is 300KiB
562 - Image resolution of 512 x 512 px
563
564 The required manifest.json has the following format:
565
566 [source,json]
567 ----
568 {
569 "title": "<STICKER_PACK_TITLE>",
570 "author": "<STICKER_PACK_AUTHOR>",
571 "cover": { // Optional cover, by default the first sticker is used as cover
572 "file": "<name of image file, mandatory>",
573 "contentType": "<optional>",
574 "emoji": "<optional>"
575 },
576 "stickers": [
577 {
578 "file": "<name of image file, mandatory>",
579 "contentType": "<optional>",
580 "emoji": "<optional>"
581 }
582 ...
583 ]
584 }
585 ----
586
587 PATH::
588 The path of the manifest.json or a zip file containing the sticker pack you wish to upload.
589
590 === daemon
591
592 signal-cli can run in daemon mode and provides an experimental dbus or JSON-RPC interface.
593 If no `-a` account is given, all local accounts will be exported as separate dbus objects under the same bus name.
594
595 *--dbus*::
596 Export DBus interface on user bus.
597 See signal-cli-dbus (5) for info on the dbus interface.
598
599 *--dbus-system*::
600 Export DBus interface on system bus.
601 See signal-cli-dbus (5) for info on the dbus interface.
602
603 *--socket [SOCKET]*::
604 Export a JSON-RPC interface on a UNIX socket (default $XDG_RUNTIME_DIR/signal-cli/socket).
605 See signal-cli-jsonrpc (5) for info on the JSON-RPC interface.
606
607 *--tcp [HOST:PORT]*::
608 Export a JSON-RPC interface on a TCP socket (default localhost:7583).
609 See signal-cli-jsonrpc (5) for info on the JSON-RPC interface.
610
611 *--ignore-attachments*::
612 Don’t download attachments of received messages.
613
614 *--no-receive-stdout*::
615 Don’t print received messages to stdout.
616
617 *--receive-mode*::
618 Specify when to start receiving messages (on-start, on-connection, manual)
619
620 == Examples
621
622 Register a number (with SMS verification)::
623 signal-cli -a ACCOUNT register
624
625 Verify the number using the code received via SMS or voice::
626 signal-cli -a ACCOUNT verify CODE
627
628 Send a message to one or more recipients::
629 signal-cli -a ACCOUNT send -m "This is a message" [RECIPIENT [RECIPIENT ...]] [-a [ATTACHMENT [ATTACHMENT ...]]]
630
631 Pipe the message content from another process::
632 uname -a | signal-cli -a ACCOUNT send --message-from-stdin [RECIPIENT [RECIPIENT ...]]
633
634 Create a group::
635 signal-cli -a ACCOUNT updateGroup -n "Group name" -m [MEMBER [MEMBER ...]]
636
637 Add member to a group::
638 signal-cli -a ACCOUNT updateGroup -g GROUP_ID -m "NEW_MEMBER"
639
640 Accept a group invitation::
641 signal-cli -a ACCOUNT updateGroup -g GROUP_ID
642
643 Leave a group::
644 signal-cli -a ACCOUNT quitGroup -g GROUP_ID
645
646 Send a message to a group::
647 signal-cli -a ACCOUNT send -m "This is a message" -g GROUP_ID
648
649 Trust new key, after having verified it::
650 signal-cli -a ACCOUNT trust -v SAFETY_NUMBER NUMBER
651
652 Trust new key, without having verified it. Only use this if you don't care about security::
653 signal-cli -a ACCOUNT trust -a NUMBER
654
655 == Exit codes
656
657 * *1*: Error is probably caused and fixable by the user
658 * *2*: Some unexpected error
659 * *3*: Server or IO error
660 * *4*: Sending failed due to untrusted key
661
662 == Files
663
664 The password and cryptographic keys are created when registering and stored in the current users home directory, the directory can be changed with *--config*:
665
666 `$XDG_DATA_HOME/signal-cli/` (`$HOME/.local/share/signal-cli/`)
667
668 == Authors
669
670 Maintained by AsamK <asamk@gmx.de>, who is assisted by other open source contributors.
671 For more information about signal-cli development, see
672 <https://github.com/AsamK/signal-cli>.