mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 02:20:39 +00:00
parent
ab40344567
commit
b8a0901fbd
27 changed files with 38 additions and 15 deletions
|
@ -135,14 +135,14 @@ You will need the full uri enclosed in quotation marks, such as "tsdevice:/?uuid
|
||||||
|
|
||||||
=== listDevices
|
=== listDevices
|
||||||
|
|
||||||
Show a list of connected devices.
|
Show a list of linked devices.
|
||||||
|
|
||||||
=== removeDevice
|
=== removeDevice
|
||||||
|
|
||||||
Remove a connected device.
|
Remove a linked device.
|
||||||
Only works, if this is the master device.
|
Only works, if this is the master device.
|
||||||
|
|
||||||
*-d* DEVICEID, *--device-id* DEVICEID::
|
*-d* DEVICE_ID, *--device-id* DEVICE_ID::
|
||||||
Specify the device you want to remove.
|
Specify the device you want to remove.
|
||||||
Use listDevices to see the deviceIds.
|
Use listDevices to see the deviceIds.
|
||||||
|
|
||||||
|
@ -293,6 +293,10 @@ In json mode this is outputted as an list of objects and is always in detailed m
|
||||||
*-d*, *--detailed*::
|
*-d*, *--detailed*::
|
||||||
Include the list of members of each group and the group invite link.
|
Include the list of members of each group and the group invite link.
|
||||||
|
|
||||||
|
=== listContacts
|
||||||
|
|
||||||
|
Show a list of known contacts with names.
|
||||||
|
|
||||||
=== listIdentities
|
=== listIdentities
|
||||||
|
|
||||||
List all known identity keys and their trust status, fingerprint and safety number.
|
List all known identity keys and their trust status, fingerprint and safety number.
|
||||||
|
@ -447,6 +451,9 @@ signal-cli -u USERNAME updateGroup -n "Group name" -m [MEMBER [MEMBER ...]]
|
||||||
Add member to a group::
|
Add member to a group::
|
||||||
signal-cli -u USERNAME updateGroup -g GROUP_ID -m "NEW_MEMBER"
|
signal-cli -u USERNAME updateGroup -g GROUP_ID -m "NEW_MEMBER"
|
||||||
|
|
||||||
|
Accept a group invitation::
|
||||||
|
signal-cli -u USERNAME updateGroup -g GROUP_ID
|
||||||
|
|
||||||
Leave a group::
|
Leave a group::
|
||||||
signal-cli -u USERNAME quitGroup -g GROUP_ID
|
signal-cli -u USERNAME quitGroup -g GROUP_ID
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ public class App {
|
||||||
.setDefault(OutputType.PLAIN_TEXT);
|
.setDefault(OutputType.PLAIN_TEXT);
|
||||||
|
|
||||||
parser.addArgument("--service-environment")
|
parser.addArgument("--service-environment")
|
||||||
.help("Choose the server environment to use, SANDBOX or LIVE.")
|
.help("Choose the server environment to use.")
|
||||||
.type(Arguments.enumStringType(ServiceEnvironmentCli.class))
|
.type(Arguments.enumStringType(ServiceEnvironmentCli.class))
|
||||||
.setDefault(ServiceEnvironmentCli.LIVE);
|
.setDefault(ServiceEnvironmentCli.LIVE);
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@ public class AddDeviceCommand implements LocalCommand {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void attachToSubparser(final Subparser subparser) {
|
public void attachToSubparser(final Subparser subparser) {
|
||||||
|
subparser.help("Link another device to this device. Only works, if this is the master device.");
|
||||||
subparser.addArgument("--uri")
|
subparser.addArgument("--uri")
|
||||||
.required(true)
|
.required(true)
|
||||||
.help("Specify the uri contained in the QR code shown by the new device.");
|
.help("Specify the uri contained in the QR code shown by the new device.");
|
||||||
|
|
|
@ -20,9 +20,9 @@ public class BlockCommand implements LocalCommand {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void attachToSubparser(final Subparser subparser) {
|
public void attachToSubparser(final Subparser subparser) {
|
||||||
|
subparser.help("Block the given contacts or groups (no messages will be received)");
|
||||||
subparser.addArgument("contact").help("Contact number").nargs("*");
|
subparser.addArgument("contact").help("Contact number").nargs("*");
|
||||||
subparser.addArgument("-g", "--group").help("Group ID").nargs("*");
|
subparser.addArgument("-g", "--group").help("Group ID").nargs("*");
|
||||||
subparser.help("Block the given contacts or groups (no messages will be received)");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
package org.asamk.signal.commands;
|
package org.asamk.signal.commands;
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.TreeMap;
|
||||||
|
|
||||||
public class Commands {
|
public class Commands {
|
||||||
|
|
||||||
private static final Map<String, Command> commands = new HashMap<>();
|
private static final Map<String, Command> commands = new TreeMap<>();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
addCommand("addDevice", new AddDeviceCommand());
|
addCommand("addDevice", new AddDeviceCommand());
|
||||||
|
|
|
@ -29,6 +29,7 @@ public class DaemonCommand implements MultiLocalCommand {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void attachToSubparser(final Subparser subparser) {
|
public void attachToSubparser(final Subparser subparser) {
|
||||||
|
subparser.help("Run in daemon mode and provide an experimental dbus interface.");
|
||||||
subparser.addArgument("--system")
|
subparser.addArgument("--system")
|
||||||
.action(Arguments.storeTrue())
|
.action(Arguments.storeTrue())
|
||||||
.help("Use DBus system bus instead of user bus.");
|
.help("Use DBus system bus instead of user bus.");
|
||||||
|
|
|
@ -25,8 +25,8 @@ public class GetUserStatusCommand implements LocalCommand {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void attachToSubparser(final Subparser subparser) {
|
public void attachToSubparser(final Subparser subparser) {
|
||||||
subparser.addArgument("number").help("Phone number").nargs("+");
|
|
||||||
subparser.help("Check if the specified phone number/s have been registered");
|
subparser.help("Check if the specified phone number/s have been registered");
|
||||||
|
subparser.addArgument("number").help("Phone number").nargs("+");
|
||||||
subparser.addArgument("--json")
|
subparser.addArgument("--json")
|
||||||
.help("WARNING: This parameter is now deprecated! Please use the global \"--output=json\" option instead.\n\nOutput received messages in json format, one json object per line.")
|
.help("WARNING: This parameter is now deprecated! Please use the global \"--output=json\" option instead.\n\nOutput received messages in json format, one json object per line.")
|
||||||
.action(Arguments.storeTrue());
|
.action(Arguments.storeTrue());
|
||||||
|
|
|
@ -22,6 +22,7 @@ public class JoinGroupCommand implements LocalCommand {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void attachToSubparser(final Subparser subparser) {
|
public void attachToSubparser(final Subparser subparser) {
|
||||||
|
subparser.help("Join a group via an invitation link.");
|
||||||
subparser.addArgument("--uri").required(true).help("Specify the uri with the group invitation link.");
|
subparser.addArgument("--uri").required(true).help("Specify the uri with the group invitation link.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@ public class LinkCommand implements ProvisioningCommand {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void attachToSubparser(final Subparser subparser) {
|
public void attachToSubparser(final Subparser subparser) {
|
||||||
|
subparser.help("Link to an existing device, instead of registering a new number.");
|
||||||
subparser.addArgument("-n", "--name").help("Specify a name to describe this new device.");
|
subparser.addArgument("-n", "--name").help("Specify a name to describe this new device.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@ public class ListContactsCommand implements LocalCommand {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void attachToSubparser(final Subparser subparser) {
|
public void attachToSubparser(final Subparser subparser) {
|
||||||
|
subparser.help("Show a list of known contacts with names.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -21,6 +21,7 @@ public class ListDevicesCommand implements LocalCommand {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void attachToSubparser(final Subparser subparser) {
|
public void attachToSubparser(final Subparser subparser) {
|
||||||
|
subparser.help("Show a list of linked devices.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -60,11 +60,10 @@ public class ListGroupsCommand implements LocalCommand {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void attachToSubparser(final Subparser subparser) {
|
public void attachToSubparser(final Subparser subparser) {
|
||||||
|
subparser.help("List group information including names, ids, active status, blocked status and members");
|
||||||
subparser.addArgument("-d", "--detailed")
|
subparser.addArgument("-d", "--detailed")
|
||||||
.action(Arguments.storeTrue())
|
.action(Arguments.storeTrue())
|
||||||
.help("List the members and group invite links of each group. If output=json, then this is always set");
|
.help("List the members and group invite links of each group. If output=json, then this is always set");
|
||||||
|
|
||||||
subparser.help("List group information including names, ids, active status, blocked status and members");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -35,6 +35,7 @@ public class ListIdentitiesCommand implements LocalCommand {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void attachToSubparser(final Subparser subparser) {
|
public void attachToSubparser(final Subparser subparser) {
|
||||||
|
subparser.help("List all known identity keys and their trust status, fingerprint and safety number.");
|
||||||
subparser.addArgument("-n", "--number").help("Only show identity keys for the given phone number.");
|
subparser.addArgument("-n", "--number").help("Only show identity keys for the given phone number.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ public class QuitGroupCommand implements LocalCommand {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void attachToSubparser(final Subparser subparser) {
|
public void attachToSubparser(final Subparser subparser) {
|
||||||
|
subparser.help("Send a quit group message to all group members and remove self from member list.");
|
||||||
subparser.addArgument("-g", "--group").required(true).help("Specify the recipient group ID.");
|
subparser.addArgument("-g", "--group").required(true).help("Specify the recipient group ID.");
|
||||||
subparser.addArgument("--admin")
|
subparser.addArgument("--admin")
|
||||||
.nargs("*")
|
.nargs("*")
|
||||||
|
|
|
@ -33,6 +33,7 @@ public class ReceiveCommand implements ExtendedDbusCommand, LocalCommand {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void attachToSubparser(final Subparser subparser) {
|
public void attachToSubparser(final Subparser subparser) {
|
||||||
|
subparser.help("Query the server for new messages.");
|
||||||
subparser.addArgument("-t", "--timeout")
|
subparser.addArgument("-t", "--timeout")
|
||||||
.type(double.class)
|
.type(double.class)
|
||||||
.setDefault(3.0)
|
.setDefault(3.0)
|
||||||
|
|
|
@ -16,8 +16,9 @@ public class RegisterCommand implements RegistrationCommand {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void attachToSubparser(final Subparser subparser) {
|
public void attachToSubparser(final Subparser subparser) {
|
||||||
|
subparser.help("Register a phone number with SMS or voice verification.");
|
||||||
subparser.addArgument("-v", "--voice")
|
subparser.addArgument("-v", "--voice")
|
||||||
.help("The verification should be done over voice, not sms.")
|
.help("The verification should be done over voice, not SMS.")
|
||||||
.action(Arguments.storeTrue());
|
.action(Arguments.storeTrue());
|
||||||
subparser.addArgument("--captcha")
|
subparser.addArgument("--captcha")
|
||||||
.help("The captcha token, required if registration failed with a captcha required error.");
|
.help("The captcha token, required if registration failed with a captcha required error.");
|
||||||
|
|
|
@ -13,6 +13,7 @@ public class RemoveDeviceCommand implements LocalCommand {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void attachToSubparser(final Subparser subparser) {
|
public void attachToSubparser(final Subparser subparser) {
|
||||||
|
subparser.help("Remove a linked device.");
|
||||||
subparser.addArgument("-d", "--device-id", "--deviceId")
|
subparser.addArgument("-d", "--device-id", "--deviceId")
|
||||||
.type(int.class)
|
.type(int.class)
|
||||||
.required(true)
|
.required(true)
|
||||||
|
|
|
@ -16,6 +16,7 @@ public class RemovePinCommand implements LocalCommand {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void attachToSubparser(final Subparser subparser) {
|
public void attachToSubparser(final Subparser subparser) {
|
||||||
|
subparser.help("Remove the registration lock pin.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -28,6 +28,7 @@ public class SendCommand implements DbusCommand {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void attachToSubparser(final Subparser subparser) {
|
public void attachToSubparser(final Subparser subparser) {
|
||||||
|
subparser.help("Send a message to another user or group.");
|
||||||
subparser.addArgument("recipient").help("Specify the recipients' phone number.").nargs("*");
|
subparser.addArgument("recipient").help("Specify the recipients' phone number.").nargs("*");
|
||||||
final var mutuallyExclusiveGroup = subparser.addMutuallyExclusiveGroup();
|
final var mutuallyExclusiveGroup = subparser.addMutuallyExclusiveGroup();
|
||||||
mutuallyExclusiveGroup.addArgument("-g", "--group").help("Specify the recipient group ID.");
|
mutuallyExclusiveGroup.addArgument("-g", "--group").help("Specify the recipient group ID.");
|
||||||
|
|
|
@ -16,6 +16,7 @@ public class SetPinCommand implements LocalCommand {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void attachToSubparser(final Subparser subparser) {
|
public void attachToSubparser(final Subparser subparser) {
|
||||||
|
subparser.help("Set a registration lock pin, to prevent others from registering this number.");
|
||||||
subparser.addArgument("registrationLockPin")
|
subparser.addArgument("registrationLockPin")
|
||||||
.help("The registration lock PIN, that will be required for new registrations (resets after 7 days of inactivity)");
|
.help("The registration lock PIN, that will be required for new registrations (resets after 7 days of inactivity)");
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,7 @@ public class TrustCommand implements LocalCommand {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void attachToSubparser(final Subparser subparser) {
|
public void attachToSubparser(final Subparser subparser) {
|
||||||
|
subparser.help("Set the trust level of a given number.");
|
||||||
subparser.addArgument("number").help("Specify the phone number, for which to set the trust.").required(true);
|
subparser.addArgument("number").help("Specify the phone number, for which to set the trust.").required(true);
|
||||||
var mutTrust = subparser.addMutuallyExclusiveGroup();
|
var mutTrust = subparser.addMutuallyExclusiveGroup();
|
||||||
mutTrust.addArgument("-a", "--trust-all-known-keys")
|
mutTrust.addArgument("-a", "--trust-all-known-keys")
|
||||||
|
|
|
@ -20,9 +20,9 @@ public class UnblockCommand implements LocalCommand {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void attachToSubparser(final Subparser subparser) {
|
public void attachToSubparser(final Subparser subparser) {
|
||||||
|
subparser.help("Unblock the given contacts or groups (messages will be received again)");
|
||||||
subparser.addArgument("contact").help("Contact number").nargs("*");
|
subparser.addArgument("contact").help("Contact number").nargs("*");
|
||||||
subparser.addArgument("-g", "--group").help("Group ID").nargs("*");
|
subparser.addArgument("-g", "--group").help("Group ID").nargs("*");
|
||||||
subparser.help("Unblock the given contacts or groups (messages will be received again)");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -16,13 +16,13 @@ public class UpdateContactCommand implements LocalCommand {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void attachToSubparser(final Subparser subparser) {
|
public void attachToSubparser(final Subparser subparser) {
|
||||||
|
subparser.help("Update the details of a given contact");
|
||||||
subparser.addArgument("number").help("Contact number");
|
subparser.addArgument("number").help("Contact number");
|
||||||
subparser.addArgument("-n", "--name").required(true).help("New contact name");
|
subparser.addArgument("-n", "--name").required(true).help("New contact name");
|
||||||
subparser.addArgument("-e", "--expiration")
|
subparser.addArgument("-e", "--expiration")
|
||||||
.required(false)
|
.required(false)
|
||||||
.type(int.class)
|
.type(int.class)
|
||||||
.help("Set expiration time of messages (seconds)");
|
.help("Set expiration time of messages (seconds)");
|
||||||
subparser.help("Update the details of a given contact");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -36,6 +36,7 @@ public class UpdateGroupCommand implements DbusCommand, LocalCommand {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void attachToSubparser(final Subparser subparser) {
|
public void attachToSubparser(final Subparser subparser) {
|
||||||
|
subparser.help("Create or update a group.");
|
||||||
subparser.addArgument("-g", "--group").help("Specify the recipient group ID.");
|
subparser.addArgument("-g", "--group").help("Specify the recipient group ID.");
|
||||||
subparser.addArgument("-n", "--name").help("Specify the new group name.");
|
subparser.addArgument("-n", "--name").help("Specify the new group name.");
|
||||||
subparser.addArgument("-d", "--description").help("Specify the new group description.");
|
subparser.addArgument("-d", "--description").help("Specify the new group description.");
|
||||||
|
|
|
@ -16,6 +16,7 @@ public class UpdateProfileCommand implements LocalCommand {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void attachToSubparser(final Subparser subparser) {
|
public void attachToSubparser(final Subparser subparser) {
|
||||||
|
subparser.help("Set a name, about and avatar image for the user profile");
|
||||||
subparser.addArgument("--given-name", "--name").help("New profile (given) name");
|
subparser.addArgument("--given-name", "--name").help("New profile (given) name");
|
||||||
subparser.addArgument("--family-name").help("New profile family name (optional)");
|
subparser.addArgument("--family-name").help("New profile family name (optional)");
|
||||||
subparser.addArgument("--about").help("New profile about text");
|
subparser.addArgument("--about").help("New profile about text");
|
||||||
|
@ -24,8 +25,6 @@ public class UpdateProfileCommand implements LocalCommand {
|
||||||
final var avatarOptions = subparser.addMutuallyExclusiveGroup();
|
final var avatarOptions = subparser.addMutuallyExclusiveGroup();
|
||||||
avatarOptions.addArgument("--avatar").help("Path to new profile avatar");
|
avatarOptions.addArgument("--avatar").help("Path to new profile avatar");
|
||||||
avatarOptions.addArgument("--remove-avatar").action(Arguments.storeTrue());
|
avatarOptions.addArgument("--remove-avatar").action(Arguments.storeTrue());
|
||||||
|
|
||||||
subparser.help("Set a name, about and avatar image for the user profile");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -21,6 +21,7 @@ public class UploadStickerPackCommand implements LocalCommand {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void attachToSubparser(final Subparser subparser) {
|
public void attachToSubparser(final Subparser subparser) {
|
||||||
|
subparser.help("Upload a new sticker pack, consisting of a manifest file and the stickers images.");
|
||||||
subparser.addArgument("path")
|
subparser.addArgument("path")
|
||||||
.help("The path of the manifest.json or a zip file containing the sticker pack you wish to upload.");
|
.help("The path of the manifest.json or a zip file containing the sticker pack you wish to upload.");
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@ public class VerifyCommand implements RegistrationCommand {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void attachToSubparser(final Subparser subparser) {
|
public void attachToSubparser(final Subparser subparser) {
|
||||||
|
subparser.help("Verify the number using the code received via SMS or voice.");
|
||||||
subparser.addArgument("verificationCode").help("The verification code you received via sms or voice call.");
|
subparser.addArgument("verificationCode").help("The verification code you received via sms or voice call.");
|
||||||
subparser.addArgument("-p", "--pin").help("The registration lock PIN, that was set by the user (Optional)");
|
subparser.addArgument("-p", "--pin").help("The registration lock PIN, that was set by the user (Optional)");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue