LinuxCommandLibrary

kdeconnect-cli

KDE Connect CLI.

TLDR

List all devices

$ kdeconnect-cli --list-devices
copy


List available (paired and reachable) devices
$ kdeconnect-cli --list-available
copy


Request pairing with a specific device, specifying its ID
$ kdeconnect-cli --pair --device [device_id]
copy


Ring a device, specifying its name
$ kdeconnect-cli --ring --name "[device_name]"
copy


Share an URL or file with a paired device, specifying its ID
$ kdeconnect-cli --share [url|path/to/file] --device [device_id]
copy


Send an SMS with an optional attachment to a specific number
$ kdeconnect-cli --name "[device_name]" --send-sms "[message]" --destination [phone_number] --attachment [path/to/file]
copy


Unlock a specific device
$ kdeconnect-cli --name "[device_name]" --unlock
copy


Simulate a key press on a specific device
$ kdeconnect-cli --name "[device_name]" --send-keys [key]
copy

Help

Usage: kdeconnect-cli [options] 
KDE Connect CLI tool 

Options:
  -l, --list-devices            List all devices 
  -a, --list-available          List available (paired and reachable) devices 
  --id-only                     Make --list-devices or --list-available print 
                                only the devices id, to ease scripting 
  --name-only                   Make --list-devices or --list-available print 
                                only the devices name, to ease scripting 
  --id-name-only                Make --list-devices or --list-available print 
                                only the devices id and name, to ease scripting 
  --refresh                     Search for devices in the network and 
                                re-establish connections 
  --pair                        Request pairing to a said device 
  --ring                        Find the said device by ringing it. 
  --unpair                      Stop pairing to a said device 
  --ping                        Sends a ping to said device 
  --ping-msg           Same as ping but you can set the message to 
                                display 
  --send-clipboard              Sends the current clipboard to said device 
  --share          Share a file/URL to a said device 
  --share-text            Share text to a said device 
  --list-notifications          Display the notifications on a said device 
  --lock                        Lock the specified device 
  --unlock                      Unlock the specified device 
  --send-sms           Sends an SMS. Requires destination 
  --destination   Phone number to send the message 
  --attachment       File urls to send attachments with the message 
                                (can be passed multiple times) 
  --device, -d             Device ID 
  --name, -n              Device Name 
  --encryption-info             Get encryption info about said device 
  --list-commands               Lists remote commands and their ids 
  --execute-command         Executes a remote command by id 
  -k, --send-keys          Sends keys to a said device 
  --my-id                       Display this device's id and exit 
  --photo                 Open the connected device's camera and transfer 
                                the photo 
  -h, --help                    Displays help on commandline options. 
  --help-all                    Displays help including Qt specific options. 
  -v, --version                 Displays version information. 
  --author                      Show author information. 
  --license                     Show license information. 
  --desktopfile      The base file name of the desktop entry for 
                                this application. 

Copied to clipboard