2 vim:set ts=4 sw=4 tw=82 noet:
11 signal-cli - A commandline 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 and a JSON-RPC interface, that can be used to send messages from other programs.
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.
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.
45 Scrub possibly sensitive information from the log, like phone numbers and UUIDs.
48 Set the path, where to store the config.
49 Make sure you have full read/write access to the given directory.
50 (Default: `$XDG_DATA_HOME/signal-cli` (`$HOME/.local/share/signal-cli`))
52 *-a* ACCOUNT, *--account* ACCOUNT::
53 Specify your phone number, that will be your identifier.
54 The phone number must include the country calling code, i.e. the number must start with a "+" sign.
56 This flag must not be given for the `link` command.
57 It is optional for the `daemon` command.
58 For all other commands it is only optional if there is exactly one local user in the config directory.
60 *--service-environment* ENVIRONMENT::
61 Choose the server environment to use:
67 Make request via user dbus.
70 Make request via system dbus.
72 *-o* OUTPUT-MODE, *--output* OUTPUT-MODE::
73 Specify if you want commands to output in either "plain-text" mode or in "json".
74 Defaults to "plain-text"
76 *--trust-new-identities* TRUST-MODE::
77 Choose when to trust new identities:
78 - `on-first-use` (default): Trust the first seen identity key from new users, changed keys must be verified manually
79 - `always`: Trust any new identity key without verification
80 - `never`: Don't trust any unknown identity key, every key must be verified manually
82 *--disable-send-log*::
83 Disable message send log (for resending messages that recipient couldn't decrypt).
89 Register a phone number with SMS or voice verification.
90 Use the verify command to complete the verification.
92 If the account is just deactivated, the register command will just reactivate account, without requiring an SMS verification.
93 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.
94 If the account was deleted (with --delete-account) it cannot be reactivated.
97 The verification should be done over voice, not SMS.
100 The captcha token, required if registration failed with a captcha required error.
101 To get the token, go to https://signalcaptchas.org/registration/generate.html
102 For the staging environment, use: https://signalcaptchas.org/staging/registration/generate.html
103 Check the developer tools for a redirect starting with signalcaptcha:// Everything after signalcaptcha:// is the captcha token.
107 Verify the number using the code received via SMS or voice.
110 The verification code.
112 *-p* PIN, *--pin* PIN::
113 The registration lock PIN, that was set by the user.
114 Only required if a PIN was set.
118 Disable push support for this device, i.e. this device won't receive any more messages.
119 If this is the primary device, other users can't send messages to this number anymore.
120 Use "updateAccount" to undo this.
121 To remove a linked device, use "removeDevice" from the primary device.
124 Delete account completely from server.
125 Cannot be undone without loss.
126 You will have to be readded to each group.
128 CAUTION: Only delete your account if you won't use this number again!
130 === deleteLocalAccountData
132 Delete all local data for this account.
133 Data should only be deleted if the account is unregistered.
135 CAUTION: This cannot be undone.
137 *--ignore-registered*::
138 Delete the account data even though the account is still registered on the Signal servers.
142 Update the account attributes on the signal server.
143 Can fix problems with receiving messages.
145 *-n* NAME, *--device-name* NAME::
146 Set a new device name for the primary or linked device
148 === updateConfiguration
150 Update signal configs and sync them to linked devices.
151 This command only works on the primary devices.
153 *--read-receipts* {true,false}::
154 Indicates if Signal should send read receipts.
156 *--unidentified-delivery-indicators* {true,false}::
157 Indicates if Signal should show unidentified delivery indicators.
159 *--typing-indicators* {true,false}::
160 Indicates if Signal should send/show typing indicators.
162 *--link-previews* {true,false}::
163 Indicates if Signal should generate link previews.
167 Set a registration lock pin, to prevent others from registering this number.
169 REGISTRATION_LOCK_PIN::
170 The registration lock PIN, that will be required for new registrations (resets after 7 days of inactivity)
174 Remove the registration lock pin.
178 Link to an existing device, instead of registering a new number.
179 This shows a "sgnl://linkdevice?uuid=..." URI.
180 If you want to connect to another signal-cli instance, you can just use this URI.
181 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.
183 *-n* NAME, *--name* NAME::
184 Optionally specify a name to describe this new device.
185 By default "cli" will be used.
189 Link another device to this device.
190 Only works, if this is the primary device.
193 Specify the uri contained in the QR code shown by the new device.
194 You will need the full URI such as "sgnl://linkdevice?uuid=..." (formerly "tsdevice:/?uuid=...") Make sure to enclose it in quotation marks for shells.
198 Show a list of linked devices.
202 Remove a linked device.
203 Only works, if this is the primary device.
205 *-d* DEVICE_ID, *--device-id* DEVICE_ID::
206 Specify the device you want to remove.
207 Use listDevices to see the deviceIds.
211 Uses a list of phone numbers to determine the statuses of those users.
212 Shows if they are registered on the Signal Servers or not.
213 In json mode this is outputted as a list of objects.
215 [NUMBER [NUMBER ...]]::
216 One or more numbers to check.
220 Send a message to another user or group.
223 Specify the recipients’ phone number.
226 Send the message to self without notification.
228 *-g* GROUP, *--group-id* GROUP::
229 Specify the recipient group ID in base64 encoding.
231 *-m* MESSAGE, *--message* MESSAGE::
234 *--message-from-stdin*::
235 Read the message from standard input.
237 *-a* [ATTACHMENT [ATTACHMENT ...]], *--attachment* [ATTACHMENT [ATTACHMENT ...]]::
238 Add one or more files as attachment.
239 Can be either a file path or a data URI.
240 Data URI encoded attachments must follow the RFC 2397.
241 Additionally a file name can be added:
242 e.g.: `data:<MIME-TYPE>;filename=<FILENAME>;base64,<BASE64 ENCODED DATA>`
244 *--sticker* STICKER::
245 Send a sticker of a locally known sticker pack (syntax: stickerPackId:stickerId).
246 Shouldn't be used together with `-m` as the official clients don't support this.
247 e.g.: `--sticker 00abac3bc18d7f599bff2325dc306d43:2`
250 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.
251 e.g.: `-m "Hi X!" --mention "3:1:+123456789"`
253 *--quote-timestamp*::
254 Specify the timestamp of a previous message with the recipient or group to add a quote to the new message.
257 Specify the number of the author of the original message.
260 Specify the message of the original message.
263 Specify the mentions of the original message (same format as `--mention`).
266 Specify the url for the link preview.
267 The same url must also appear in the message body, otherwise the preview won't be displayed by the apps.
270 Specify the title for the link preview (mandatory).
272 *--preview-description*::
273 Specify the description for the link preview (optional).
276 Specify the image file for the link preview (optional).
278 *-e*, *--end-session*::
279 Clear session state and send end session message.
281 === sendPaymentNotification
283 Send a payment notification.
286 Specify the recipient’s phone number.
288 *--receipt* RECEIPT::
289 The base64 encoded receipt blob.
292 Specify a note for the payment notification.
296 Send reaction to a previously received or sent message.
299 Specify the recipients’ phone number.
301 *-g* GROUP, *--group-id* GROUP::
302 Specify the recipient group ID in base64 encoding.
304 *-e* EMOJI, *--emoji* EMOJI::
305 Specify the emoji, should be a single unicode grapheme cluster.
307 *-a* NUMBER, *--target-author* NUMBER::
308 Specify the number of the author of the message to which to react.
310 *-t* TIMESTAMP, *--target-timestamp* TIMESTAMP::
311 Specify the timestamp of the message to which to react.
317 React to a story instead of a normal message
321 Send a read or viewed receipt to a previously received message.
324 Specify the sender’s phone number.
326 *-t* TIMESTAMP, *--target-timestamp* TIMESTAMP::
327 Specify the timestamp of the message to which to react.
330 Specify the receipt type, either `read` (the default) or `viewed`.
334 Send typing message to trigger a typing indicator for the recipient.
335 Indicator will be shown for 15seconds unless a typing STOP message is sent first.
338 Specify the recipients’ phone number.
340 *-g* GROUP, *--group-id* GROUP::
341 Specify the recipient group ID in base64 encoding.
344 Send a typing STOP message.
348 Remotely delete a previously sent message.
351 Specify the recipients’ phone number.
353 *-g* GROUP, *--group-id* GROUP::
354 Specify the recipient group ID in base64 encoding.
356 *-t* TIMESTAMP, *--target-timestamp* TIMESTAMP::
357 Specify the timestamp of the message to delete.
361 Query the server for new messages.
362 New messages are printed on standard output and attachments are downloaded to the config directory.
363 In json mode this is outputted as one json object per line.
365 *-t* TIMEOUT, *--timeout* TIMEOUT::
366 Number of seconds to wait for new messages (negative values disable timeout).
367 Default is 5 seconds.
369 *--ignore-attachments*::
370 Don’t download attachments of received messages.
373 Don’t receive story messages from the server.
376 *--send-read-receipts*::
377 Send read receipts for all incoming data messages (in addition to the default delivery receipts)
381 Join a group via an invitation link.
384 The invitation link URI (starts with `https://signal.group/#`)
388 Create or update a group.
389 If the user is a pending member, this command will accept the group invitation.
391 *-g* GROUP, *--group-id* GROUP::
392 Specify the recipient group ID in base64 encoding.
393 If not specified, a new group with a new random ID is generated.
395 *-n* NAME, *--name* NAME::
396 Specify the new group name.
398 *-d* DESCRIPTION, *--description* DESCRIPTION::
399 Specify the new group description.
401 *-a* AVATAR, *--avatar* AVATAR::
402 Specify a new group avatar image file.
404 *-m* [MEMBER [MEMBER ...]], *--member* [MEMBER [MEMBER ...]]::
405 Specify one or more members to add to the group.
407 *-r* [MEMBER [MEMBER ...]], *--remove-member* [MEMBER [MEMBER ...]]::
408 Specify one or more members to remove from the group
410 *--admin* [MEMBER [MEMBER ...]]::
411 Specify one or more members to make a group admin
413 *--remove-admin* [MEMBER [MEMBER ...]]::
414 Specify one or more members to remove group admin privileges
416 *--ban* [MEMBER [MEMBER ...]]::
417 Specify one or more members to ban from joining the group.
418 Banned members cannot join or request to join via a group link.
420 *--unban* [MEMBER [MEMBER ...]]::
421 Specify one or more members to remove from the ban list
424 Reset group link and create new link password
426 *--link* LINK_STATE::
427 Set group link state: `enabled`, `enabled-with-approval`, `disabled`
429 *--set-permission-add-member* PERMISSION::
430 Set permission to add new group members: `every-member`, `only-admins`
432 *--set-permission-edit-details* PERMISSION::
433 Set permission to edit group details: `every-member`, `only-admins`
435 *--set-permission-send-messages* PERMISSION::
436 Set permission to send messages in group: `every-member`, `only-admins`
437 Groups where only admins can send messages are also called announcement groups
439 *-e* EXPIRATION_SECONDS, *--expiration* EXPIRATION_SECONDS::
440 Set expiration time of messages (seconds).
441 To disable expiration set expiration time to 0.
445 Send a quit group message to all group members and remove self from member list.
446 If the user is a pending member, this command will decline the group invitation.
448 *-g* GROUP, *--group-id* GROUP::
449 Specify the recipient group ID in base64 encoding.
452 Delete local group data completely after quitting group.
456 Show a list of known groups and related information.
457 In json mode this is outputted as an list of objects and is always in detailed mode.
460 Include the list of members of each group and the group invite link.
463 Filter the group list by one or more group IDs.
467 Show a list of known contacts with names and profiles.
468 When a specific recipient is given, its profile will be refreshed.
471 Specify the recipients’ phone number.
473 *-a*, *--all-recipients*::
474 Include all known recipients, not only contacts.
477 Specify if only blocked or unblocked contacts should be shown (default: all contacts)
480 Find contacts with the given contact or profile name.
484 List all known identity keys and their trust status, fingerprint and safety number.
486 *-n* NUMBER, *--number* NUMBER::
487 Only show identity keys for the given phone number.
491 Set the trust level of a given number.
492 The first time a key for a number is seen, it is trusted by default (TOFU).
493 If the key changes, the new key must be trusted manually.
496 Specify the phone number, for which to set the trust.
498 *-a*, *--trust-all-known-keys*::
499 Trust all known keys of this user, only use this for testing.
501 *-v* VERIFIED_SAFETY_NUMBER, *--verified-safety-number* VERIFIED_SAFETY_NUMBER::
502 Specify the safety number of the key, only use this option if you have verified the safety number.
503 Can be either the plain text numbers shown in the app or the bytes from the QR-code, encoded as base64.
507 Update the profile information shown to message recipients.
508 The profile is stored encrypted on the Signal servers.
509 The decryption key is sent with every outgoing messages to contacts and included in every group.
511 *--given-name* NAME, *--name* NAME::
514 *--family-name* FAMILY_NAME::
517 *--about* ABOUT_TEXT::
518 New profile status text.
520 *--about-emoji* EMOJI::
521 New profile status emoji.
523 *--avatar* AVATAR_FILE::
524 Path to the new avatar image file.
529 *--mobile-coin-address*::
530 New MobileCoin address (Base64 encoded public address)
534 Update the info associated to a number on our contact list.
535 This change is only local but can be synchronized to other devices by using `sendContacts` (see below).
536 If the contact doesn't exist yet, it will be added.
539 Specify the contact phone number.
541 *--given-name* NAME, *--name* NAME::
544 *--family-name* FAMILY_NAME::
547 *-e*, *--expiration* EXPIRATION_SECONDS::
548 Set expiration time of messages (seconds).
549 To disable expiration set expiration time to 0.
553 Remove the info of a given contact
556 Specify the contact phone number.
559 Delete all data associated with this contact, including identity keys and sessions.
563 Block the given contacts or groups (no messages will be received).
564 This change is only local but can be synchronized to other devices by using `sendContacts` (see below).
566 [CONTACT [CONTACT ...]]::
567 Specify the phone numbers of contacts that should be blocked.
569 *-g* [GROUP [GROUP ...]], *--group-id* [GROUP [GROUP ...]]::
570 Specify the group IDs that should be blocked in base64 encoding.
574 Unblock the given contacts or groups (messages will be received again).
575 This change is only local but can be synchronized to other devices by using `sendContacts` (see below).
577 [CONTACT [CONTACT ...]]::
578 Specify the phone numbers of contacts that should be unblocked.
580 *-g* [GROUP [GROUP ...]], *--group-id* [GROUP [GROUP ...]]::
581 Specify the group IDs that should be unblocked in base64 encoding.
585 Send a synchronization message with the local contacts list to all linked devices.
586 This command should only be used if this is the primary device.
590 Send a synchronization request message to the primary device (for group, contacts, ...).
591 The primary device will respond with synchronization messages with full contact and group lists.
593 === uploadStickerPack
595 Upload a new sticker pack, consisting of a manifest file and the sticker images.
596 Images must conform to the following specification: (see https://support.signal.org/hc/en-us/articles/360031836512-Stickers#sticker_reqs )
598 - Static stickers in PNG or WebP format
599 - Animated stickers in APNG format,
600 - Maximum file size for a sticker file is 300KiB
601 - Image resolution of 512 x 512 px
603 The required manifest.json has the following format:
608 "title": "<STICKER_PACK_TITLE>",
609 "author": "<STICKER_PACK_AUTHOR>",
610 "cover": { // Optional cover, by default the first sticker is used as cover
611 "file": "<name of image file, mandatory>",
612 "contentType": "<optional>",
613 "emoji": "<optional>"
617 "file": "<name of image file, mandatory>",
618 "contentType": "<optional>",
619 "emoji": "<optional>"
627 The path of the manifest.json or a zip file containing the sticker pack you wish to upload.
631 signal-cli can run in daemon mode and provides an experimental dbus or JSON-RPC interface.
632 If no `-a` account is given, all local accounts will be exported as separate dbus objects under the same bus name.
635 Export DBus interface on user bus.
636 See signal-cli-dbus (5) for info on the dbus interface.
639 Export DBus interface on system bus.
640 See signal-cli-dbus (5) for info on the dbus interface.
642 *--socket [SOCKET]*::
643 Export a JSON-RPC interface on a UNIX socket (default $XDG_RUNTIME_DIR/signal-cli/socket).
644 See signal-cli-jsonrpc (5) for info on the JSON-RPC interface.
646 *--tcp [HOST:PORT]*::
647 Export a JSON-RPC interface on a TCP socket (default localhost:7583).
648 See signal-cli-jsonrpc (5) for info on the JSON-RPC interface.
650 *--ignore-attachments*::
651 Don’t download attachments of received messages.
654 Don’t receive story messages from the server.
656 *--send-read-receipts*::
657 Send read receipts for all incoming data messages (in addition to the default delivery receipts)
659 *--no-receive-stdout*::
660 Don’t print received messages to stdout.
663 Specify when to start receiving messages (on-start, on-connection, manual)
667 Register a number (with SMS verification)::
668 signal-cli -a ACCOUNT register
670 Verify the number using the code received via SMS or voice::
671 signal-cli -a ACCOUNT verify CODE
673 Send a message to one or more recipients::
674 signal-cli -a ACCOUNT send -m "This is a message" [RECIPIENT [RECIPIENT ...]] [-a [ATTACHMENT [ATTACHMENT ...]]]
676 Pipe the message content from another process::
677 uname -a | signal-cli -a ACCOUNT send --message-from-stdin [RECIPIENT [RECIPIENT ...]]
680 signal-cli -a ACCOUNT updateGroup -n "Group name" -m [MEMBER [MEMBER ...]]
682 Add member to a group::
683 signal-cli -a ACCOUNT updateGroup -g GROUP_ID -m "NEW_MEMBER"
685 Accept a group invitation::
686 signal-cli -a ACCOUNT updateGroup -g GROUP_ID
689 signal-cli -a ACCOUNT quitGroup -g GROUP_ID
691 Send a message to a group::
692 signal-cli -a ACCOUNT send -m "This is a message" -g GROUP_ID
694 Trust new key, after having verified it::
695 signal-cli -a ACCOUNT trust -v SAFETY_NUMBER NUMBER
697 Trust new key, without having verified it. Only use this if you don't care about security::
698 signal-cli -a ACCOUNT trust -a NUMBER
702 * *1*: Error is probably caused and fixable by the user
703 * *2*: Some unexpected error
704 * *3*: Server or IO error
705 * *4*: Sending failed due to untrusted key
709 The password and cryptographic keys are created when registering and stored in the current users home directory, the directory can be changed with *--config*:
711 `$XDG_DATA_HOME/signal-cli/` (`$HOME/.local/share/signal-cli/`)
715 Maintained by AsamK <asamk@gmx.de>, who is assisted by other open source contributors.
716 For more information about signal-cli development, see
717 <https://github.com/AsamK/signal-cli>.