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