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 === startChangeNumber
159 Change an account to a new phone number with SMS or voice verification.
160 Use the finishChangeNumber command to complete the verification.
163 The new phone number.
166 The verification should be done over voice, not SMS.
167 Voice verification only works if an SMS verification has been attempted before.
170 The captcha token, required if registration failed with a captcha required error.
171 To get the token, go to https://signalcaptchas.org/registration/generate.html
172 For the staging environment, use: https://signalcaptchas.org/staging/registration/generate.html
173 After solving the captcha, right-click on the "Open Signal" link and copy the link.
175 === finishChangeNumber
177 Verify the number using the code received via SMS or voice.
180 The new phone number.
182 *-v*, *--verification-code*::
183 The verification code.
185 *-p* PIN, *--pin* PIN::
186 The registration lock PIN, that was set by the user.
187 Only required if a PIN was set.
189 === updateConfiguration
191 Update signal configs and sync them to linked devices.
192 This command only works on the primary devices.
194 *--read-receipts* {true,false}::
195 Indicates if Signal should send read receipts.
197 *--unidentified-delivery-indicators* {true,false}::
198 Indicates if Signal should show unidentified delivery indicators.
200 *--typing-indicators* {true,false}::
201 Indicates if Signal should send/show typing indicators.
203 *--link-previews* {true,false}::
204 Indicates if Signal should generate link previews.
208 Set a registration lock pin, to prevent others from registering this number.
210 REGISTRATION_LOCK_PIN::
211 The registration lock PIN, that will be required for new registrations (resets after 7 days of inactivity)
215 Remove the registration lock pin.
219 Link to an existing device, instead of registering a new number.
220 This shows a "sgnl://linkdevice?uuid=..." URI.
221 If you want to connect to another signal-cli instance, you can just use this URI.
222 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.
224 *-n* NAME, *--name* NAME::
225 Optionally specify a name to describe this new device.
226 By default "cli" will be used.
230 Link another device to this device.
231 Only works, if this is the primary device.
234 Specify the uri contained in the QR code shown by the new device.
235 You will need the full URI such as "sgnl://linkdevice?uuid=..." (formerly "tsdevice:/?uuid=...") Make sure to enclose it in quotation marks for shells.
239 Show a list of linked devices.
243 Remove a linked device.
244 Only works, if this is the primary device.
246 *-d* DEVICE_ID, *--device-id* DEVICE_ID::
247 Specify the device you want to remove.
248 Use listDevices to see the deviceIds.
252 Uses a list of phone numbers to determine the statuses of those users.
253 Shows if they are registered on the Signal Servers or not.
254 In json mode this is outputted as a list of objects.
256 [NUMBER [NUMBER ...]]::
257 One or more numbers to check.
261 Send a message to another user or group.
264 Specify the recipients’ phone number.
267 Send the message to self without notification.
269 *-g* GROUP, *--group-id* GROUP::
270 Specify the recipient group ID in base64 encoding.
272 *-m* MESSAGE, *--message* MESSAGE::
275 *--message-from-stdin*::
276 Read the message from standard input.
278 *-a* [ATTACHMENT [ATTACHMENT ...]], *--attachment* [ATTACHMENT [ATTACHMENT ...]]::
279 Add one or more files as attachment.
280 Can be either a file path or a data URI.
281 Data URI encoded attachments must follow the RFC 2397.
282 Additionally a file name can be added:
283 e.g.: `data:<MIME-TYPE>;filename=<FILENAME>;base64,<BASE64 ENCODED DATA>`
285 *--sticker* STICKER::
286 Send a sticker of a locally known sticker pack (syntax: stickerPackId:stickerId).
287 Shouldn't be used together with `-m` as the official clients don't support this.
288 e.g.: `--sticker 00abac3bc18d7f599bff2325dc306d43:2`
291 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.
292 e.g.: `-m "Hi X!" --mention "3:1:+123456789"`
295 Style parts of the message text (syntax: start:length:STYLE).
296 Where STYLE is one of: BOLD, ITALIC, SPOILER, STRIKETHROUGH, MONOSPACE
298 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"`
300 *--quote-timestamp*::
301 Specify the timestamp of a previous message with the recipient or group to add a quote to the new message.
304 Specify the number of the author of the original message.
307 Specify the message of the original message.
310 Specify the mentions of the original message (same format as `--mention`).
312 *--quote-text-style*::
313 Style parts of the original message text (same format as `--text-style`).
315 *--quote-attachment*::
316 Specify the attachments of the original message (syntax: contentType[:filename[:previewFile]]), e.g. 'audio/aac' or 'image/png:test.png:/tmp/preview.jpg'.
319 Specify the url for the link preview.
320 The same url must also appear in the message body, otherwise the preview won't be displayed by the apps.
323 Specify the title for the link preview (mandatory).
325 *--preview-description*::
326 Specify the description for the link preview (optional).
329 Specify the image file for the link preview (optional).
331 *--story-timestamp*::
332 Specify the timestamp of a story to reply to.
335 Specify the number of the author of the story.
337 *-e*, *--end-session*::
338 Clear session state and send end session message.
341 Specify the timestamp of a previous message with the recipient or group to send an edited message.
343 === sendPaymentNotification
345 Send a payment notification.
348 Specify the recipient’s phone number.
350 *--receipt* RECEIPT::
351 The base64 encoded receipt blob.
354 Specify a note for the payment notification.
358 Send reaction to a previously received or sent message.
361 Specify the recipients’ phone number.
363 *-g* GROUP, *--group-id* GROUP::
364 Specify the recipient group ID in base64 encoding.
366 *-e* EMOJI, *--emoji* EMOJI::
367 Specify the emoji, should be a single unicode grapheme cluster.
369 *-a* NUMBER, *--target-author* NUMBER::
370 Specify the number of the author of the message to which to react.
372 *-t* TIMESTAMP, *--target-timestamp* TIMESTAMP::
373 Specify the timestamp of the message to which to react.
379 React to a story instead of a normal message
383 Send a read or viewed receipt to a previously received message.
386 Specify the sender’s phone number.
388 *-t* TIMESTAMP, *--target-timestamp* TIMESTAMP::
389 Specify the timestamp of the message to which to react.
392 Specify the receipt type, either `read` (the default) or `viewed`.
396 Send typing message to trigger a typing indicator for the recipient.
397 Indicator will be shown for 15seconds unless a typing STOP message is sent first.
400 Specify the recipients’ phone number.
402 *-g* GROUP, *--group-id* GROUP::
403 Specify the recipient group ID in base64 encoding.
406 Send a typing STOP message.
410 Remotely delete a previously sent message.
413 Specify the recipients’ phone number.
415 *-g* GROUP, *--group-id* GROUP::
416 Specify the recipient group ID in base64 encoding.
418 *-t* TIMESTAMP, *--target-timestamp* TIMESTAMP::
419 Specify the timestamp of the message to delete.
423 Query the server for new messages.
424 New messages are printed on standard output and attachments are downloaded to the config directory.
425 In json mode this is outputted as one json object per line.
427 *-t* TIMEOUT, *--timeout* TIMEOUT::
428 Number of seconds to wait for new messages (negative values disable timeout).
429 Default is 5 seconds.
432 Maximum number of messages to receive, before returning.
434 *--ignore-attachments*::
435 Don’t download attachments of received messages.
438 Don’t receive story messages from the server.
441 *--send-read-receipts*::
442 Send read receipts for all incoming data messages (in addition to the default delivery receipts)
446 Join a group via an invitation link.
449 The invitation link URI (starts with `https://signal.group/#`)
453 Create or update a group.
454 If the user is a pending member, this command will accept the group invitation.
456 *-g* GROUP, *--group-id* GROUP::
457 Specify the recipient group ID in base64 encoding.
458 If not specified, a new group with a new random ID is generated.
460 *-n* NAME, *--name* NAME::
461 Specify the new group name.
463 *-d* DESCRIPTION, *--description* DESCRIPTION::
464 Specify the new group description.
466 *-a* AVATAR, *--avatar* AVATAR::
467 Specify a new group avatar image file.
469 *-m* [MEMBER [MEMBER ...]], *--member* [MEMBER [MEMBER ...]]::
470 Specify one or more members to add to the group.
472 *-r* [MEMBER [MEMBER ...]], *--remove-member* [MEMBER [MEMBER ...]]::
473 Specify one or more members to remove from the group
475 *--admin* [MEMBER [MEMBER ...]]::
476 Specify one or more members to make a group admin
478 *--remove-admin* [MEMBER [MEMBER ...]]::
479 Specify one or more members to remove group admin privileges
481 *--ban* [MEMBER [MEMBER ...]]::
482 Specify one or more members to ban from joining the group.
483 Banned members cannot join or request to join via a group link.
485 *--unban* [MEMBER [MEMBER ...]]::
486 Specify one or more members to remove from the ban list
489 Reset group link and create new link password
491 *--link* LINK_STATE::
492 Set group link state: `enabled`, `enabled-with-approval`, `disabled`
494 *--set-permission-add-member* PERMISSION::
495 Set permission to add new group members: `every-member`, `only-admins`
497 *--set-permission-edit-details* PERMISSION::
498 Set permission to edit group details: `every-member`, `only-admins`
500 *--set-permission-send-messages* PERMISSION::
501 Set permission to send messages in group: `every-member`, `only-admins`
502 Groups where only admins can send messages are also called announcement groups
504 *-e* EXPIRATION_SECONDS, *--expiration* EXPIRATION_SECONDS::
505 Set expiration time of messages (seconds).
506 To disable expiration set expiration time to 0.
510 Send a quit group message to all group members and remove self from member list.
511 If the user is a pending member, this command will decline the group invitation.
513 *-g* GROUP, *--group-id* GROUP::
514 Specify the recipient group ID in base64 encoding.
517 Delete local group data completely after quitting group.
521 Show a list of known groups and related information.
522 In json mode this is outputted as an list of objects and is always in detailed mode.
525 Include the list of members of each group and the group invite link.
528 Filter the group list by one or more group IDs.
532 Show a list of known contacts with names and profiles.
533 When a specific recipient is given, its profile will be refreshed.
536 Specify the recipients’ phone number.
538 *-a*, *--all-recipients*::
539 Include all known recipients, not only contacts.
542 Specify if only blocked or unblocked contacts should be shown (default: all contacts)
545 Find contacts with the given contact or profile name.
549 List all known identity keys and their trust status, fingerprint and safety number.
551 *-n* NUMBER, *--number* NUMBER::
552 Only show identity keys for the given phone number.
556 Set the trust level of a given number.
557 The first time a key for a number is seen, it is trusted by default (TOFU).
558 If the key changes, the new key must be trusted manually.
561 Specify the phone number, for which to set the trust.
563 *-a*, *--trust-all-known-keys*::
564 Trust all known keys of this user, only use this for testing.
566 *-v* VERIFIED_SAFETY_NUMBER, *--verified-safety-number* VERIFIED_SAFETY_NUMBER::
567 Specify the safety number of the key, only use this option if you have verified the safety number.
568 Can be either the plain text numbers shown in the app or the bytes from the QR-code, encoded as base64.
572 Update the profile information shown to message recipients.
573 The profile is stored encrypted on the Signal servers.
574 The decryption key is sent with every outgoing messages to contacts and included in every group.
576 *--given-name* NAME, *--name* NAME::
579 *--family-name* FAMILY_NAME::
582 *--about* ABOUT_TEXT::
583 New profile status text.
585 *--about-emoji* EMOJI::
586 New profile status emoji.
588 *--avatar* AVATAR_FILE::
589 Path to the new avatar image file.
594 *--mobile-coin-address*::
595 New MobileCoin address (Base64 encoded public address)
599 Update the info associated to a number on our contact list.
600 This change is only local but can be synchronized to other devices by using `sendContacts` (see below).
601 If the contact doesn't exist yet, it will be added.
604 Specify the contact phone number.
606 *--given-name* NAME, *--name* NAME::
609 *--family-name* FAMILY_NAME::
612 *-e*, *--expiration* EXPIRATION_SECONDS::
613 Set expiration time of messages (seconds).
614 To disable expiration set expiration time to 0.
618 Remove the info of a given contact
621 Specify the contact phone number.
624 Hide the contact in the contact list, but keep the data.
627 Delete all data associated with this contact, including identity keys and sessions.
631 Block the given contacts or groups (no messages will be received).
632 This change is only local but can be synchronized to other devices by using `sendContacts` (see below).
634 [CONTACT [CONTACT ...]]::
635 Specify the phone numbers of contacts that should be blocked.
637 *-g* [GROUP [GROUP ...]], *--group-id* [GROUP [GROUP ...]]::
638 Specify the group IDs that should be blocked in base64 encoding.
642 Unblock the given contacts or groups (messages will be received again).
643 This change is only local but can be synchronized to other devices by using `sendContacts` (see below).
645 [CONTACT [CONTACT ...]]::
646 Specify the phone numbers of contacts that should be unblocked.
648 *-g* [GROUP [GROUP ...]], *--group-id* [GROUP [GROUP ...]]::
649 Specify the group IDs that should be unblocked in base64 encoding.
653 Send a synchronization message with the local contacts list to all linked devices.
654 This command should only be used if this is the primary device.
658 Send a synchronization request message to the primary device (for group, contacts, ...).
659 The primary device will respond with synchronization messages with full contact and group lists.
661 === uploadStickerPack
663 Upload a new sticker pack, consisting of a manifest file and the sticker images. +
664 Images must conform to the following specification: (see https://support.signal.org/hc/en-us/articles/360031836512-Stickers#sticker_reqs )
666 - Static stickers in PNG or WebP format
667 - Animated stickers in APNG format,
668 - Maximum file size for a sticker file is 300KiB
669 - Image resolution of 512 x 512 px
671 The required manifest.json has the following format:
676 "title": "<STICKER_PACK_TITLE>",
677 "author": "<STICKER_PACK_AUTHOR>",
678 "cover": { // Optional cover, by default the first sticker is used as cover
679 "file": "<name of image file, mandatory>",
680 "contentType": "<optional>",
681 "emoji": "<optional>"
685 "file": "<name of image file, mandatory>",
686 "contentType": "<optional>",
687 "emoji": "<optional>"
695 The path of the manifest.json or a zip file containing the sticker pack you wish to upload.
699 Show a list of known sticker packs.
703 Install a sticker pack for this account.
706 Specify the uri of the sticker pack.
707 e.g. https://signal.art/addstickers/#pack_id=XXX&pack_key=XXX
711 Gets the raw data for a specified attachment.
712 This is done using the ID of the attachment the recipient or group ID.
713 The attachment data is returned as a Base64 String.
716 The ID of the attachment as given in the attachment list of the message.
718 *--recipient* [RECIPIENT]::
719 Specify the number which sent the attachment.
720 Referred to generally as recipient.
722 *-g* [GROUP], *--group-id* [GROUP]::
723 Alternatively, specify the group IDs for which to get the attachment.
727 Gets the raw data for a specified contact, contact's profile or group avatar.
728 The attachment data is returned as a Base64 String.
730 *--contact* [RECIPIENT]::
731 Specify the number of a recipient.
733 *--profile* [RECIPIENT]::
734 Specify the number of a recipient.
736 *-g* [GROUP], *--group-id* [GROUP]::
737 Alternatively, specify the group ID for which to get the avatar.
741 Gets the raw data for a specified sticker.
742 The attachment data is returned as a Base64 String.
744 *--pack-id* [PACK_ID]::
745 Specify the id of a sticker pack (hex encoded).
747 *--sticker-id* [STICKER_ID]::
748 Specify the index of a sticker in the sticker pack.
752 signal-cli can run in daemon mode and provides JSON-RPC or an experimental dbus interface.
753 If no `-a` account is given, all local accounts will be loaded.
754 Multiple interfaces can be used at the same time, e.g. `daemon --socket --dbus`
756 *--socket [SOCKET]*::
757 Export a JSON-RPC interface on a UNIX socket (default $XDG_RUNTIME_DIR/signal-cli/socket). +
758 See **signal-cli-jsonrpc**(5) for info on the JSON-RPC interface.
760 *--tcp [HOST:PORT]*::
761 Export a JSON-RPC interface on a TCP socket (default localhost:7583). +
762 See **signal-cli-jsonrpc**(5) for info on the JSON-RPC interface.
764 *--http [HOST:PORT]*::
765 Expose a JSON-RPC interface as http endpoint (default localhost:8080).
766 The JSON-RPC endpoint is `/api/v1/rpc`. +
767 See **signal-cli-jsonrpc**(5) for info on the JSON-RPC interface.
770 Export DBus interface on user bus. +
771 See **signal-cli-dbus**(5) for info on the dbus interface.
774 Export DBus interface on system bus. +
775 See **signal-cli-dbus**(5) for info on the dbus interface.
778 Claim another D-Bus bus name than the default.
780 *--ignore-attachments*::
781 Don’t download attachments of received messages.
784 Don’t receive story messages from the server.
786 *--send-read-receipts*::
787 Send read receipts for all incoming data messages (in addition to the default delivery receipts)
789 *--no-receive-stdout*::
790 Don’t print received messages to stdout.
793 Specify when to start receiving messages (on-start, on-connection, manual)
797 Run in signal-cli in JSON-RPC mode.
798 Reads JSON-RPC requests on stdin and responds on stdout.
799 See **signal-cli-jsonrpc**(5) for info on the JSON-RPC interface.
801 *--ignore-attachments*::
802 Don’t download attachments of received messages.
805 Don’t receive story messages from the server.
807 *--send-read-receipts*::
808 Send read receipts for all incoming data messages (in addition to the default delivery receipts)
811 Specify when to start receiving messages (on-start, manual)
813 === submitRateLimitChallenge
815 When running into rate limits, sometimes the limit can be lifted, by solving a CAPTCHA.
816 To get the captcha token, go to https://signalcaptchas.org/challenge/generate.html
817 For the staging environment, use: https://signalcaptchas.org/staging/registration/generate.html
819 *--challenge* CHALLENGE_TOKEN::
820 The challenge token from the failed send attempt.
822 *--captcha* CAPTCHA::
823 The captcha result, starting with signalcaptcha://
827 Register a number (with SMS verification)::
828 signal-cli -a ACCOUNT register
830 Verify the number using the code received via SMS or voice::
831 signal-cli -a ACCOUNT verify CODE
833 Send a message to one or more recipients::
834 signal-cli -a ACCOUNT send -m "This is a message" [RECIPIENT [RECIPIENT ...]] [-a [ATTACHMENT [ATTACHMENT ...]]]
836 Pipe the message content from another process::
837 uname -a | signal-cli -a ACCOUNT send --message-from-stdin [RECIPIENT [RECIPIENT ...]]
840 signal-cli -a ACCOUNT updateGroup -n "Group name" -m [MEMBER [MEMBER ...]]
842 Add member to a group::
843 signal-cli -a ACCOUNT updateGroup -g GROUP_ID -m "NEW_MEMBER"
845 Accept a group invitation::
846 signal-cli -a ACCOUNT updateGroup -g GROUP_ID
849 signal-cli -a ACCOUNT quitGroup -g GROUP_ID
851 Send a message to a group::
852 signal-cli -a ACCOUNT send -m "This is a message" -g GROUP_ID
854 Trust new key, after having verified it::
855 signal-cli -a ACCOUNT trust -v SAFETY_NUMBER NUMBER
857 Trust new key, without having verified it. Only use this if you don't care about security::
858 signal-cli -a ACCOUNT trust -a NUMBER
862 * *1*: Error is probably caused and fixable by the user
863 * *2*: Some unexpected error
864 * *3*: Server or IO error
865 * *4*: Sending failed due to untrusted key
866 * *5*: Server rate limiting error
870 The password and cryptographic keys are created when registering and stored in the current users home directory, the directory can be changed with *--config*:
872 `$XDG_DATA_HOME/signal-cli/` (`$HOME/.local/share/signal-cli/`)
876 Maintained by AsamK <asamk@gmx.de>, who is assisted by other open source contributors.
877 For more information about signal-cli development, see
878 <https://github.com/AsamK/signal-cli>.