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