]> nmode's Git Repositories - signal-cli/blob - man/signal-cli.1.adoc
Update man page
[signal-cli] / man / signal-cli.1.adoc
1 /////
2 vim:set ts=4 sw=4 tw=82 noet:
3 /////
4 :quotes.~:
5
6 = signal-cli (1)
7
8 == Name
9
10 signal-cli - A commandline and dbus interface for the Signal messenger
11
12 == Synopsis
13
14 *signal-cli* [--config CONFIG] [-h | -v | -u USERNAME | --dbus | --dbus-system] command [command-options]
15
16 == Description
17
18 signal-cli is a commandline interface for libsignal-service-java.
19 It supports registering, verifying, sending and receiving messages.
20 For registering you need a phone number where you can receive SMS or incoming calls.
21 signal-cli was primarily developed to be used on servers to notify admins of important events.
22 For this use-case, it has a dbus interface, that can be used to send messages from any programming language that has dbus bindings.
23
24 For some functionality the Signal protocol requires that all messages have been received from the server.
25 The `receive` command should be regularly executed. In daemon mode messages are continuously received.
26
27 == Options
28
29 *-h*, *--help*::
30 Show help message and quit.
31
32 *-v*, *--version*::
33 Print the version and quit.
34
35 *--config* CONFIG::
36 Set the path, where to store the config.
37 Make sure you have full read/write access to the given directory.
38 (Default: `$XDG_DATA_HOME/signal-cli` (`$HOME/.local/share/signal-cli`))
39
40 *-u* USERNAME, *--username* USERNAME::
41 Specify your phone number, that will be your identifier.
42 The phone number must include the country calling code, i.e. the number must start with a "+" sign.
43
44 *--dbus*::
45 Make request via user dbus.
46
47 *--dbus-system*::
48 Make request via system dbus.
49
50 *-o* OUTPUT-MODE, *--output* OUTPUT-MODE::
51 Specify if you want commands to output in either "plain-text" mode or in "json". Defaults to "plain-text"
52
53 == Commands
54
55 === register
56
57 Register a phone number with SMS or voice verification.
58 Use the verify command to complete the verification.
59
60 *-v*, *--voice*::
61 The verification should be done over voice, not SMS.
62
63 *--captcha*::
64 The captcha token, required if registration failed with a captcha required error.
65 To get the token, go to https://signalcaptchas.org/registration/generate.html
66 Check the developer tools for a redirect starting with signalcaptcha://
67 Everything after signalcaptcha:// is the captcha token.
68
69 === verify
70
71 Verify the number using the code received via SMS or voice.
72
73 VERIFICATIONCODE::
74 The verification code.
75
76 *-p* PIN, *--pin* PIN::
77 The registration lock PIN, that was set by the user.
78 Only required if a PIN was set.
79
80 === unregister
81
82 Disable push support for this device, i.e. this device won't receive any more messages.
83 If this is the master device, other users can't send messages to this number anymore.
84 Use "updateAccount" to undo this.
85 To remove a linked device, use "removeDevice" from the master device.
86
87 === updateAccount
88
89 Update the account attributes on the signal server.
90 Can fix problems with receiving messages.
91
92 === setPin
93
94 Set a registration lock pin, to prevent others from registering this number.
95
96 REGISTRATION_LOCK_PIN::
97 The registration lock PIN, that will be required for new registrations (resets after 7 days of inactivity)
98
99 === removePin
100
101 Remove the registration lock pin.
102
103 === link
104
105 Link to an existing device, instead of registering a new number.
106 This shows a "tsdevice:/…" URI. If you want to connect to another signal-cli instance, you can just use this URI.
107 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.
108
109 *-n* NAME, *--name* NAME::
110 Optionally specify a name to describe this new device.
111 By default "cli" will be used.
112
113 === addDevice
114
115 Link another device to this device.
116 Only works, if this is the master device.
117
118 *--uri* URI::
119 Specify the uri contained in the QR code shown by the new device.
120 You will need the full uri enclosed in quotation marks, such as "tsdevice:/?uuid=....."
121
122 === listDevices
123
124 Show a list of connected devices.
125
126 === removeDevice
127
128 Remove a connected device.
129 Only works, if this is the master device.
130
131 *-d* DEVICEID, *--deviceId* DEVICEID::
132 Specify the device you want to remove.
133 Use listDevices to see the deviceIds.
134
135 === getUserStatus
136
137 Uses a list of phone numbers to determine the statuses of those users.
138 Shows if they are registered on the Signal Servers or not.
139 In json mode this is outputted as a list of objects.
140
141 [NUMBER [NUMBER ...]]::
142 One or more numbers to check.
143
144 === send
145
146 Send a message to another user or group.
147
148 RECIPIENT::
149 Specify the recipients’ phone number.
150
151 *-g* GROUP, *--group* GROUP::
152 Specify the recipient group ID in base64 encoding.
153
154 *-m* MESSAGE, *--message* MESSAGE::
155 Specify the message, if missing, standard input is used.
156
157 *-a* [ATTACHMENT [ATTACHMENT ...]], *--attachment* [ATTACHMENT [ATTACHMENT ...]]::
158 Add one or more files as attachment.
159
160 *-e*, *--endsession*::
161 Clear session state and send end session message.
162
163 === sendReaction
164
165 Send reaction to a previously received or sent message.
166
167 RECIPIENT::
168 Specify the recipients’ phone number.
169
170 *-g* GROUP, *--group* GROUP::
171 Specify the recipient group ID in base64 encoding.
172
173 *-e* EMOJI, *--emoji* EMOJI::
174 Specify the emoji, should be a single unicode grapheme cluster.
175
176 *-a* NUMBER, *--target-author* NUMBER::
177 Specify the number of the author of the message to which to react.
178
179 *-t* TIMESTAMP, *--target-timestamp* TIMESTAMP::
180 Specify the timestamp of the message to which to react.
181
182 *-r*, *--remove*::
183 Remove a reaction.
184
185 === receive
186
187 Query the server for new messages.
188 New messages are printed on standard output and attachments are downloaded to the config directory.
189 In json mode this is outputted as one json object per line.
190
191 *-t* TIMEOUT, *--timeout* TIMEOUT::
192 Number of seconds to wait for new messages (negative values disable timeout).
193 Default is 5 seconds.
194 *--ignore-attachments*::
195 Don’t download attachments of received messages.
196
197 === joinGroup
198
199 Join a group via an invitation link.
200
201 *--uri*::
202 The invitation link URI (starts with `https://signal.group/#`)
203
204 === updateGroup
205
206 Create or update a group.
207 If the user is a pending member, this command will accept the group invitation.
208
209 *-g* GROUP, *--group* GROUP::
210 Specify the recipient group ID in base64 encoding.
211 If not specified, a new group with a new random ID is generated.
212
213 *-n* NAME, *--name* NAME::
214 Specify the new group name.
215
216 *-a* AVATAR, *--avatar* AVATAR::
217 Specify a new group avatar image file.
218
219 *-m* [MEMBER [MEMBER ...]], *--member* [MEMBER [MEMBER ...]]::
220 Specify one or more members to add to the group.
221
222 === quitGroup
223
224 Send a quit group message to all group members and remove self from member list.
225 If the user is a pending member, this command will decline the group invitation.
226
227 *-g* GROUP, *--group* GROUP::
228 Specify the recipient group ID in base64 encoding.
229
230 === listGroups
231
232 Show a list of known groups and related information.
233 In json mode this is outputted as an list of objects and is always in detailed mode.
234
235 *-d*, *--detailed*::
236 Include the list of members of each group and the group invite link.
237
238 === listIdentities
239
240 List all known identity keys and their trust status, fingerprint and safety number.
241
242 *-n* NUMBER, *--number* NUMBER::
243 Only show identity keys for the given phone number.
244
245 === trust
246
247 Set the trust level of a given number.
248 The first time a key for a number is seen, it is trusted by default (TOFU).
249 If the key changes, the new key must be trusted manually.
250
251 number::
252 Specify the phone number, for which to set the trust.
253
254 *-a*, *--trust-all-known-keys*::
255 Trust all known keys of this user, only use this for testing.
256
257 *-v* VERIFIED_SAFETY_NUMBER, *--verified-safety-number* VERIFIED_SAFETY_NUMBER::
258 Specify the safety number of the key, only use this option if you have verified the safety number.
259
260 === updateProfile
261
262 Update the name and avatar image visible by message recipients for the current users.
263 The profile is stored encrypted on the Signal servers.
264 The decryption key is sent with every outgoing messages to contacts.
265
266 *--name*::
267 New name visible by message recipients.
268
269 *--avatar*::
270 Path to the new avatar visible by message recipients.
271
272 *--remove-avatar*::
273 Remove the avatar visible by message recipients.
274
275 === updateContact
276
277 Update the info associated to a number on our contact list.
278 This change is only local but can be synchronized to other devices by using `sendContacts` (see below).
279 If the contact doesn't exist yet, it will be added.
280
281 NUMBER::
282 Specify the contact phone number.
283
284 *-n*, *--name*::
285 Specify the new name for this contact.
286
287 *-e*, *--expiration*::
288 Set expiration time of messages (seconds).
289 To disable expiration set expiration time to 0.
290
291 === block
292
293 Block the given contacts or groups (no messages will be received).
294 This change is only local but can be synchronized to other devices by using `sendContacts` (see below).
295
296 [CONTACT [CONTACT ...]]::
297 Specify the phone numbers of contacts that should be blocked.
298
299 *-g* [GROUP [GROUP ...]], *--group* [GROUP [GROUP ...]]::
300 Specify the group IDs that should be blocked in base64 encoding.
301
302 === unblock
303
304 Unblock the given contacts or groups (messages will be received again).
305 This change is only local but can be synchronized to other devices by using `sendContacts` (see below).
306
307 [CONTACT [CONTACT ...]]::
308 Specify the phone numbers of contacts that should be unblocked.
309
310 *-g* [GROUP [GROUP ...]], *--group* [GROUP [GROUP ...]]::
311 Specify the group IDs that should be unblocked in base64 encoding.
312
313 === sendContacts
314
315 Send a synchronization message with the local contacts list to all linked devices.
316 This command should only be used if this is the master device.
317
318 === uploadStickerPack
319
320 Upload a new sticker pack, consisting of a manifest file and the stickers in WebP format (maximum size for a sticker file is 100KiB).
321 The required manifest.json has the following format:
322
323 [source,json]
324 ----
325 {
326 "title": "<STICKER_PACK_TITLE>",
327 "author": "<STICKER_PACK_AUTHOR>",
328 "cover": { // Optional cover, by default the first sticker is used as cover
329 "file": "<name of webp file, mandatory>",
330 "emoji": "<optional>"
331 },
332 "stickers": [
333 {
334 "file": "<name of webp file, mandatory>",
335 "emoji": "<optional>"
336 }
337 ...
338 ]
339 }
340 ----
341
342 PATH::
343 The path of the manifest.json or a zip file containing the sticker pack you wish to upload.
344
345 === daemon
346
347 signal-cli can run in daemon mode and provides an experimental dbus interface.
348
349 *--system*::
350 Use DBus system bus instead of user bus.
351 *--ignore-attachments*::
352 Don’t download attachments of received messages.
353
354 == Examples
355
356 Register a number (with SMS verification)::
357 signal-cli -u USERNAME register
358
359 Verify the number using the code received via SMS or voice::
360 signal-cli -u USERNAME verify CODE
361
362 Send a message to one or more recipients::
363 signal-cli -u USERNAME send -m "This is a message" [RECIPIENT [RECIPIENT ...]] [-a [ATTACHMENT [ATTACHMENT ...]]]
364
365 Pipe the message content from another process::
366 uname -a | signal-cli -u USERNAME send [RECIPIENT [RECIPIENT ...]]
367
368 Create a group::
369 signal-cli -u USERNAME updateGroup -n "Group name" -m [MEMBER [MEMBER ...]]
370
371 Add member to a group::
372 signal-cli -u USERNAME updateGroup -g GROUP_ID -m "NEW_MEMBER"
373
374 Leave a group::
375 signal-cli -u USERNAME quitGroup -g GROUP_ID
376
377 Send a message to a group::
378 signal-cli -u USERNAME send -m "This is a message" -g GROUP_ID
379
380 Trust new key, after having verified it::
381 signal-cli -u USERNAME trust -v SAFETY_NUMBER NUMBER
382
383 Trust new key, without having verified it. Only use this if you don't care about security::
384 signal-cli -u USERNAME trust -a NUMBER
385
386 == Files
387
388 The password and cryptographic keys are created when registering and stored in the current users home directory, the directory can be changed with *--config*:
389
390 `$XDG_DATA_HOME/signal-cli/` (`$HOME/.local/share/signal-cli/`)
391
392 For legacy users, the old config directories are used as a fallback:
393
394 $HOME/.config/signal/
395
396 $HOME/.config/textsecure/
397
398 == Authors
399
400 Maintained by AsamK <asamk@gmx.de>, who is assisted by other open source contributors.
401 For more information about signal-cli development, see
402 <https://github.com/AsamK/signal-cli>.