2 vim:set ts=4 sw=4 tw=82 noet:
11 signal-cli - A commandline and dbus interface for the Signal messenger
15 *signal-cli* [--config CONFIG] [-h | -v | -a ACCOUNT | --dbus | --dbus-system] command [command-options]
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.
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.
32 Show help message and quit.
35 Print the version and quit.
38 Raise log level and include lib signal logs.
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`))
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.
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.
54 Make request via user dbus.
57 Make request via system dbus.
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"
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
73 Register a phone number with SMS or voice verification.
74 Use the verify command to complete the verification.
76 If the account is just deactivated, the register command will just reactivate account, without requiring an SMS verification.
77 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.
78 If the account was deleted (with --delete-account) it cannot be reactivated.
81 The verification should be done over voice, not SMS.
84 The captcha token, required if registration failed with a captcha required error.
85 To get the token, go to https://signalcaptchas.org/registration/generate.html
86 Check the developer tools for a redirect starting with signalcaptcha:// Everything after signalcaptcha:// is the captcha token.
90 Verify the number using the code received via SMS or voice.
93 The verification code.
95 *-p* PIN, *--pin* PIN::
96 The registration lock PIN, that was set by the user.
97 Only required if a PIN was set.
101 Disable push support for this device, i.e. this device won't receive any more messages.
102 If this is the master device, other users can't send messages to this number anymore.
103 Use "updateAccount" to undo this.
104 To remove a linked device, use "removeDevice" from the master device.
107 Delete account completely from server.
108 Cannot be undone without loss.
109 You will have to be readded to each group.
111 CAUTION: Only delete your account if you won't use this number again!
115 Update the account attributes on the signal server.
116 Can fix problems with receiving messages.
118 *-n* NAME, *--device-name* NAME::
119 Set a new device name for the main or linked device
121 === updateConfiguration
123 Update signal configs and sync them to linked devices.
124 This command only works on the main devices.
126 *--read-receipts* {true,false}::
127 Indicates if Signal should send read receipts.
129 *--unidentified-delivery-indicators* {true,false}::
130 Indicates if Signal should show unidentified delivery indicators.
132 *--typing-indicators* {true,false}::
133 Indicates if Signal should send/show typing indicators.
135 *--link-previews* {true,false}::
136 Indicates if Signal should generate link previews.
140 Set a registration lock pin, to prevent others from registering this number.
142 REGISTRATION_LOCK_PIN::
143 The registration lock PIN, that will be required for new registrations (resets after 7 days of inactivity)
147 Remove the registration lock pin.
151 Link to an existing device, instead of registering a new number.
152 This shows a "sgnl://linkdevice?uuid=..." URI.
153 If you want to connect to another signal-cli instance, you can just use this URI.
154 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.
156 *-n* NAME, *--name* NAME::
157 Optionally specify a name to describe this new device.
158 By default "cli" will be used.
162 Link another device to this device.
163 Only works, if this is the master device.
166 Specify the uri contained in the QR code shown by the new device.
167 You will need the full URI such as "sgnl://linkdevice?uuid=..." (formerly "tsdevice:/?uuid=...") Make sure to enclose it in quotation marks for shells.
171 Show a list of linked devices.
175 Remove a linked device.
176 Only works, if this is the master device.
178 *-d* DEVICE_ID, *--device-id* DEVICE_ID::
179 Specify the device you want to remove.
180 Use listDevices to see the deviceIds.
184 Uses a list of phone numbers to determine the statuses of those users.
185 Shows if they are registered on the Signal Servers or not.
186 In json mode this is outputted as a list of objects.
188 [NUMBER [NUMBER ...]]::
189 One or more numbers to check.
193 Send a message to another user or group.
196 Specify the recipients’ phone number.
199 Send the message to self without notification.
201 *-g* GROUP, *--group-id* GROUP::
202 Specify the recipient group ID in base64 encoding.
204 *-m* MESSAGE, *--message* MESSAGE::
205 Specify the message, if missing, standard input is used.
207 *-a* [ATTACHMENT [ATTACHMENT ...]], *--attachment* [ATTACHMENT [ATTACHMENT ...]]::
208 Add one or more files as attachment.
210 *--sticker* STICKER::
211 Send a sticker of a locally known sticker pack (syntax: stickerPackId:stickerId).
212 Shouldn't be used together with `-m` as the official clients don't support this.
213 e.g.: `--sticker 00abac3bc18d7f599bff2325dc306d43:2`
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"`
219 *--quote-timestamp*::
220 Specify the timestamp of a previous message with the recipient or group to add a quote to the new message.
223 Specify the number of the author of the original message.
226 Specify the message of the original message.
229 Specify the mentions of the original message (same format as `--mention`).
231 *-e*, *--end-session*::
232 Clear session state and send end session message.
236 Send reaction to a previously received or sent message.
239 Specify the recipients’ phone number.
241 *-g* GROUP, *--group-id* GROUP::
242 Specify the recipient group ID in base64 encoding.
244 *-e* EMOJI, *--emoji* EMOJI::
245 Specify the emoji, should be a single unicode grapheme cluster.
247 *-a* NUMBER, *--target-author* NUMBER::
248 Specify the number of the author of the message to which to react.
250 *-t* TIMESTAMP, *--target-timestamp* TIMESTAMP::
251 Specify the timestamp of the message to which to react.
258 Send a read or viewed receipt to a previously received message.
261 Specify the sender’s phone number.
263 *-t* TIMESTAMP, *--target-timestamp* TIMESTAMP::
264 Specify the timestamp of the message to which to react.
267 Specify the receipt type, either `read` (the default) or `viewed`.
271 Send typing message to trigger a typing indicator for the recipient.
272 Indicator will be shown for 15seconds unless a typing STOP message is sent first.
275 Specify the recipients’ phone number.
277 *-g* GROUP, *--group-id* GROUP::
278 Specify the recipient group ID in base64 encoding.
281 Send a typing STOP message.
285 Remotely delete a previously sent message.
288 Specify the recipients’ phone number.
290 *-g* GROUP, *--group-id* GROUP::
291 Specify the recipient group ID in base64 encoding.
293 *-t* TIMESTAMP, *--target-timestamp* TIMESTAMP::
294 Specify the timestamp of the message to delete.
298 Query the server for new messages.
299 New messages are printed on standard output and attachments are downloaded to the config directory.
300 In json mode this is outputted as one json object per line.
302 *-t* TIMEOUT, *--timeout* TIMEOUT::
303 Number of seconds to wait for new messages (negative values disable timeout).
304 Default is 5 seconds.
305 *--ignore-attachments*::
306 Don’t download attachments of received messages.
310 Join a group via an invitation link.
313 The invitation link URI (starts with `https://signal.group/#`)
317 Create or update a group.
318 If the user is a pending member, this command will accept the group invitation.
320 *-g* GROUP, *--group-id* GROUP::
321 Specify the recipient group ID in base64 encoding.
322 If not specified, a new group with a new random ID is generated.
324 *-n* NAME, *--name* NAME::
325 Specify the new group name.
327 *-d* DESCRIPTION, *--description* DESCRIPTION::
328 Specify the new group description.
330 *-a* AVATAR, *--avatar* AVATAR::
331 Specify a new group avatar image file.
333 *-m* [MEMBER [MEMBER ...]], *--member* [MEMBER [MEMBER ...]]::
334 Specify one or more members to add to the group.
336 *-r* [MEMBER [MEMBER ...]], *--remove-member* [MEMBER [MEMBER ...]]::
337 Specify one or more members to remove from the group
339 *--admin* [MEMBER [MEMBER ...]]::
340 Specify one or more members to make a group admin
342 *--remove-admin* [MEMBER [MEMBER ...]]::
343 Specify one or more members to remove group admin privileges
346 Reset group link and create new link password
348 *--link* LINK_STATE::
349 Set group link state: `enabled`, `enabled-with-approval`, `disabled`
351 *--set-permission-add-member* PERMISSION::
352 Set permission to add new group members: `every-member`, `only-admins`
354 *--set-permission-edit-details* PERMISSION::
355 Set permission to edit group details: `every-member`, `only-admins`
357 *--set-permission-send-messages* PERMISSION::
358 Set permission to send messages in group: `every-member`, `only-admins`
359 Groups where only admins can send messages are also called announcement groups
361 *-e* EXPIRATION_SECONDS, *--expiration* EXPIRATION_SECONDS::
362 Set expiration time of messages (seconds).
363 To disable expiration set expiration time to 0.
367 Send a quit group message to all group members and remove self from member list.
368 If the user is a pending member, this command will decline the group invitation.
370 *-g* GROUP, *--group-id* GROUP::
371 Specify the recipient group ID in base64 encoding.
374 Delete local group data completely after quitting group.
378 Show a list of known groups and related information.
379 In json mode this is outputted as an list of objects and is always in detailed mode.
382 Include the list of members of each group and the group invite link.
386 Show a list of known contacts with names.
390 List all known identity keys and their trust status, fingerprint and safety number.
392 *-n* NUMBER, *--number* NUMBER::
393 Only show identity keys for the given phone number.
397 Set the trust level of a given number.
398 The first time a key for a number is seen, it is trusted by default (TOFU).
399 If the key changes, the new key must be trusted manually.
402 Specify the phone number, for which to set the trust.
404 *-a*, *--trust-all-known-keys*::
405 Trust all known keys of this user, only use this for testing.
407 *-v* VERIFIED_SAFETY_NUMBER, *--verified-safety-number* VERIFIED_SAFETY_NUMBER::
408 Specify the safety number of the key, only use this option if you have verified the safety number.
409 Can be either the plain text numbers shown in the app or the bytes from the QR-code, encoded as base64.
413 Update the profile information shown to message recipients.
414 The profile is stored encrypted on the Signal servers.
415 The decryption key is sent with every outgoing messages to contacts and included in every group.
417 *--given-name* NAME, *--name* NAME::
420 *--family-name* FAMILY_NAME::
423 *--about* ABOUT_TEXT::
424 New profile status text.
426 *--about-emoji* EMOJI::
427 New profile status emoji.
429 *--avatar* AVATAR_FILE::
430 Path to the new avatar image file.
437 Update the info associated to a number on our contact list.
438 This change is only local but can be synchronized to other devices by using `sendContacts` (see below).
439 If the contact doesn't exist yet, it will be added.
442 Specify the contact phone number.
445 Specify the new name for this contact.
447 *-e*, *--expiration* EXPIRATION_SECONDS::
448 Set expiration time of messages (seconds).
449 To disable expiration set expiration time to 0.
453 Remove the info of a given contact
456 Specify the contact phone number.
459 Delete all data associated with this contact, including identity keys and sessions.
463 Block the given contacts or groups (no messages will be received).
464 This change is only local but can be synchronized to other devices by using `sendContacts` (see below).
466 [CONTACT [CONTACT ...]]::
467 Specify the phone numbers of contacts that should be blocked.
469 *-g* [GROUP [GROUP ...]], *--group-id* [GROUP [GROUP ...]]::
470 Specify the group IDs that should be blocked in base64 encoding.
474 Unblock the given contacts or groups (messages will be received again).
475 This change is only local but can be synchronized to other devices by using `sendContacts` (see below).
477 [CONTACT [CONTACT ...]]::
478 Specify the phone numbers of contacts that should be unblocked.
480 *-g* [GROUP [GROUP ...]], *--group-id* [GROUP [GROUP ...]]::
481 Specify the group IDs that should be unblocked in base64 encoding.
485 Send a synchronization message with the local contacts list to all linked devices.
486 This command should only be used if this is the master device.
490 Send a synchronization request message to the master device (for group, contacts, ...).
491 The master device will respond with synchronization messages with full contact and group lists.
493 === uploadStickerPack
495 Upload a new sticker pack, consisting of a manifest file and the sticker images.
496 Images must conform to the following specification: (see https://support.signal.org/hc/en-us/articles/360031836512-Stickers#sticker_reqs )
498 - Static stickers in PNG or WebP format
499 - Animated stickers in APNG format,
500 - Maximum file size for a sticker file is 300KiB
501 - Image resolution of 512 x 512 px
503 The required manifest.json has the following format:
508 "title": "<STICKER_PACK_TITLE>",
509 "author": "<STICKER_PACK_AUTHOR>",
510 "cover": { // Optional cover, by default the first sticker is used as cover
511 "file": "<name of image file, mandatory>",
512 "contentType": "<optional>",
513 "emoji": "<optional>"
517 "file": "<name of image file, mandatory>",
518 "contentType": "<optional>",
519 "emoji": "<optional>"
527 The path of the manifest.json or a zip file containing the sticker pack you wish to upload.
531 signal-cli can run in daemon mode and provides an experimental dbus or JSON-RPC interface.
532 If no `-a` account is given, all local accounts will be exported as separate dbus objects under the same bus name.
535 Export DBus interface on user bus.
536 See signal-cli-dbus (5) for info on the dbus interface.
539 Export DBus interface on system bus.
540 See signal-cli-dbus (5) for info on the dbus interface.
542 *--socket [SOCKET]*::
543 Export a JSON-RPC interface on a UNIX socket (default $XDG_RUNTIME_DIR/signal-cli/socket).
544 See signal-cli-jsonrpc (5) for info on the JSON-RPC interface.
546 *--tcp [HOST:PORT]*::
547 Export a JSON-RPC interface on a TCP socket (default localhost:7583).
548 See signal-cli-jsonrpc (5) for info on the JSON-RPC interface.
550 *--ignore-attachments*::
551 Don’t download attachments of received messages.
553 *--no-receive-stdout*::
554 Don’t print received messages to stdout.
557 Specify when to start receiving messages (on-start, on-connection, manual)
561 Register a number (with SMS verification)::
562 signal-cli -a ACCOUNT register
564 Verify the number using the code received via SMS or voice::
565 signal-cli -a ACCOUNT verify CODE
567 Send a message to one or more recipients::
568 signal-cli -a ACCOUNT send -m "This is a message" [RECIPIENT [RECIPIENT ...]] [-a [ATTACHMENT [ATTACHMENT ...]]]
570 Pipe the message content from another process::
571 uname -a | signal-cli -a ACCOUNT send [RECIPIENT [RECIPIENT ...]]
574 signal-cli -a ACCOUNT updateGroup -n "Group name" -m [MEMBER [MEMBER ...]]
576 Add member to a group::
577 signal-cli -a ACCOUNT updateGroup -g GROUP_ID -m "NEW_MEMBER"
579 Accept a group invitation::
580 signal-cli -a ACCOUNT updateGroup -g GROUP_ID
583 signal-cli -a ACCOUNT quitGroup -g GROUP_ID
585 Send a message to a group::
586 signal-cli -a ACCOUNT send -m "This is a message" -g GROUP_ID
588 Trust new key, after having verified it::
589 signal-cli -a ACCOUNT trust -v SAFETY_NUMBER NUMBER
591 Trust new key, without having verified it. Only use this if you don't care about security::
592 signal-cli -a ACCOUNT trust -a NUMBER
596 * *1*: Error is probably caused and fixable by the user
597 * *2*: Some unexpected error
598 * *3*: Server or IO error
599 * *4*: Sending failed due to untrusted key
603 The password and cryptographic keys are created when registering and stored in the current users home directory, the directory can be changed with *--config*:
605 `$XDG_DATA_HOME/signal-cli/` (`$HOME/.local/share/signal-cli/`)
609 Maintained by AsamK <asamk@gmx.de>, who is assisted by other open source contributors.
610 For more information about signal-cli development, see
611 <https://github.com/AsamK/signal-cli>.