xmcli
is a command-line tool designed to interact with the xMind
platform, specifically for managing key-value pairs in a keystore. Before using xmcli
, ensure that xMind
is running.
- xMind: Ensure that
xMind
is started and running on the appropriate port (lrpc:99023
).
The xmcli
tool supports three primary operations: updating, retrieving, and deleting keys in the keystore.
To update or add a key-value pair in the keystore:
xmcli --updatekey <key_name> <value>
or
xmcli -uk <key_name> <value>
xmcli --updatekey username "admin"
This command updates or creates the key username
with the value "admin"
.
To retrieve the value associated with a key from the keystore:
xmcli --getkey <key_name>
or
xmcli -gk <key_name>
xmcli --getkey username
This command retrieves the value associated with the key username
.
To delete a key-value pair from the keystore:
xmcli --deletekey <key_name>
or
xmcli -dk <key_name>
xmcli --deletekey username
This command deletes the key username
from the keystore.
- If the key does not exist when retrieving or deleting,
xmcli
will output a message indicating the absence of the key. - If the command is not used with the correct number of arguments, the usage guide will be displayed.
- xMind Not Running: Ensure that
xMind
is started before usingxmcli
. The tool connects toxMind
throughlrpc:99023
. - Incorrect Command Usage: Make sure to use the correct syntax for each operation.
-
Updating a Key:
xmcli -uk apiKey "12345-abcde"
-
Retrieving a Key:
xmcli -gk apiKey
-
Deleting a Key:
xmcli -dk apiKey