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 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.
49 Set the path, where to store the config.
50 Make sure you have full read/write access to the given directory.
51 (Default: `$XDG_DATA_HOME/signal-cli` (`$HOME/.local/share/signal-cli`))
53 *-a* ACCOUNT, *--account* ACCOUNT::
54 Specify your phone number, that will be your identifier.
55 The phone number must include the country calling code, i.e. the number must start with a "+" sign.
57 This flag must not be given for the `link` command.
58 It is optional for the `daemon` command.
59 For all other commands it is only optional if there is exactly one local user in the config directory.
61 *--service-environment* ENVIRONMENT::
62 Choose the server environment to use:
68 Make request via user dbus.
71 Make request via system dbus.
73 *-o* OUTPUT-MODE, *--output* OUTPUT-MODE::
74 Specify if you want commands to output in either "plain-text" mode or in "json".
75 Defaults to "plain-text"
77 *--trust-new-identities* TRUST-MODE::
78 Choose when to trust new identities:
79 - `on-first-use` (default): Trust the first seen identity key from new users, changed keys must be verified manually
80 - `always`: Trust any new identity key without verification
81 - `never`: Don't trust any unknown identity key, every key must be verified manually
83 *--disable-send-log*::
84 Disable message send log (for resending messages that recipient couldn't decrypt).
90 Register a phone number with SMS or voice verification.
91 Use the verify command to complete the verification.
93 If the account is just deactivated, the register command will just reactivate account, without requiring an SMS verification.
94 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.
95 If the account was deleted (with --delete-account) it cannot be reactivated.
98 The verification should be done over voice, not SMS.
101 The captcha token, required if registration failed with a captcha required error.
102 To get the token, go to https://signalcaptchas.org/registration/generate.html
103 For the staging environment, use: https://signalcaptchas.org/staging/registration/generate.html
104 Check the developer tools for a redirect starting with signalcaptcha:// Everything after signalcaptcha:// is the captcha token.
108 Verify the number using the code received via SMS or voice.
111 The verification code.
113 *-p* PIN, *--pin* PIN::
114 The registration lock PIN, that was set by the user.
115 Only required if a PIN was set.
119 Disable push support for this device, i.e. this device won't receive any more messages.
120 If this is the primary device, other users can't send messages to this number anymore.
121 Use "updateAccount" to undo this.
122 To remove a linked device, use "removeDevice" from the primary device.
125 Delete account completely from server.
126 Cannot be undone without loss.
127 You will have to be readded to each group.
129 CAUTION: Only delete your account if you won't use this number again!
131 === deleteLocalAccountData
133 Delete all local data for this account.
134 Data should only be deleted if the account is unregistered.
136 CAUTION: This cannot be undone.
138 *--ignore-registered*::
139 Delete the account data even though the account is still registered on the Signal servers.
143 Update the account attributes on the signal server.
144 Can fix problems with receiving messages.
146 *-n* NAME, *--device-name* NAME::
147 Set a new device name for the primary or linked device
149 === updateConfiguration
151 Update signal configs and sync them to linked devices.
152 This command only works on the primary devices.
154 *--read-receipts* {true,false}::
155 Indicates if Signal should send read receipts.
157 *--unidentified-delivery-indicators* {true,false}::
158 Indicates if Signal should show unidentified delivery indicators.
160 *--typing-indicators* {true,false}::
161 Indicates if Signal should send/show typing indicators.
163 *--link-previews* {true,false}::
164 Indicates if Signal should generate link previews.
168 Set a registration lock pin, to prevent others from registering this number.
170 REGISTRATION_LOCK_PIN::
171 The registration lock PIN, that will be required for new registrations (resets after 7 days of inactivity)
175 Remove the registration lock pin.
179 Link to an existing device, instead of registering a new number.
180 This shows a "sgnl://linkdevice?uuid=..." URI.
181 If you want to connect to another signal-cli instance, you can just use this URI.
182 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.
184 *-n* NAME, *--name* NAME::
185 Optionally specify a name to describe this new device.
186 By default "cli" will be used.
190 Link another device to this device.
191 Only works, if this is the primary device.
194 Specify the uri contained in the QR code shown by the new device.
195 You will need the full URI such as "sgnl://linkdevice?uuid=..." (formerly "tsdevice:/?uuid=...") Make sure to enclose it in quotation marks for shells.
199 Show a list of linked devices.
203 Remove a linked device.
204 Only works, if this is the primary device.
206 *-d* DEVICE_ID, *--device-id* DEVICE_ID::
207 Specify the device you want to remove.
208 Use listDevices to see the deviceIds.
212 Uses a list of phone numbers to determine the statuses of those users.
213 Shows if they are registered on the Signal Servers or not.
214 In json mode this is outputted as a list of objects.
216 [NUMBER [NUMBER ...]]::
217 One or more numbers to check.
221 Send a message to another user or group.
224 Specify the recipients’ phone number.
227 Send the message to self without notification.
229 *-g* GROUP, *--group-id* GROUP::
230 Specify the recipient group ID in base64 encoding.
232 *-m* MESSAGE, *--message* MESSAGE::
235 *--message-from-stdin*::
236 Read the message from standard input.
238 *-a* [ATTACHMENT [ATTACHMENT ...]], *--attachment* [ATTACHMENT [ATTACHMENT ...]]::
239 Add one or more files as attachment.
240 Can be either a file path or a data URI.
241 Data URI encoded attachments must follow the RFC 2397.
242 Additionally a file name can be added:
243 e.g.: `data:<MIME-TYPE>;filename=<FILENAME>;base64,<BASE64 ENCODED DATA>`
245 *--sticker* STICKER::
246 Send a sticker of a locally known sticker pack (syntax: stickerPackId:stickerId).
247 Shouldn't be used together with `-m` as the official clients don't support this.
248 e.g.: `--sticker 00abac3bc18d7f599bff2325dc306d43:2`
251 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.
252 e.g.: `-m "Hi X!" --mention "3:1:+123456789"`
254 *--quote-timestamp*::
255 Specify the timestamp of a previous message with the recipient or group to add a quote to the new message.
258 Specify the number of the author of the original message.
261 Specify the message of the original message.
264 Specify the mentions of the original message (same format as `--mention`).
267 Specify the url for the link preview.
268 The same url must also appear in the message body, otherwise the preview won't be displayed by the apps.
271 Specify the title for the link preview (mandatory).
273 *--preview-description*::
274 Specify the description for the link preview (optional).
277 Specify the image file for the link preview (optional).
279 *--story-timestamp*::
280 Specify the timestamp of a story to reply to.
283 Specify the number of the author of the story.
285 *-e*, *--end-session*::
286 Clear session state and send end session message.
289 Specify the timestamp of a previous message with the recipient or group to send an edited message.
291 === sendPaymentNotification
293 Send a payment notification.
296 Specify the recipient’s phone number.
298 *--receipt* RECEIPT::
299 The base64 encoded receipt blob.
302 Specify a note for the payment notification.
306 Send reaction to a previously received or sent message.
309 Specify the recipients’ phone number.
311 *-g* GROUP, *--group-id* GROUP::
312 Specify the recipient group ID in base64 encoding.
314 *-e* EMOJI, *--emoji* EMOJI::
315 Specify the emoji, should be a single unicode grapheme cluster.
317 *-a* NUMBER, *--target-author* NUMBER::
318 Specify the number of the author of the message to which to react.
320 *-t* TIMESTAMP, *--target-timestamp* TIMESTAMP::
321 Specify the timestamp of the message to which to react.
327 React to a story instead of a normal message
331 Send a read or viewed receipt to a previously received message.
334 Specify the sender’s phone number.
336 *-t* TIMESTAMP, *--target-timestamp* TIMESTAMP::
337 Specify the timestamp of the message to which to react.
340 Specify the receipt type, either `read` (the default) or `viewed`.
344 Send typing message to trigger a typing indicator for the recipient.
345 Indicator will be shown for 15seconds unless a typing STOP message is sent first.
348 Specify the recipients’ phone number.
350 *-g* GROUP, *--group-id* GROUP::
351 Specify the recipient group ID in base64 encoding.
354 Send a typing STOP message.
358 Remotely delete a previously sent message.
361 Specify the recipients’ phone number.
363 *-g* GROUP, *--group-id* GROUP::
364 Specify the recipient group ID in base64 encoding.
366 *-t* TIMESTAMP, *--target-timestamp* TIMESTAMP::
367 Specify the timestamp of the message to delete.
371 Query the server for new messages.
372 New messages are printed on standard output and attachments are downloaded to the config directory.
373 In json mode this is outputted as one json object per line.
375 *-t* TIMEOUT, *--timeout* TIMEOUT::
376 Number of seconds to wait for new messages (negative values disable timeout).
377 Default is 5 seconds.
380 Maximum number of messages to receive, before returning.
382 *--ignore-attachments*::
383 Don’t download attachments of received messages.
386 Don’t receive story messages from the server.
389 *--send-read-receipts*::
390 Send read receipts for all incoming data messages (in addition to the default delivery receipts)
394 Join a group via an invitation link.
397 The invitation link URI (starts with `https://signal.group/#`)
401 Create or update a group.
402 If the user is a pending member, this command will accept the group invitation.
404 *-g* GROUP, *--group-id* GROUP::
405 Specify the recipient group ID in base64 encoding.
406 If not specified, a new group with a new random ID is generated.
408 *-n* NAME, *--name* NAME::
409 Specify the new group name.
411 *-d* DESCRIPTION, *--description* DESCRIPTION::
412 Specify the new group description.
414 *-a* AVATAR, *--avatar* AVATAR::
415 Specify a new group avatar image file.
417 *-m* [MEMBER [MEMBER ...]], *--member* [MEMBER [MEMBER ...]]::
418 Specify one or more members to add to the group.
420 *-r* [MEMBER [MEMBER ...]], *--remove-member* [MEMBER [MEMBER ...]]::
421 Specify one or more members to remove from the group
423 *--admin* [MEMBER [MEMBER ...]]::
424 Specify one or more members to make a group admin
426 *--remove-admin* [MEMBER [MEMBER ...]]::
427 Specify one or more members to remove group admin privileges
429 *--ban* [MEMBER [MEMBER ...]]::
430 Specify one or more members to ban from joining the group.
431 Banned members cannot join or request to join via a group link.
433 *--unban* [MEMBER [MEMBER ...]]::
434 Specify one or more members to remove from the ban list
437 Reset group link and create new link password
439 *--link* LINK_STATE::
440 Set group link state: `enabled`, `enabled-with-approval`, `disabled`
442 *--set-permission-add-member* PERMISSION::
443 Set permission to add new group members: `every-member`, `only-admins`
445 *--set-permission-edit-details* PERMISSION::
446 Set permission to edit group details: `every-member`, `only-admins`
448 *--set-permission-send-messages* PERMISSION::
449 Set permission to send messages in group: `every-member`, `only-admins`
450 Groups where only admins can send messages are also called announcement groups
452 *-e* EXPIRATION_SECONDS, *--expiration* EXPIRATION_SECONDS::
453 Set expiration time of messages (seconds).
454 To disable expiration set expiration time to 0.
458 Send a quit group message to all group members and remove self from member list.
459 If the user is a pending member, this command will decline the group invitation.
461 *-g* GROUP, *--group-id* GROUP::
462 Specify the recipient group ID in base64 encoding.
465 Delete local group data completely after quitting group.
469 Show a list of known groups and related information.
470 In json mode this is outputted as an list of objects and is always in detailed mode.
473 Include the list of members of each group and the group invite link.
476 Filter the group list by one or more group IDs.
480 Show a list of known contacts with names and profiles.
481 When a specific recipient is given, its profile will be refreshed.
484 Specify the recipients’ phone number.
486 *-a*, *--all-recipients*::
487 Include all known recipients, not only contacts.
490 Specify if only blocked or unblocked contacts should be shown (default: all contacts)
493 Find contacts with the given contact or profile name.
497 List all known identity keys and their trust status, fingerprint and safety number.
499 *-n* NUMBER, *--number* NUMBER::
500 Only show identity keys for the given phone number.
504 Set the trust level of a given number.
505 The first time a key for a number is seen, it is trusted by default (TOFU).
506 If the key changes, the new key must be trusted manually.
509 Specify the phone number, for which to set the trust.
511 *-a*, *--trust-all-known-keys*::
512 Trust all known keys of this user, only use this for testing.
514 *-v* VERIFIED_SAFETY_NUMBER, *--verified-safety-number* VERIFIED_SAFETY_NUMBER::
515 Specify the safety number of the key, only use this option if you have verified the safety number.
516 Can be either the plain text numbers shown in the app or the bytes from the QR-code, encoded as base64.
520 Update the profile information shown to message recipients.
521 The profile is stored encrypted on the Signal servers.
522 The decryption key is sent with every outgoing messages to contacts and included in every group.
524 *--given-name* NAME, *--name* NAME::
527 *--family-name* FAMILY_NAME::
530 *--about* ABOUT_TEXT::
531 New profile status text.
533 *--about-emoji* EMOJI::
534 New profile status emoji.
536 *--avatar* AVATAR_FILE::
537 Path to the new avatar image file.
542 *--mobile-coin-address*::
543 New MobileCoin address (Base64 encoded public address)
547 Update the info associated to a number on our contact list.
548 This change is only local but can be synchronized to other devices by using `sendContacts` (see below).
549 If the contact doesn't exist yet, it will be added.
552 Specify the contact phone number.
554 *--given-name* NAME, *--name* NAME::
557 *--family-name* FAMILY_NAME::
560 *-e*, *--expiration* EXPIRATION_SECONDS::
561 Set expiration time of messages (seconds).
562 To disable expiration set expiration time to 0.
566 Remove the info of a given contact
569 Specify the contact phone number.
572 Delete all data associated with this contact, including identity keys and sessions.
576 Block the given contacts or groups (no messages will be received).
577 This change is only local but can be synchronized to other devices by using `sendContacts` (see below).
579 [CONTACT [CONTACT ...]]::
580 Specify the phone numbers of contacts that should be blocked.
582 *-g* [GROUP [GROUP ...]], *--group-id* [GROUP [GROUP ...]]::
583 Specify the group IDs that should be blocked in base64 encoding.
587 Unblock the given contacts or groups (messages will be received again).
588 This change is only local but can be synchronized to other devices by using `sendContacts` (see below).
590 [CONTACT [CONTACT ...]]::
591 Specify the phone numbers of contacts that should be unblocked.
593 *-g* [GROUP [GROUP ...]], *--group-id* [GROUP [GROUP ...]]::
594 Specify the group IDs that should be unblocked in base64 encoding.
598 Send a synchronization message with the local contacts list to all linked devices.
599 This command should only be used if this is the primary device.
603 Send a synchronization request message to the primary device (for group, contacts, ...).
604 The primary device will respond with synchronization messages with full contact and group lists.
606 === uploadStickerPack
608 Upload a new sticker pack, consisting of a manifest file and the sticker images. +
609 Images must conform to the following specification: (see https://support.signal.org/hc/en-us/articles/360031836512-Stickers#sticker_reqs )
611 - Static stickers in PNG or WebP format
612 - Animated stickers in APNG format,
613 - Maximum file size for a sticker file is 300KiB
614 - Image resolution of 512 x 512 px
616 The required manifest.json has the following format:
621 "title": "<STICKER_PACK_TITLE>",
622 "author": "<STICKER_PACK_AUTHOR>",
623 "cover": { // Optional cover, by default the first sticker is used as cover
624 "file": "<name of image file, mandatory>",
625 "contentType": "<optional>",
626 "emoji": "<optional>"
630 "file": "<name of image file, mandatory>",
631 "contentType": "<optional>",
632 "emoji": "<optional>"
640 The path of the manifest.json or a zip file containing the sticker pack you wish to upload.
644 Gets the raw data for a specified attachment.
645 This is done using the ID of the attachment the recipient or group ID.
646 The attachment data is returned as a Base64 String.
649 The ID of the attachment as given in the attachment list of the message.
651 *--recipient* [RECIPIENT]::
652 Specify the number which sent the attachment.
653 Referred to generally as recipient.
655 *-g* [GROUP], *--group-id* [GROUP]::
656 Alternatively, specify the group IDs for which to get the attachment.
660 signal-cli can run in daemon mode and provides an experimental dbus or JSON-RPC interface.
661 If no `-a` account is given, all local accounts will be exported as separate dbus objects under the same bus name.
664 Export DBus interface on user bus. +
665 See **signal-cli-dbus**(5) for info on the dbus interface.
668 Export DBus interface on system bus. +
669 See **signal-cli-dbus**(5) for info on the dbus interface.
671 *--socket [SOCKET]*::
672 Export a JSON-RPC interface on a UNIX socket (default $XDG_RUNTIME_DIR/signal-cli/socket). +
673 See **signal-cli-jsonrpc**(5) for info on the JSON-RPC interface.
675 *--tcp [HOST:PORT]*::
676 Export a JSON-RPC interface on a TCP socket (default localhost:7583). +
677 See **signal-cli-jsonrpc**(5) for info on the JSON-RPC interface.
679 *--http [HOST:PORT]*::
680 Expose a JSON-RPC interface as http endpoint (default localhost:8080).
681 The JSON-RPC endpoint is `/api/v1/rpc`. +
682 See **signal-cli-jsonrpc**(5) for info on the JSON-RPC interface.
684 *--ignore-attachments*::
685 Don’t download attachments of received messages.
688 Don’t receive story messages from the server.
690 *--send-read-receipts*::
691 Send read receipts for all incoming data messages (in addition to the default delivery receipts)
693 *--no-receive-stdout*::
694 Don’t print received messages to stdout.
697 Specify when to start receiving messages (on-start, on-connection, manual)
699 === submitRateLimitChallenge
701 When running into rate limits, sometimes the limit can be lifted, by solving a CAPTCHA.
702 To get the captcha token, go to https://signalcaptchas.org/challenge/generate.html
703 For the staging environment, use: https://signalcaptchas.org/staging/registration/generate.html
705 *--challenge* CHALLENGE_TOKEN::
706 The challenge token from the failed send attempt.
708 *--captcha* CAPTCHA::
709 The captcha result, starting with signalcaptcha://
713 Register a number (with SMS verification)::
714 signal-cli -a ACCOUNT register
716 Verify the number using the code received via SMS or voice::
717 signal-cli -a ACCOUNT verify CODE
719 Send a message to one or more recipients::
720 signal-cli -a ACCOUNT send -m "This is a message" [RECIPIENT [RECIPIENT ...]] [-a [ATTACHMENT [ATTACHMENT ...]]]
722 Pipe the message content from another process::
723 uname -a | signal-cli -a ACCOUNT send --message-from-stdin [RECIPIENT [RECIPIENT ...]]
726 signal-cli -a ACCOUNT updateGroup -n "Group name" -m [MEMBER [MEMBER ...]]
728 Add member to a group::
729 signal-cli -a ACCOUNT updateGroup -g GROUP_ID -m "NEW_MEMBER"
731 Accept a group invitation::
732 signal-cli -a ACCOUNT updateGroup -g GROUP_ID
735 signal-cli -a ACCOUNT quitGroup -g GROUP_ID
737 Send a message to a group::
738 signal-cli -a ACCOUNT send -m "This is a message" -g GROUP_ID
740 Trust new key, after having verified it::
741 signal-cli -a ACCOUNT trust -v SAFETY_NUMBER NUMBER
743 Trust new key, without having verified it. Only use this if you don't care about security::
744 signal-cli -a ACCOUNT trust -a NUMBER
748 * *1*: Error is probably caused and fixable by the user
749 * *2*: Some unexpected error
750 * *3*: Server or IO error
751 * *4*: Sending failed due to untrusted key
755 The password and cryptographic keys are created when registering and stored in the current users home directory, the directory can be changed with *--config*:
757 `$XDG_DATA_HOME/signal-cli/` (`$HOME/.local/share/signal-cli/`)
761 Maintained by AsamK <asamk@gmx.de>, who is assisted by other open source contributors.
762 For more information about signal-cli development, see
763 <https://github.com/AsamK/signal-cli>.