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