2 vim:set ts=4 sw=4 tw=82 noet:
12 signal-cli - A commandline interface for the Signal messenger
16 *signal-cli* [--config CONFIG] [-h | -v | -a ACCOUNT | --dbus | --dbus-system] command [command-options]
20 signal-cli is a commandline interface for libsignal-service-java.
21 It supports registering, verifying, sending and receiving messages.
22 For registering you need a phone number where you can receive SMS or incoming calls.
23 signal-cli was primarily developed to be used on servers to notify admins of important events.
24 For this use-case, it has a dbus and a JSON-RPC interface, that can be used to send messages from other programs.
26 For some functionality the Signal protocol requires that all messages have been received from the server.
27 The `receive` command should be regularly executed.
28 In daemon mode messages are by default continuously received.
33 Show help message and quit.
36 Print the version and quit.
39 Raise log level and include lib signal logs.
41 *--log-file* LOG_FILE::
42 Write log output to the given file.
43 If `--verbose` is also given, the detailed logs will only be written to the log file.
46 Scrub possibly sensitive information from the log, like phone numbers and UUIDs.
47 Doesn't work reliably on dbus logs with very verbose logging (`-vvv`)
50 Set the path, where to store the config.
51 Make sure you have full read/write access to the given directory.
52 (Default: `$XDG_DATA_HOME/signal-cli` (`$HOME/.local/share/signal-cli`))
54 *-a* ACCOUNT, *--account* ACCOUNT::
55 Specify your phone number, that will be your identifier.
56 The phone number must include the country calling code, i.e. the number must start with a "+" sign.
58 This flag must not be given for the `link` command.
59 It is optional for the `daemon` command.
60 For all other commands it is only optional if there is exactly one local user in the config directory.
62 *--service-environment* ENVIRONMENT::
63 Choose the server environment to use:
69 Make request via user dbus.
72 Make request via system dbus.
75 Connect to another D-Bus bus name than the default.
77 *-o* OUTPUT-MODE, *--output* OUTPUT-MODE::
78 Specify if you want commands to output in either "plain-text" mode or in "json".
79 Defaults to "plain-text"
81 *--trust-new-identities* TRUST-MODE::
82 Choose when to trust new identities:
83 - `on-first-use` (default): Trust the first seen identity key from new users, changed keys must be verified manually
84 - `always`: Trust any new identity key without verification
85 - `never`: Don't trust any unknown identity key, every key must be verified manually
87 *--disable-send-log*::
88 Disable message send log (for resending messages that recipient couldn't decrypt).
94 Register a phone number with SMS or voice verification.
95 Use the verify command to complete the verification.
97 If the account is just deactivated, the register command will just reactivate account, without requiring an SMS verification.
98 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.
99 If the account was deleted (with --delete-account) it cannot be reactivated.
102 The verification should be done over voice, not SMS.
103 Voice verification only works if an SMS verification has been attempted before.
106 The captcha token, required if registration failed with a captcha required error.
107 To get the token, go to https://signalcaptchas.org/registration/generate.html
108 For the staging environment, use: https://signalcaptchas.org/staging/registration/generate.html
109 After solving the captcha, right-click on the "Open Signal" link and copy the link.
113 Verify the number using the code received via SMS or voice.
116 The verification code.
118 *-p* PIN, *--pin* PIN::
119 The registration lock PIN, that was set by the user.
120 Only required if a PIN was set.
124 Disable push support for this device, i.e. this device won't receive any more messages.
125 If this is the primary device, other users can't send messages to this number anymore.
126 Use "updateAccount" to undo this.
127 To remove a linked device, use "removeDevice" from the primary device.
130 Delete account completely from server.
131 Cannot be undone without loss.
132 You will have to be readded to each group.
134 CAUTION: Only delete your account if you won't use this number again!
136 === deleteLocalAccountData
138 Delete all local data for this account.
139 Data should only be deleted if the account is unregistered.
141 CAUTION: This cannot be undone.
143 *--ignore-registered*::
144 Delete the account data even though the account is still registered on the Signal servers.
148 Update the account attributes on the signal server.
149 Can fix problems with receiving messages.
151 *-n* NAME, *--device-name* NAME::
152 Set a new device name for the primary or linked device
154 *--unrestricted-unidentified-sender* {true,false}::
155 Enable if anyone should be able to send you unidentified sender messages.
157 *--discoverable-by-number* {true,false}::
158 Enable/disable if the account should be discoverable by phone number
160 *--number-sharing* {true,false}::
161 Indicates if Signal should share its phone number when sending a message.
163 === startChangeNumber
165 Change an account to a new phone number with SMS or voice verification.
166 Use the finishChangeNumber command to complete the verification.
169 The new phone number.
172 The verification should be done over voice, not SMS.
173 Voice verification only works if an SMS verification has been attempted before.
176 The captcha token, required if registration failed with a captcha required error.
177 To get the token, go to https://signalcaptchas.org/registration/generate.html
178 For the staging environment, use: https://signalcaptchas.org/staging/registration/generate.html
179 After solving the captcha, right-click on the "Open Signal" link and copy the link.
181 === finishChangeNumber
183 Verify the number using the code received via SMS or voice.
186 The new phone number.
188 *-v*, *--verification-code*::
189 The verification code.
191 *-p* PIN, *--pin* PIN::
192 The registration lock PIN, that was set by the user.
193 Only required if a PIN was set.
195 === updateConfiguration
197 Update signal configs and sync them to linked devices.
198 This command only works on the primary devices.
200 *--read-receipts* {true,false}::
201 Indicates if Signal should send read receipts.
203 *--unidentified-delivery-indicators* {true,false}::
204 Indicates if Signal should show unidentified delivery indicators.
206 *--typing-indicators* {true,false}::
207 Indicates if Signal should send/show typing indicators.
209 *--link-previews* {true,false}::
210 Indicates if Signal should generate link previews.
214 Set a registration lock pin, to prevent others from registering this number.
216 REGISTRATION_LOCK_PIN::
217 The registration lock PIN, that will be required for new registrations (resets after 7 days of inactivity)
221 Remove the registration lock pin.
225 Link to an existing device, instead of registering a new number.
226 This shows a "sgnl://linkdevice?uuid=..." URI.
227 If you want to connect to another signal-cli instance, you can just use this URI.
228 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.
230 *-n* NAME, *--name* NAME::
231 Optionally specify a name to describe this new device.
232 By default "cli" will be used.
236 Link another device to this device.
237 Only works, if this is the primary device.
240 Specify the uri contained in the QR code shown by the new device.
241 You will need the full URI such as "sgnl://linkdevice?uuid=..." (formerly "tsdevice:/?uuid=...") Make sure to enclose it in quotation marks for shells.
245 Show a list of linked devices.
249 Remove a linked device.
250 Only works, if this is the primary device.
252 *-d* DEVICE_ID, *--device-id* DEVICE_ID::
253 Specify the device you want to remove.
254 Use listDevices to see the deviceIds.
258 Uses a list of phone numbers to determine the statuses of those users.
259 Shows if they are registered on the Signal Servers or not.
260 In json mode this is outputted as a list of objects.
262 [NUMBER [NUMBER ...]]::
263 One or more numbers to check.
267 Send a message to another user or group.
270 Specify the recipients’ phone number.
273 Send the message to self without notification.
275 *-g* GROUP, *--group-id* GROUP::
276 Specify the recipient group ID in base64 encoding.
278 *-m* MESSAGE, *--message* MESSAGE::
281 *--message-from-stdin*::
282 Read the message from standard input.
284 *-a* [ATTACHMENT [ATTACHMENT ...]], *--attachment* [ATTACHMENT [ATTACHMENT ...]]::
285 Add one or more files as attachment.
286 Can be either a file path or a data URI.
287 Data URI encoded attachments must follow the RFC 2397.
288 Additionally a file name can be added:
289 e.g.: `data:<MIME-TYPE>;filename=<FILENAME>;base64,<BASE64 ENCODED DATA>`
291 *--sticker* STICKER::
292 Send a sticker of a locally known sticker pack (syntax: stickerPackId:stickerId).
293 Shouldn't be used together with `-m` as the official clients don't support this.
294 e.g.: `--sticker 00abac3bc18d7f599bff2325dc306d43:2`
297 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.
298 e.g.: `-m "Hi X!" --mention "3:1:+123456789"`
301 Style parts of the message text (syntax: start:length:STYLE).
302 Where STYLE is one of: BOLD, ITALIC, SPOILER, STRIKETHROUGH, MONOSPACE
304 e.g.: `-m "Something BIG!" --text-style "10:3:BOLD"` or for a mixed text style `-m "Something BIG!" --text-style "0:9:ITALIC" "10:3:BOLD"`
306 *--quote-timestamp*::
307 Specify the timestamp of a previous message with the recipient or group to add a quote to the new message.
310 Specify the number of the author of the original message.
313 Specify the message of the original message.
316 Specify the mentions of the original message (same format as `--mention`).
318 *--quote-text-style*::
319 Style parts of the original message text (same format as `--text-style`).
321 *--quote-attachment*::
322 Specify the attachments of the original message (syntax: contentType[:filename[:previewFile]]), e.g. 'audio/aac' or 'image/png:test.png:/tmp/preview.jpg'.
325 Specify the url for the link preview.
326 The same url must also appear in the message body, otherwise the preview won't be displayed by the apps.
329 Specify the title for the link preview (mandatory).
331 *--preview-description*::
332 Specify the description for the link preview (optional).
335 Specify the image file for the link preview (optional).
337 *--story-timestamp*::
338 Specify the timestamp of a story to reply to.
341 Specify the number of the author of the story.
343 *-e*, *--end-session*::
344 Clear session state and send end session message.
347 Specify the timestamp of a previous message with the recipient or group to send an edited message.
349 === sendPaymentNotification
351 Send a payment notification.
354 Specify the recipient’s phone number.
356 *--receipt* RECEIPT::
357 The base64 encoded receipt blob.
360 Specify a note for the payment notification.
364 Send reaction to a previously received or sent message.
367 Specify the recipients’ phone number.
369 *-g* GROUP, *--group-id* GROUP::
370 Specify the recipient group ID in base64 encoding.
372 *-e* EMOJI, *--emoji* EMOJI::
373 Specify the emoji, should be a single unicode grapheme cluster.
375 *-a* NUMBER, *--target-author* NUMBER::
376 Specify the number of the author of the message to which to react.
378 *-t* TIMESTAMP, *--target-timestamp* TIMESTAMP::
379 Specify the timestamp of the message to which to react.
385 React to a story instead of a normal message
389 Send a read or viewed receipt to a previously received message.
392 Specify the sender’s phone number.
394 *-t* TIMESTAMP, *--target-timestamp* TIMESTAMP::
395 Specify the timestamp of the message to which to react.
398 Specify the receipt type, either `read` (the default) or `viewed`.
402 Send typing message to trigger a typing indicator for the recipient.
403 Indicator will be shown for 15seconds unless a typing STOP message is sent first.
406 Specify the recipients’ phone number.
408 *-g* GROUP, *--group-id* GROUP::
409 Specify the recipient group ID in base64 encoding.
412 Send a typing STOP message.
416 Remotely delete a previously sent message.
419 Specify the recipients’ phone number.
421 *-g* GROUP, *--group-id* GROUP::
422 Specify the recipient group ID in base64 encoding.
424 *-t* TIMESTAMP, *--target-timestamp* TIMESTAMP::
425 Specify the timestamp of the message to delete.
429 Query the server for new messages.
430 New messages are printed on standard output and attachments are downloaded to the config directory.
431 In json mode this is outputted as one json object per line.
433 *-t* TIMEOUT, *--timeout* TIMEOUT::
434 Number of seconds to wait for new messages (negative values disable timeout).
435 Default is 5 seconds.
438 Maximum number of messages to receive, before returning.
440 *--ignore-attachments*::
441 Don’t download attachments of received messages.
444 Don’t receive story messages from the server.
447 *--send-read-receipts*::
448 Send read receipts for all incoming data messages (in addition to the default delivery receipts)
452 Join a group via an invitation link.
455 The invitation link URI (starts with `https://signal.group/#`)
459 Create or update a group.
460 If the user is a pending member, this command will accept the group invitation.
462 *-g* GROUP, *--group-id* GROUP::
463 Specify the recipient group ID in base64 encoding.
464 If not specified, a new group with a new random ID is generated.
466 *-n* NAME, *--name* NAME::
467 Specify the new group name.
469 *-d* DESCRIPTION, *--description* DESCRIPTION::
470 Specify the new group description.
472 *-a* AVATAR, *--avatar* AVATAR::
473 Specify a new group avatar image file.
475 *-m* [MEMBER [MEMBER ...]], *--member* [MEMBER [MEMBER ...]]::
476 Specify one or more members to add to the group.
478 *-r* [MEMBER [MEMBER ...]], *--remove-member* [MEMBER [MEMBER ...]]::
479 Specify one or more members to remove from the group
481 *--admin* [MEMBER [MEMBER ...]]::
482 Specify one or more members to make a group admin
484 *--remove-admin* [MEMBER [MEMBER ...]]::
485 Specify one or more members to remove group admin privileges
487 *--ban* [MEMBER [MEMBER ...]]::
488 Specify one or more members to ban from joining the group.
489 Banned members cannot join or request to join via a group link.
491 *--unban* [MEMBER [MEMBER ...]]::
492 Specify one or more members to remove from the ban list
495 Reset group link and create new link password
497 *--link* LINK_STATE::
498 Set group link state: `enabled`, `enabled-with-approval`, `disabled`
500 *--set-permission-add-member* PERMISSION::
501 Set permission to add new group members: `every-member`, `only-admins`
503 *--set-permission-edit-details* PERMISSION::
504 Set permission to edit group details: `every-member`, `only-admins`
506 *--set-permission-send-messages* PERMISSION::
507 Set permission to send messages in group: `every-member`, `only-admins`
508 Groups where only admins can send messages are also called announcement groups
510 *-e* EXPIRATION_SECONDS, *--expiration* EXPIRATION_SECONDS::
511 Set expiration time of messages (seconds).
512 To disable expiration set expiration time to 0.
516 Send a quit group message to all group members and remove self from member list.
517 If the user is a pending member, this command will decline the group invitation.
519 *-g* GROUP, *--group-id* GROUP::
520 Specify the recipient group ID in base64 encoding.
523 Delete local group data completely after quitting group.
527 Show a list of known groups and related information.
528 In json mode this is outputted as an list of objects and is always in detailed mode.
531 Include the list of members of each group and the group invite link.
534 Filter the group list by one or more group IDs.
538 Show a list of known contacts with names and profiles.
539 When a specific recipient is given, its profile will be refreshed.
542 Specify the recipients’ phone number.
544 *-a*, *--all-recipients*::
545 Include all known recipients, not only contacts.
548 Specify if only blocked or unblocked contacts should be shown (default: all contacts)
551 Find contacts with the given contact or profile name.
555 List all known identity keys and their trust status, fingerprint and safety number.
557 *-n* NUMBER, *--number* NUMBER::
558 Only show identity keys for the given phone number.
562 Set the trust level of a given number.
563 The first time a key for a number is seen, it is trusted by default (TOFU).
564 If the key changes, the new key must be trusted manually.
567 Specify the phone number, for which to set the trust.
569 *-a*, *--trust-all-known-keys*::
570 Trust all known keys of this user, only use this for testing.
572 *-v* VERIFIED_SAFETY_NUMBER, *--verified-safety-number* VERIFIED_SAFETY_NUMBER::
573 Specify the safety number of the key, only use this option if you have verified the safety number.
574 Can be either the plain text numbers shown in the app or the bytes from the QR-code, encoded as base64.
578 Update the profile information shown to message recipients.
579 The profile is stored encrypted on the Signal servers.
580 The decryption key is sent with every outgoing messages to contacts and included in every group.
582 *--given-name* NAME, *--name* NAME::
585 *--family-name* FAMILY_NAME::
588 *--about* ABOUT_TEXT::
589 New profile status text.
591 *--about-emoji* EMOJI::
592 New profile status emoji.
594 *--avatar* AVATAR_FILE::
595 Path to the new avatar image file.
600 *--mobile-coin-address*::
601 New MobileCoin address (Base64 encoded public address)
605 Update the info associated to a number on our contact list.
606 This change is only local but can be synchronized to other devices by using `sendContacts` (see below).
607 If the contact doesn't exist yet, it will be added.
610 Specify the contact phone number.
612 *--given-name* NAME, *--name* NAME::
615 *--family-name* FAMILY_NAME::
618 *-e*, *--expiration* EXPIRATION_SECONDS::
619 Set expiration time of messages (seconds).
620 To disable expiration set expiration time to 0.
624 Remove the info of a given contact
627 Specify the contact phone number.
630 Hide the contact in the contact list, but keep the data.
633 Delete all data associated with this contact, including identity keys and sessions.
637 Block the given contacts or groups (no messages will be received).
638 This change is only local but can be synchronized to other devices by using `sendContacts` (see below).
640 [CONTACT [CONTACT ...]]::
641 Specify the phone numbers of contacts that should be blocked.
643 *-g* [GROUP [GROUP ...]], *--group-id* [GROUP [GROUP ...]]::
644 Specify the group IDs that should be blocked in base64 encoding.
648 Unblock the given contacts or groups (messages will be received again).
649 This change is only local but can be synchronized to other devices by using `sendContacts` (see below).
651 [CONTACT [CONTACT ...]]::
652 Specify the phone numbers of contacts that should be unblocked.
654 *-g* [GROUP [GROUP ...]], *--group-id* [GROUP [GROUP ...]]::
655 Specify the group IDs that should be unblocked in base64 encoding.
659 Send a synchronization message with the local contacts list to all linked devices.
660 This command should only be used if this is the primary device.
664 Send a synchronization request message to the primary device (for group, contacts, ...).
665 The primary device will respond with synchronization messages with full contact and group lists.
667 === uploadStickerPack
669 Upload a new sticker pack, consisting of a manifest file and the sticker images. +
670 Images must conform to the following specification: (see https://support.signal.org/hc/en-us/articles/360031836512-Stickers#sticker_reqs )
672 - Static stickers in PNG or WebP format
673 - Animated stickers in APNG format,
674 - Maximum file size for a sticker file is 300KiB
675 - Image resolution of 512 x 512 px
677 The required manifest.json has the following format:
682 "title": "<STICKER_PACK_TITLE>",
683 "author": "<STICKER_PACK_AUTHOR>",
684 "cover": { // Optional cover, by default the first sticker is used as cover
685 "file": "<name of image file, mandatory>",
686 "contentType": "<optional>",
687 "emoji": "<optional>"
691 "file": "<name of image file, mandatory>",
692 "contentType": "<optional>",
693 "emoji": "<optional>"
701 The path of the manifest.json or a zip file containing the sticker pack you wish to upload.
705 Show a list of known sticker packs.
709 Install a sticker pack for this account.
712 Specify the uri of the sticker pack.
713 e.g. https://signal.art/addstickers/#pack_id=XXX&pack_key=XXX
717 Gets the raw data for a specified attachment.
718 This is done using the ID of the attachment the recipient or group ID.
719 The attachment data is returned as a Base64 String.
722 The ID of the attachment as given in the attachment list of the message.
724 *--recipient* [RECIPIENT]::
725 Specify the number which sent the attachment.
726 Referred to generally as recipient.
728 *-g* [GROUP], *--group-id* [GROUP]::
729 Alternatively, specify the group IDs for which to get the attachment.
733 Gets the raw data for a specified contact, contact's profile or group avatar.
734 The attachment data is returned as a Base64 String.
736 *--contact* [RECIPIENT]::
737 Specify the number of a recipient.
739 *--profile* [RECIPIENT]::
740 Specify the number of a recipient.
742 *-g* [GROUP], *--group-id* [GROUP]::
743 Alternatively, specify the group ID for which to get the avatar.
747 Gets the raw data for a specified sticker.
748 The attachment data is returned as a Base64 String.
750 *--pack-id* [PACK_ID]::
751 Specify the id of a sticker pack (hex encoded).
753 *--sticker-id* [STICKER_ID]::
754 Specify the index of a sticker in the sticker pack.
758 signal-cli can run in daemon mode and provides JSON-RPC or an experimental dbus interface.
759 If no `-a` account is given, all local accounts will be loaded.
760 Multiple interfaces can be used at the same time, e.g. `daemon --socket --dbus`
762 *--socket [SOCKET]*::
763 Export a JSON-RPC interface on a UNIX socket (default $XDG_RUNTIME_DIR/signal-cli/socket). +
764 See **signal-cli-jsonrpc**(5) for info on the JSON-RPC interface.
766 *--tcp [HOST:PORT]*::
767 Export a JSON-RPC interface on a TCP socket (default localhost:7583). +
768 See **signal-cli-jsonrpc**(5) for info on the JSON-RPC interface.
770 *--http [HOST:PORT]*::
771 Expose a JSON-RPC interface as http endpoint (default localhost:8080).
772 The JSON-RPC endpoint is `/api/v1/rpc`. +
773 See **signal-cli-jsonrpc**(5) for info on the JSON-RPC interface.
776 Export DBus interface on user bus. +
777 See **signal-cli-dbus**(5) for info on the dbus interface.
780 Export DBus interface on system bus. +
781 See **signal-cli-dbus**(5) for info on the dbus interface.
784 Claim another D-Bus bus name than the default.
786 *--ignore-attachments*::
787 Don’t download attachments of received messages.
790 Don’t receive story messages from the server.
792 *--send-read-receipts*::
793 Send read receipts for all incoming data messages (in addition to the default delivery receipts)
795 *--no-receive-stdout*::
796 Don’t print received messages to stdout.
799 Specify when to start receiving messages (on-start, on-connection, manual)
803 Run in signal-cli in JSON-RPC mode.
804 Reads JSON-RPC requests on stdin and responds on stdout.
805 See **signal-cli-jsonrpc**(5) for info on the JSON-RPC interface.
807 *--ignore-attachments*::
808 Don’t download attachments of received messages.
811 Don’t receive story messages from the server.
813 *--send-read-receipts*::
814 Send read receipts for all incoming data messages (in addition to the default delivery receipts)
817 Specify when to start receiving messages (on-start, manual)
819 === submitRateLimitChallenge
821 When running into rate limits, sometimes the limit can be lifted, by solving a CAPTCHA.
822 To get the captcha token, go to https://signalcaptchas.org/challenge/generate.html
823 For the staging environment, use: https://signalcaptchas.org/staging/registration/generate.html
825 *--challenge* CHALLENGE_TOKEN::
826 The challenge token from the failed send attempt.
828 *--captcha* CAPTCHA::
829 The captcha result, starting with signalcaptcha://
833 Register a number (with SMS verification)::
834 signal-cli -a ACCOUNT register
836 Verify the number using the code received via SMS or voice::
837 signal-cli -a ACCOUNT verify CODE
839 Send a message to one or more recipients::
840 signal-cli -a ACCOUNT send -m "This is a message" [RECIPIENT [RECIPIENT ...]] [-a [ATTACHMENT [ATTACHMENT ...]]]
842 Pipe the message content from another process::
843 uname -a | signal-cli -a ACCOUNT send --message-from-stdin [RECIPIENT [RECIPIENT ...]]
846 signal-cli -a ACCOUNT updateGroup -n "Group name" -m [MEMBER [MEMBER ...]]
848 Add member to a group::
849 signal-cli -a ACCOUNT updateGroup -g GROUP_ID -m "NEW_MEMBER"
851 Accept a group invitation::
852 signal-cli -a ACCOUNT updateGroup -g GROUP_ID
855 signal-cli -a ACCOUNT quitGroup -g GROUP_ID
857 Send a message to a group::
858 signal-cli -a ACCOUNT send -m "This is a message" -g GROUP_ID
860 Trust new key, after having verified it::
861 signal-cli -a ACCOUNT trust -v SAFETY_NUMBER NUMBER
863 Trust new key, without having verified it. Only use this if you don't care about security::
864 signal-cli -a ACCOUNT trust -a NUMBER
868 * *1*: Error is probably caused and fixable by the user
869 * *2*: Some unexpected error
870 * *3*: Server or IO error
871 * *4*: Sending failed due to untrusted key
872 * *5*: Server rate limiting error
876 The password and cryptographic keys are created when registering and stored in the current users home directory, the directory can be changed with *--config*:
878 `$XDG_DATA_HOME/signal-cli/` (`$HOME/.local/share/signal-cli/`)
882 Maintained by AsamK <asamk@gmx.de>, who is assisted by other open source contributors.
883 For more information about signal-cli development, see
884 <https://github.com/AsamK/signal-cli>.