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 Set the path, where to store the config.
46 Make sure you have full read/write access to the given directory.
47 (Default: `$XDG_DATA_HOME/signal-cli` (`$HOME/.local/share/signal-cli`))
49 *-a* ACCOUNT, *--account* ACCOUNT::
50 Specify your phone number, that will be your identifier.
51 The phone number must include the country calling code, i.e. the number must start with a "+" sign.
53 This flag must not be given for the `link` command.
54 It is optional for the `daemon` command.
55 For all other commands it is only optional if there is exactly one local user in the config directory.
57 *--service-environment* ENVIRONMENT::
58 Choose the server environment to use:
64 Make request via user dbus.
67 Make request via system dbus.
69 *-o* OUTPUT-MODE, *--output* OUTPUT-MODE::
70 Specify if you want commands to output in either "plain-text" mode or in "json".
71 Defaults to "plain-text"
73 *--trust-new-identities* TRUST-MODE::
74 Choose when to trust new identities:
75 - `on-first-use` (default): Trust the first seen identity key from new users, changed keys must be verified manually
76 - `always`: Trust any new identity key without verification
77 - `never`: Don't trust any unknown identity key, every key must be verified manually
83 Register a phone number with SMS or voice verification.
84 Use the verify command to complete the verification.
86 If the account is just deactivated, the register command will just reactivate account, without requiring an SMS verification.
87 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.
88 If the account was deleted (with --delete-account) it cannot be reactivated.
91 The verification should be done over voice, not SMS.
94 The captcha token, required if registration failed with a captcha required error.
95 To get the token, go to https://signalcaptchas.org/registration/generate.html
96 For the staging environment, use: https://signalcaptchas.org/staging/registration/generate.html
97 Check the developer tools for a redirect starting with signalcaptcha:// Everything after signalcaptcha:// is the captcha token.
101 Verify the number using the code received via SMS or voice.
104 The verification code.
106 *-p* PIN, *--pin* PIN::
107 The registration lock PIN, that was set by the user.
108 Only required if a PIN was set.
112 Disable push support for this device, i.e. this device won't receive any more messages.
113 If this is the primary device, other users can't send messages to this number anymore.
114 Use "updateAccount" to undo this.
115 To remove a linked device, use "removeDevice" from the primary device.
118 Delete account completely from server.
119 Cannot be undone without loss.
120 You will have to be readded to each group.
122 CAUTION: Only delete your account if you won't use this number again!
124 === deleteLocalAccountData
126 Delete all local data for this account.
127 Data should only be deleted if the account is unregistered.
129 CAUTION: This cannot be undone.
131 *--ignore-registered*::
132 Delete the account data even though the account is still registered on the Signal servers.
136 Update the account attributes on the signal server.
137 Can fix problems with receiving messages.
139 *-n* NAME, *--device-name* NAME::
140 Set a new device name for the primary or linked device
142 === updateConfiguration
144 Update signal configs and sync them to linked devices.
145 This command only works on the primary devices.
147 *--read-receipts* {true,false}::
148 Indicates if Signal should send read receipts.
150 *--unidentified-delivery-indicators* {true,false}::
151 Indicates if Signal should show unidentified delivery indicators.
153 *--typing-indicators* {true,false}::
154 Indicates if Signal should send/show typing indicators.
156 *--link-previews* {true,false}::
157 Indicates if Signal should generate link previews.
161 Set a registration lock pin, to prevent others from registering this number.
163 REGISTRATION_LOCK_PIN::
164 The registration lock PIN, that will be required for new registrations (resets after 7 days of inactivity)
168 Remove the registration lock pin.
172 Link to an existing device, instead of registering a new number.
173 This shows a "sgnl://linkdevice?uuid=..." URI.
174 If you want to connect to another signal-cli instance, you can just use this URI.
175 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.
177 *-n* NAME, *--name* NAME::
178 Optionally specify a name to describe this new device.
179 By default "cli" will be used.
183 Link another device to this device.
184 Only works, if this is the primary device.
187 Specify the uri contained in the QR code shown by the new device.
188 You will need the full URI such as "sgnl://linkdevice?uuid=..." (formerly "tsdevice:/?uuid=...") Make sure to enclose it in quotation marks for shells.
192 Show a list of linked devices.
196 Remove a linked device.
197 Only works, if this is the primary device.
199 *-d* DEVICE_ID, *--device-id* DEVICE_ID::
200 Specify the device you want to remove.
201 Use listDevices to see the deviceIds.
205 Uses a list of phone numbers to determine the statuses of those users.
206 Shows if they are registered on the Signal Servers or not.
207 In json mode this is outputted as a list of objects.
209 [NUMBER [NUMBER ...]]::
210 One or more numbers to check.
214 Send a message to another user or group.
217 Specify the recipients’ phone number.
220 Send the message to self without notification.
222 *-g* GROUP, *--group-id* GROUP::
223 Specify the recipient group ID in base64 encoding.
225 *-m* MESSAGE, *--message* MESSAGE::
228 *--message-from-stdin*::
229 Read the message from standard input.
231 *-a* [ATTACHMENT [ATTACHMENT ...]], *--attachment* [ATTACHMENT [ATTACHMENT ...]]::
232 Add one or more files as attachment.
233 Can be either a file path or a data URI. Data URI encoded attachments must follow the RFC 2397.
234 Additionally a file name can be added:
235 e.g.: `data:<MIME-TYPE>;filename=<FILENAME>;base64,<BASE64 ENCODED DATA>`
237 *--sticker* STICKER::
238 Send a sticker of a locally known sticker pack (syntax: stickerPackId:stickerId).
239 Shouldn't be used together with `-m` as the official clients don't support this.
240 e.g.: `--sticker 00abac3bc18d7f599bff2325dc306d43:2`
243 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.
244 e.g.: `-m "Hi X!" --mention "3:1:+123456789"`
246 *--quote-timestamp*::
247 Specify the timestamp of a previous message with the recipient or group to add a quote to the new message.
250 Specify the number of the author of the original message.
253 Specify the message of the original message.
256 Specify the mentions of the original message (same format as `--mention`).
259 Specify the url for the link preview.
260 The same url must also appear in the message body, otherwise the preview won't be
261 displayed by the apps.
264 Specify the title for the link preview (mandatory).
266 *--preview-description*::
267 Specify the description for the link preview (optional).
270 Specify the image file for the link preview (optional).
272 *-e*, *--end-session*::
273 Clear session state and send end session message.
275 === sendPaymentNotification
277 Send a payment notification.
280 Specify the recipient’s phone number.
282 *--receipt* RECEIPT::
283 The base64 encoded receipt blob.
286 Specify a note for the payment notification.
290 Send reaction to a previously received or sent message.
293 Specify the recipients’ phone number.
295 *-g* GROUP, *--group-id* GROUP::
296 Specify the recipient group ID in base64 encoding.
298 *-e* EMOJI, *--emoji* EMOJI::
299 Specify the emoji, should be a single unicode grapheme cluster.
301 *-a* NUMBER, *--target-author* NUMBER::
302 Specify the number of the author of the message to which to react.
304 *-t* TIMESTAMP, *--target-timestamp* TIMESTAMP::
305 Specify the timestamp of the message to which to react.
312 Send a read or viewed receipt to a previously received message.
315 Specify the sender’s phone number.
317 *-t* TIMESTAMP, *--target-timestamp* TIMESTAMP::
318 Specify the timestamp of the message to which to react.
321 Specify the receipt type, either `read` (the default) or `viewed`.
325 Send typing message to trigger a typing indicator for the recipient.
326 Indicator will be shown for 15seconds unless a typing STOP message is sent first.
329 Specify the recipients’ phone number.
331 *-g* GROUP, *--group-id* GROUP::
332 Specify the recipient group ID in base64 encoding.
335 Send a typing STOP message.
339 Remotely delete a previously sent message.
342 Specify the recipients’ phone number.
344 *-g* GROUP, *--group-id* GROUP::
345 Specify the recipient group ID in base64 encoding.
347 *-t* TIMESTAMP, *--target-timestamp* TIMESTAMP::
348 Specify the timestamp of the message to delete.
352 Query the server for new messages.
353 New messages are printed on standard output and attachments are downloaded to the config directory.
354 In json mode this is outputted as one json object per line.
356 *-t* TIMEOUT, *--timeout* TIMEOUT::
357 Number of seconds to wait for new messages (negative values disable timeout).
358 Default is 5 seconds.
359 *--ignore-attachments*::
360 Don’t download attachments of received messages.
362 *--send-read-receipts*::
363 Send read receipts for all incoming data messages (in addition to the default delivery receipts)
367 Join a group via an invitation link.
370 The invitation link URI (starts with `https://signal.group/#`)
374 Create or update a group.
375 If the user is a pending member, this command will accept the group invitation.
377 *-g* GROUP, *--group-id* GROUP::
378 Specify the recipient group ID in base64 encoding.
379 If not specified, a new group with a new random ID is generated.
381 *-n* NAME, *--name* NAME::
382 Specify the new group name.
384 *-d* DESCRIPTION, *--description* DESCRIPTION::
385 Specify the new group description.
387 *-a* AVATAR, *--avatar* AVATAR::
388 Specify a new group avatar image file.
390 *-m* [MEMBER [MEMBER ...]], *--member* [MEMBER [MEMBER ...]]::
391 Specify one or more members to add to the group.
393 *-r* [MEMBER [MEMBER ...]], *--remove-member* [MEMBER [MEMBER ...]]::
394 Specify one or more members to remove from the group
396 *--admin* [MEMBER [MEMBER ...]]::
397 Specify one or more members to make a group admin
399 *--remove-admin* [MEMBER [MEMBER ...]]::
400 Specify one or more members to remove group admin privileges
402 *--ban* [MEMBER [MEMBER ...]]::
403 Specify one or more members to ban from joining the group.
404 Banned members cannot join or request to join via a group link.
406 *--unban* [MEMBER [MEMBER ...]]::
407 Specify one or more members to remove from the ban list
410 Reset group link and create new link password
412 *--link* LINK_STATE::
413 Set group link state: `enabled`, `enabled-with-approval`, `disabled`
415 *--set-permission-add-member* PERMISSION::
416 Set permission to add new group members: `every-member`, `only-admins`
418 *--set-permission-edit-details* PERMISSION::
419 Set permission to edit group details: `every-member`, `only-admins`
421 *--set-permission-send-messages* PERMISSION::
422 Set permission to send messages in group: `every-member`, `only-admins`
423 Groups where only admins can send messages are also called announcement groups
425 *-e* EXPIRATION_SECONDS, *--expiration* EXPIRATION_SECONDS::
426 Set expiration time of messages (seconds).
427 To disable expiration set expiration time to 0.
431 Send a quit group message to all group members and remove self from member list.
432 If the user is a pending member, this command will decline the group invitation.
434 *-g* GROUP, *--group-id* GROUP::
435 Specify the recipient group ID in base64 encoding.
438 Delete local group data completely after quitting group.
442 Show a list of known groups and related information.
443 In json mode this is outputted as an list of objects and is always in detailed mode.
446 Include the list of members of each group and the group invite link.
449 Filter the group list by one or more group IDs.
453 Show a list of known contacts with names and profiles.
454 When a specific recipient is given, its profile will be refreshed.
457 Specify the recipients’ phone number.
459 *-a*, *--all-recipients*::
460 Include all known recipients, not only contacts.
463 Specify if only blocked or unblocked contacts should be shown (default: all contacts)
466 Find contacts with the given contact or profile name.
470 List all known identity keys and their trust status, fingerprint and safety number.
472 *-n* NUMBER, *--number* NUMBER::
473 Only show identity keys for the given phone number.
477 Set the trust level of a given number.
478 The first time a key for a number is seen, it is trusted by default (TOFU).
479 If the key changes, the new key must be trusted manually.
482 Specify the phone number, for which to set the trust.
484 *-a*, *--trust-all-known-keys*::
485 Trust all known keys of this user, only use this for testing.
487 *-v* VERIFIED_SAFETY_NUMBER, *--verified-safety-number* VERIFIED_SAFETY_NUMBER::
488 Specify the safety number of the key, only use this option if you have verified the safety number.
489 Can be either the plain text numbers shown in the app or the bytes from the QR-code, encoded as base64.
493 Update the profile information shown to message recipients.
494 The profile is stored encrypted on the Signal servers.
495 The decryption key is sent with every outgoing messages to contacts and included in every group.
497 *--given-name* NAME, *--name* NAME::
500 *--family-name* FAMILY_NAME::
503 *--about* ABOUT_TEXT::
504 New profile status text.
506 *--about-emoji* EMOJI::
507 New profile status emoji.
509 *--avatar* AVATAR_FILE::
510 Path to the new avatar image file.
515 *--mobile-coin-address*::
516 New MobileCoin address (Base64 encoded public address)
520 Update the info associated to a number on our contact list.
521 This change is only local but can be synchronized to other devices by using `sendContacts` (see below).
522 If the contact doesn't exist yet, it will be added.
525 Specify the contact phone number.
527 *--given-name* NAME, *--name* NAME::
530 *--family-name* FAMILY_NAME::
533 *-e*, *--expiration* EXPIRATION_SECONDS::
534 Set expiration time of messages (seconds).
535 To disable expiration set expiration time to 0.
539 Remove the info of a given contact
542 Specify the contact phone number.
545 Delete all data associated with this contact, including identity keys and sessions.
549 Block the given contacts or groups (no messages will be received).
550 This change is only local but can be synchronized to other devices by using `sendContacts` (see below).
552 [CONTACT [CONTACT ...]]::
553 Specify the phone numbers of contacts that should be blocked.
555 *-g* [GROUP [GROUP ...]], *--group-id* [GROUP [GROUP ...]]::
556 Specify the group IDs that should be blocked in base64 encoding.
560 Unblock the given contacts or groups (messages will be received again).
561 This change is only local but can be synchronized to other devices by using `sendContacts` (see below).
563 [CONTACT [CONTACT ...]]::
564 Specify the phone numbers of contacts that should be unblocked.
566 *-g* [GROUP [GROUP ...]], *--group-id* [GROUP [GROUP ...]]::
567 Specify the group IDs that should be unblocked in base64 encoding.
571 Send a synchronization message with the local contacts list to all linked devices.
572 This command should only be used if this is the primary device.
576 Send a synchronization request message to the primary device (for group, contacts, ...).
577 The primary device will respond with synchronization messages with full contact and group lists.
579 === uploadStickerPack
581 Upload a new sticker pack, consisting of a manifest file and the sticker images.
582 Images must conform to the following specification: (see https://support.signal.org/hc/en-us/articles/360031836512-Stickers#sticker_reqs )
584 - Static stickers in PNG or WebP format
585 - Animated stickers in APNG format,
586 - Maximum file size for a sticker file is 300KiB
587 - Image resolution of 512 x 512 px
589 The required manifest.json has the following format:
594 "title": "<STICKER_PACK_TITLE>",
595 "author": "<STICKER_PACK_AUTHOR>",
596 "cover": { // Optional cover, by default the first sticker is used as cover
597 "file": "<name of image file, mandatory>",
598 "contentType": "<optional>",
599 "emoji": "<optional>"
603 "file": "<name of image file, mandatory>",
604 "contentType": "<optional>",
605 "emoji": "<optional>"
613 The path of the manifest.json or a zip file containing the sticker pack you wish to upload.
617 signal-cli can run in daemon mode and provides an experimental dbus or JSON-RPC interface.
618 If no `-a` account is given, all local accounts will be exported as separate dbus objects under the same bus name.
621 Export DBus interface on user bus.
622 See signal-cli-dbus (5) for info on the dbus interface.
625 Export DBus interface on system bus.
626 See signal-cli-dbus (5) for info on the dbus interface.
628 *--socket [SOCKET]*::
629 Export a JSON-RPC interface on a UNIX socket (default $XDG_RUNTIME_DIR/signal-cli/socket).
630 See signal-cli-jsonrpc (5) for info on the JSON-RPC interface.
632 *--tcp [HOST:PORT]*::
633 Export a JSON-RPC interface on a TCP socket (default localhost:7583).
634 See signal-cli-jsonrpc (5) for info on the JSON-RPC interface.
636 *--ignore-attachments*::
637 Don’t download attachments of received messages.
639 *--send-read-receipts*::
640 Send read receipts for all incoming data messages (in addition to the default delivery receipts)
642 *--no-receive-stdout*::
643 Don’t print received messages to stdout.
646 Specify when to start receiving messages (on-start, on-connection, manual)
650 Register a number (with SMS verification)::
651 signal-cli -a ACCOUNT register
653 Verify the number using the code received via SMS or voice::
654 signal-cli -a ACCOUNT verify CODE
656 Send a message to one or more recipients::
657 signal-cli -a ACCOUNT send -m "This is a message" [RECIPIENT [RECIPIENT ...]] [-a [ATTACHMENT [ATTACHMENT ...]]]
659 Pipe the message content from another process::
660 uname -a | signal-cli -a ACCOUNT send --message-from-stdin [RECIPIENT [RECIPIENT ...]]
663 signal-cli -a ACCOUNT updateGroup -n "Group name" -m [MEMBER [MEMBER ...]]
665 Add member to a group::
666 signal-cli -a ACCOUNT updateGroup -g GROUP_ID -m "NEW_MEMBER"
668 Accept a group invitation::
669 signal-cli -a ACCOUNT updateGroup -g GROUP_ID
672 signal-cli -a ACCOUNT quitGroup -g GROUP_ID
674 Send a message to a group::
675 signal-cli -a ACCOUNT send -m "This is a message" -g GROUP_ID
677 Trust new key, after having verified it::
678 signal-cli -a ACCOUNT trust -v SAFETY_NUMBER NUMBER
680 Trust new key, without having verified it. Only use this if you don't care about security::
681 signal-cli -a ACCOUNT trust -a NUMBER
685 * *1*: Error is probably caused and fixable by the user
686 * *2*: Some unexpected error
687 * *3*: Server or IO error
688 * *4*: Sending failed due to untrusted key
692 The password and cryptographic keys are created when registering and stored in the current users home directory, the directory can be changed with *--config*:
694 `$XDG_DATA_HOME/signal-cli/` (`$HOME/.local/share/signal-cli/`)
698 Maintained by AsamK <asamk@gmx.de>, who is assisted by other open source contributors.
699 For more information about signal-cli development, see
700 <https://github.com/AsamK/signal-cli>.