signal-cli was primarily developed to be used on servers to notify admins of important events.
For this use-case, it has a dbus and a JSON-RPC interface, that can be used to send messages from other programs.
+Originally the Signal protocol only allowed sending messages to other phone numbers.
+Now with the introduction of phone number privacy, the phone number of a recipient is not always known.
+Only the recipient's ServiceId, ACI/PNI (a special UUID) is known.
+
+In all places where a RECIPIENT argument is expected in signal-cli's interface, one of the following can be used:
+
+- The phone number
+- The ACI, just a UUID
+- The PNI, just a UUID, with "PNI:" prefix
+- The username, with "u:" prefix, e.g. "u:test.000"
+
For some functionality the Signal protocol requires that all messages have been received from the server.
The `receive` command should be regularly executed.
In daemon mode messages are by default continuously received.
Change an account to a new phone number with SMS or voice verification.
Use the finishChangeNumber command to complete the verification.
-NUMBER::
+RECIPIENT::
The new phone number.
*-v*, *--voice*::
Verify the number using the code received via SMS or voice.
-NUMBER::
+RECIPIENT::
The new phone number.
*-v*, *--verification-code*::
=== setPin
-Set a registration lock pin, to prevent others from registering this number.
+Set a registration lock pin, to prevent others from registering your account's phone number.
REGISTRATION_LOCK_PIN::
The registration lock PIN, that will be required for new registrations (resets after 7 days of inactivity)
*--uri* URI::
Specify the uri contained in the QR code shown by the new device.
-You will need the full URI such as "sgnl://linkdevice?uuid=..." (formerly "tsdevice:/?uuid=...") Make sure to enclose it in quotation marks for shells.
+You will need the full URI such as "sgnl://linkdevice?uuid=...&pub_key=..." (formerly "tsdevice:/?uuid=...") Make sure to enclose it in quotation marks for shells.
=== listDevices
Shows if they are registered on the Signal Servers or not.
In json mode this is outputted as a list of objects.
-[NUMBER [NUMBER ...]]::
+[RECIPIENT [RECIPIENT ...]]::
One or more numbers to check.
[--username [USERNAME ...]]::
Send a message to another user or group.
RECIPIENT::
-Specify the recipients’ phone number.
+Specify the recipients.
*--note-to-self*::
Send the message to self without notification.
Additionally a file name can be added:
e.g.: `data:<MIME-TYPE>;filename=<FILENAME>;base64,<BASE64 ENCODED DATA>`
+*--view-once*::
+Send the message as a view once message.
+A conformant client will only allow the receiver to view the message once.
+View Once is only supported for messages that include an image attachment.
+
*--sticker* STICKER::
Send a sticker of a locally known sticker pack (syntax: stickerPackId:stickerId).
Shouldn't be used together with `-m` as the official clients don't support this.
*--mention*::
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.
+The units of start and length should be UTF-16 code units, NOT Unicode code points.
+For more information, see https://github.com/AsamK/signal-cli/wiki/FAQ#string-indexing-units
e.g.: `-m "Hi X!" --mention "3:1:+123456789"`
*--text-style*::
Style parts of the message text (syntax: start:length:STYLE).
+Like `--mention`, the units are UTF-16 code units.
Where STYLE is one of: BOLD, ITALIC, SPOILER, STRIKETHROUGH, MONOSPACE
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"`
Specify the timestamp of a previous message with the recipient or group to add a quote to the new message.
*--quote-author*::
-Specify the number of the author of the original message.
+Specify the author of the original message.
*--quote-message*::
Specify the message of the original message.
Specify the timestamp of a story to reply to.
*--story-author*::
-Specify the number of the author of the story.
+Specify the author of the story.
*-e*, *--end-session*::
Clear session state and send end session message.
Send response to a message request to linked devices.
RECIPIENT::
-Specify the recipients’ phone number.
+Specify the recipients.
*-g* GROUP, *--group-id* GROUP::
Specify the recipient group ID in base64 encoding.
Send a payment notification.
RECIPIENT::
-Specify the recipient’s phone number.
+Specify the recipient.
*--receipt* RECEIPT::
The base64 encoded receipt blob.
Send reaction to a previously received or sent message.
RECIPIENT::
-Specify the recipients’ phone number.
+Specify the recipients.
*-g* GROUP, *--group-id* GROUP::
Specify the recipient group ID in base64 encoding.
*-e* EMOJI, *--emoji* EMOJI::
Specify the emoji, should be a single unicode grapheme cluster.
-*-a* NUMBER, *--target-author* NUMBER::
-Specify the number of the author of the message to which to react.
+*-a* RECIPIENT, *--target-author* RECIPIENT::
+Specify the author of the message to which to react.
*-t* TIMESTAMP, *--target-timestamp* TIMESTAMP::
Specify the timestamp of the message to which to react.
Send a read or viewed receipt to a previously received message.
RECIPIENT::
-Specify the sender’s phone number.
+Specify the sender.
*-t* TIMESTAMP, *--target-timestamp* TIMESTAMP::
Specify the timestamp of the message to which to react.
Indicator will be shown for 15seconds unless a typing STOP message is sent first.
RECIPIENT::
-Specify the recipients’ phone number.
+Specify the recipients.
*-g* GROUP, *--group-id* GROUP::
Specify the recipient group ID in base64 encoding.
Remotely delete a previously sent message.
RECIPIENT::
-Specify the recipients’ phone number.
+Specify the recipients.
*-g* GROUP, *--group-id* GROUP::
Specify the recipient group ID in base64 encoding.
When a specific recipient is given, its profile will be refreshed.
RECIPIENT::
-Specify the recipients’ phone number.
+Specify the recipients.
*-a*, *--all-recipients*::
Include all known recipients, not only contacts.
*--name*::
Find contacts with the given contact or profile name.
+*--detailed*::
+List the contacts with more details.
+If output=json, then this is always set
+
+*--internal*::
+Include internal information that's normally not user visible
+
=== listIdentities
List all known identity keys and their trust status, fingerprint and safety number.
-*-n* NUMBER, *--number* NUMBER::
-Only show identity keys for the given phone number.
+*-n* RECIPIENT, *--number* RECIPIENT::
+Only show identity keys for the given recipient.
=== trust
-Set the trust level of a given number.
-The first time a key for a number is seen, it is trusted by default (TOFU).
+Set the trust level of a given recipient.
+The first time a key for a recipient is seen, it is trusted by default (TOFU).
If the key changes, the new key must be trusted manually.
-number::
-Specify the phone number, for which to set the trust.
+RECIPIENT::
+Specify the recipient, for which to set the trust.
*-a*, *--trust-all-known-keys*::
Trust all known keys of this user, only use this for testing.
*--remove-avatar*::
Remove the avatar
-*--mobile-coin-address*::
+*--mobile-coin-address*, **--mobilecoin-address**::
New MobileCoin address (Base64 encoded public address)
=== updateContact
-Update the info associated to a number on our contact list.
+Update the info associated to a recipient on our contact list.
This change is only local but can be synchronized to other devices by using `sendContacts` (see below).
If the contact doesn't exist yet, it will be added.
-NUMBER::
-Specify the contact phone number.
+RECIPIENT::
+Specify the recipient.
-*--given-name* NAME, *--name* NAME::
-New (given) name.
+*--given-name* GIVEN_NAME, *--name* NAME::
+New system given name.
*--family-name* FAMILY_NAME::
-New family name.
+New system family name.
+
+*--nick-given-name* NICK_GIVEN_NAME::
+New nick given name.
+
+*--nick-family-name* NICK_FAMILY_NAME::
+New nick family name.
+
+*--note* NOTE::
+New note.
*-e*, *--expiration* EXPIRATION_SECONDS::
Set expiration time of messages (seconds).
Remove the info of a given contact
-NUMBER::
-Specify the contact phone number.
+RECIPIENT::
+Specify the recipient.
*--hide*::
Hide the contact in the contact list, but keep the data.
Block the given contacts or groups (no messages will be received).
This change is only local but can be synchronized to other devices by using `sendContacts` (see below).
-[CONTACT [CONTACT ...]]::
-Specify the phone numbers of contacts that should be blocked.
+[RECIPIENT [RECIPIENT ...]]::
+Specify the contacts that should be blocked.
*-g* [GROUP [GROUP ...]], *--group-id* [GROUP [GROUP ...]]::
Specify the group IDs that should be blocked in base64 encoding.
Unblock the given contacts or groups (messages will be received again).
This change is only local but can be synchronized to other devices by using `sendContacts` (see below).
-[CONTACT [CONTACT ...]]::
-Specify the phone numbers of contacts that should be unblocked.
+[RECIPIENT [RECIPIENT ...]]::
+Specify the contacts that should be unblocked.
*-g* [GROUP [GROUP ...]], *--group-id* [GROUP [GROUP ...]]::
Specify the group IDs that should be unblocked in base64 encoding.
The ID of the attachment as given in the attachment list of the message.
*--recipient* [RECIPIENT]::
-Specify the number which sent the attachment.
+Specify the recipient which sent the attachment.
Referred to generally as recipient.
*-g* [GROUP], *--group-id* [GROUP]::
The attachment data is returned as a Base64 String.
*--contact* [RECIPIENT]::
-Specify the number of a recipient.
+Specify the recipient.
*--profile* [RECIPIENT]::
-Specify the number of a recipient.
+Specify the recipient.
*-g* [GROUP], *--group-id* [GROUP]::
Alternatively, specify the group ID for which to get the avatar.
signal-cli -a ACCOUNT send -m "This is a message" -g GROUP_ID
Trust new key, after having verified it::
-signal-cli -a ACCOUNT trust -v SAFETY_NUMBER NUMBER
+signal-cli -a ACCOUNT trust -v SAFETY_NUMBER RECIPIENT
Trust new key, without having verified it. Only use this if you don't care about security::
-signal-cli -a ACCOUNT trust -a NUMBER
+signal-cli -a ACCOUNT trust -a RECIPIENT
== Exit codes