]> nmode's Git Repositories - signal-cli/blob - man/signal-cli.1.adoc
Add option to send read receipts for all received data messages
[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 primary 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 primary 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 primary or linked device
141
142 === updateConfiguration
143
144 Update signal configs and sync them to linked devices.
145 This command only works on the primary 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 primary 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 primary 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 *--preview-url*::
257 Specify the url for the link preview.
258 The same url must also appear in the message body, otherwise the preview won't be
259 displayed by the apps.
260
261 *--preview-title*::
262 Specify the title for the link preview (mandatory).
263
264 *--preview-description*::
265 Specify the description for the link preview (optional).
266
267 *--preview-image*::
268 Specify the image file for the link preview (optional).
269
270 *-e*, *--end-session*::
271 Clear session state and send end session message.
272
273 === sendPaymentNotification
274
275 Send a payment notification.
276
277 RECIPIENT::
278 Specify the recipient’s phone number.
279
280 *--receipt* RECEIPT::
281 The base64 encoded receipt blob.
282
283 *--note* NOTE::
284 Specify a note for the payment notification.
285
286 === sendReaction
287
288 Send reaction to a previously received or sent message.
289
290 RECIPIENT::
291 Specify the recipients’ phone number.
292
293 *-g* GROUP, *--group-id* GROUP::
294 Specify the recipient group ID in base64 encoding.
295
296 *-e* EMOJI, *--emoji* EMOJI::
297 Specify the emoji, should be a single unicode grapheme cluster.
298
299 *-a* NUMBER, *--target-author* NUMBER::
300 Specify the number of the author of the message to which to react.
301
302 *-t* TIMESTAMP, *--target-timestamp* TIMESTAMP::
303 Specify the timestamp of the message to which to react.
304
305 *-r*, *--remove*::
306 Remove a reaction.
307
308 === sendReceipt
309
310 Send a read or viewed receipt to a previously received message.
311
312 RECIPIENT::
313 Specify the sender’s phone number.
314
315 *-t* TIMESTAMP, *--target-timestamp* TIMESTAMP::
316 Specify the timestamp of the message to which to react.
317
318 *--type* TYPE::
319 Specify the receipt type, either `read` (the default) or `viewed`.
320
321 === sendTyping
322
323 Send typing message to trigger a typing indicator for the recipient.
324 Indicator will be shown for 15seconds unless a typing STOP message is sent first.
325
326 RECIPIENT::
327 Specify the recipients’ phone number.
328
329 *-g* GROUP, *--group-id* GROUP::
330 Specify the recipient group ID in base64 encoding.
331
332 *-s*, *--stop*::
333 Send a typing STOP message.
334
335 === remoteDelete
336
337 Remotely delete a previously sent message.
338
339 RECIPIENT::
340 Specify the recipients’ phone number.
341
342 *-g* GROUP, *--group-id* GROUP::
343 Specify the recipient group ID in base64 encoding.
344
345 *-t* TIMESTAMP, *--target-timestamp* TIMESTAMP::
346 Specify the timestamp of the message to delete.
347
348 === receive
349
350 Query the server for new messages.
351 New messages are printed on standard output and attachments are downloaded to the config directory.
352 In json mode this is outputted as one json object per line.
353
354 *-t* TIMEOUT, *--timeout* TIMEOUT::
355 Number of seconds to wait for new messages (negative values disable timeout).
356 Default is 5 seconds.
357 *--ignore-attachments*::
358 Don’t download attachments of received messages.
359
360 *--send-read-receipts*::
361 Send read receipts for all incoming data messages (in addition to the default delivery receipts)
362
363 === joinGroup
364
365 Join a group via an invitation link.
366
367 *--uri*::
368 The invitation link URI (starts with `https://signal.group/#`)
369
370 === updateGroup
371
372 Create or update a group.
373 If the user is a pending member, this command will accept the group invitation.
374
375 *-g* GROUP, *--group-id* GROUP::
376 Specify the recipient group ID in base64 encoding.
377 If not specified, a new group with a new random ID is generated.
378
379 *-n* NAME, *--name* NAME::
380 Specify the new group name.
381
382 *-d* DESCRIPTION, *--description* DESCRIPTION::
383 Specify the new group description.
384
385 *-a* AVATAR, *--avatar* AVATAR::
386 Specify a new group avatar image file.
387
388 *-m* [MEMBER [MEMBER ...]], *--member* [MEMBER [MEMBER ...]]::
389 Specify one or more members to add to the group.
390
391 *-r* [MEMBER [MEMBER ...]], *--remove-member* [MEMBER [MEMBER ...]]::
392 Specify one or more members to remove from the group
393
394 *--admin* [MEMBER [MEMBER ...]]::
395 Specify one or more members to make a group admin
396
397 *--remove-admin* [MEMBER [MEMBER ...]]::
398 Specify one or more members to remove group admin privileges
399
400 *--ban* [MEMBER [MEMBER ...]]::
401 Specify one or more members to ban from joining the group.
402 Banned members cannot join or request to join via a group link.
403
404 *--unban* [MEMBER [MEMBER ...]]::
405 Specify one or more members to remove from the ban list
406
407 *--reset-link*::
408 Reset group link and create new link password
409
410 *--link* LINK_STATE::
411 Set group link state: `enabled`, `enabled-with-approval`, `disabled`
412
413 *--set-permission-add-member* PERMISSION::
414 Set permission to add new group members: `every-member`, `only-admins`
415
416 *--set-permission-edit-details* PERMISSION::
417 Set permission to edit group details: `every-member`, `only-admins`
418
419 *--set-permission-send-messages* PERMISSION::
420 Set permission to send messages in group: `every-member`, `only-admins`
421 Groups where only admins can send messages are also called announcement groups
422
423 *-e* EXPIRATION_SECONDS, *--expiration* EXPIRATION_SECONDS::
424 Set expiration time of messages (seconds).
425 To disable expiration set expiration time to 0.
426
427 === quitGroup
428
429 Send a quit group message to all group members and remove self from member list.
430 If the user is a pending member, this command will decline the group invitation.
431
432 *-g* GROUP, *--group-id* GROUP::
433 Specify the recipient group ID in base64 encoding.
434
435 *--delete*::
436 Delete local group data completely after quitting group.
437
438 === listGroups
439
440 Show a list of known groups and related information.
441 In json mode this is outputted as an list of objects and is always in detailed mode.
442
443 *-d*, *--detailed*::
444 Include the list of members of each group and the group invite link.
445
446 *-g*, *--group-id*::
447 Filter the group list by one or more group IDs.
448
449 === listContacts
450
451 Show a list of known contacts with names and profiles.
452 When a specific recipient is given, its profile will be refreshed.
453
454 RECIPIENT::
455 Specify the recipients’ phone number.
456
457 *-a*, *--all-recipients*::
458 Include all known recipients, not only contacts.
459
460 *--blocked*::
461 Specify if only blocked or unblocked contacts should be shown (default: all contacts)
462
463 *--name*::
464 Find contacts with the given contact or profile name.
465
466 === listIdentities
467
468 List all known identity keys and their trust status, fingerprint and safety number.
469
470 *-n* NUMBER, *--number* NUMBER::
471 Only show identity keys for the given phone number.
472
473 === trust
474
475 Set the trust level of a given number.
476 The first time a key for a number is seen, it is trusted by default (TOFU).
477 If the key changes, the new key must be trusted manually.
478
479 number::
480 Specify the phone number, for which to set the trust.
481
482 *-a*, *--trust-all-known-keys*::
483 Trust all known keys of this user, only use this for testing.
484
485 *-v* VERIFIED_SAFETY_NUMBER, *--verified-safety-number* VERIFIED_SAFETY_NUMBER::
486 Specify the safety number of the key, only use this option if you have verified the safety number.
487 Can be either the plain text numbers shown in the app or the bytes from the QR-code, encoded as base64.
488
489 === updateProfile
490
491 Update the profile information shown to message recipients.
492 The profile is stored encrypted on the Signal servers.
493 The decryption key is sent with every outgoing messages to contacts and included in every group.
494
495 *--given-name* NAME, *--name* NAME::
496 New (given) name.
497
498 *--family-name* FAMILY_NAME::
499 New family name.
500
501 *--about* ABOUT_TEXT::
502 New profile status text.
503
504 *--about-emoji* EMOJI::
505 New profile status emoji.
506
507 *--avatar* AVATAR_FILE::
508 Path to the new avatar image file.
509
510 *--remove-avatar*::
511 Remove the avatar
512
513 *--mobile-coin-address*::
514 New MobileCoin address (Base64 encoded public address)
515
516 === updateContact
517
518 Update the info associated to a number on our contact list.
519 This change is only local but can be synchronized to other devices by using `sendContacts` (see below).
520 If the contact doesn't exist yet, it will be added.
521
522 NUMBER::
523 Specify the contact phone number.
524
525 *-n*, *--name*::
526 Specify the new name for this contact.
527
528 *-e*, *--expiration* EXPIRATION_SECONDS::
529 Set expiration time of messages (seconds).
530 To disable expiration set expiration time to 0.
531
532 === removeContact
533
534 Remove the info of a given contact
535
536 NUMBER::
537 Specify the contact phone number.
538
539 *--forget*::
540 Delete all data associated with this contact, including identity keys and sessions.
541
542 === block
543
544 Block the given contacts or groups (no messages will be received).
545 This change is only local but can be synchronized to other devices by using `sendContacts` (see below).
546
547 [CONTACT [CONTACT ...]]::
548 Specify the phone numbers of contacts that should be blocked.
549
550 *-g* [GROUP [GROUP ...]], *--group-id* [GROUP [GROUP ...]]::
551 Specify the group IDs that should be blocked in base64 encoding.
552
553 === unblock
554
555 Unblock the given contacts or groups (messages will be received again).
556 This change is only local but can be synchronized to other devices by using `sendContacts` (see below).
557
558 [CONTACT [CONTACT ...]]::
559 Specify the phone numbers of contacts that should be unblocked.
560
561 *-g* [GROUP [GROUP ...]], *--group-id* [GROUP [GROUP ...]]::
562 Specify the group IDs that should be unblocked in base64 encoding.
563
564 === sendContacts
565
566 Send a synchronization message with the local contacts list to all linked devices.
567 This command should only be used if this is the primary device.
568
569 === sendSyncRequest
570
571 Send a synchronization request message to the primary device (for group, contacts, ...).
572 The primary device will respond with synchronization messages with full contact and group lists.
573
574 === uploadStickerPack
575
576 Upload a new sticker pack, consisting of a manifest file and the sticker images.
577 Images must conform to the following specification: (see https://support.signal.org/hc/en-us/articles/360031836512-Stickers#sticker_reqs )
578
579 - Static stickers in PNG or WebP format
580 - Animated stickers in APNG format,
581 - Maximum file size for a sticker file is 300KiB
582 - Image resolution of 512 x 512 px
583
584 The required manifest.json has the following format:
585
586 [source,json]
587 ----
588 {
589 "title": "<STICKER_PACK_TITLE>",
590 "author": "<STICKER_PACK_AUTHOR>",
591 "cover": { // Optional cover, by default the first sticker is used as cover
592 "file": "<name of image file, mandatory>",
593 "contentType": "<optional>",
594 "emoji": "<optional>"
595 },
596 "stickers": [
597 {
598 "file": "<name of image file, mandatory>",
599 "contentType": "<optional>",
600 "emoji": "<optional>"
601 }
602 ...
603 ]
604 }
605 ----
606
607 PATH::
608 The path of the manifest.json or a zip file containing the sticker pack you wish to upload.
609
610 === daemon
611
612 signal-cli can run in daemon mode and provides an experimental dbus or JSON-RPC interface.
613 If no `-a` account is given, all local accounts will be exported as separate dbus objects under the same bus name.
614
615 *--dbus*::
616 Export DBus interface on user bus.
617 See signal-cli-dbus (5) for info on the dbus interface.
618
619 *--dbus-system*::
620 Export DBus interface on system bus.
621 See signal-cli-dbus (5) for info on the dbus interface.
622
623 *--socket [SOCKET]*::
624 Export a JSON-RPC interface on a UNIX socket (default $XDG_RUNTIME_DIR/signal-cli/socket).
625 See signal-cli-jsonrpc (5) for info on the JSON-RPC interface.
626
627 *--tcp [HOST:PORT]*::
628 Export a JSON-RPC interface on a TCP socket (default localhost:7583).
629 See signal-cli-jsonrpc (5) for info on the JSON-RPC interface.
630
631 *--ignore-attachments*::
632 Don’t download attachments of received messages.
633
634 *--send-read-receipts*::
635 Send read receipts for all incoming data messages (in addition to the default delivery receipts)
636
637 *--no-receive-stdout*::
638 Don’t print received messages to stdout.
639
640 *--receive-mode*::
641 Specify when to start receiving messages (on-start, on-connection, manual)
642
643 == Examples
644
645 Register a number (with SMS verification)::
646 signal-cli -a ACCOUNT register
647
648 Verify the number using the code received via SMS or voice::
649 signal-cli -a ACCOUNT verify CODE
650
651 Send a message to one or more recipients::
652 signal-cli -a ACCOUNT send -m "This is a message" [RECIPIENT [RECIPIENT ...]] [-a [ATTACHMENT [ATTACHMENT ...]]]
653
654 Pipe the message content from another process::
655 uname -a | signal-cli -a ACCOUNT send --message-from-stdin [RECIPIENT [RECIPIENT ...]]
656
657 Create a group::
658 signal-cli -a ACCOUNT updateGroup -n "Group name" -m [MEMBER [MEMBER ...]]
659
660 Add member to a group::
661 signal-cli -a ACCOUNT updateGroup -g GROUP_ID -m "NEW_MEMBER"
662
663 Accept a group invitation::
664 signal-cli -a ACCOUNT updateGroup -g GROUP_ID
665
666 Leave a group::
667 signal-cli -a ACCOUNT quitGroup -g GROUP_ID
668
669 Send a message to a group::
670 signal-cli -a ACCOUNT send -m "This is a message" -g GROUP_ID
671
672 Trust new key, after having verified it::
673 signal-cli -a ACCOUNT trust -v SAFETY_NUMBER NUMBER
674
675 Trust new key, without having verified it. Only use this if you don't care about security::
676 signal-cli -a ACCOUNT trust -a NUMBER
677
678 == Exit codes
679
680 * *1*: Error is probably caused and fixable by the user
681 * *2*: Some unexpected error
682 * *3*: Server or IO error
683 * *4*: Sending failed due to untrusted key
684
685 == Files
686
687 The password and cryptographic keys are created when registering and stored in the current users home directory, the directory can be changed with *--config*:
688
689 `$XDG_DATA_HOME/signal-cli/` (`$HOME/.local/share/signal-cli/`)
690
691 == Authors
692
693 Maintained by AsamK <asamk@gmx.de>, who is assisted by other open source contributors.
694 For more information about signal-cli development, see
695 <https://github.com/AsamK/signal-cli>.