Edge CLI
Last updated
Was this helpful?
Last updated
Was this helpful?
Edge CLI includes some global options that affect all commands. These can be provided before or after the sub-command.
The -w, --wallet <file>
option allows you to specify a different path to your wallet than the default. This may be useful if the default path is not usable or you want to use multiple wallets.
The wallet is stored in a single JSON file, so the <file>
should not be a directory.
The -v, --verbose
option toggles greater verbosity in output. For example, CLI by default truncates stake hashes for readability:
With greater verbosity, the full hash is shown:
The --debug
option enables detailed output for complete visibility of CLI's behaviour. It also enables greater detail of any errors that may occur. This may be useful if you are having problems with CLI and you (or Edge support) need more information about what is happening.
The debug option effects _very_** noisy, sometimes abstruse output and its use is discouraged when not absolutely necessary.**
Other global options include disabling output colours with --no-color
and specifying Docker connectivity (for device
commands) with --docker-socket-path
. You can see all available global options by running edge --help
.
Global options are not displayed when viewing the helptext for specific commands, but are available to all commands nevertheless.
Wallet commands enable you to manage the XE wallet used by CLI. You can use a single wallet across multiple devices, or different wallets, depending on your needs.
This command creates a new XE wallet. This is an interactive command that asks you for a passphrase and private key export preference. Example:
You can use this command non-interactively by providing all the options upfront. Example:
Run edge wallet create --help
for more information on options.
This command restores an XE wallet. This is an interactive command that asks you for a private key and passphrase. Example:
Similarly to the create command, this command can be used non-interactively by providing all options upfront. Run edge wallet restore --help
for more information on options.
This command displays XE wallet information. By default it will only display the wallet address:
If the -p, --passphrase
or -P, --passphrase-file
option is specified, the private key is also shown:
This command displays your current XE wallet balance.
This command forgets (deletes) your XE wallet. If no wallet is found, it has no effect.
Transaction commands enable you to send XE to other wallets and display historic transactions to/from your wallet.
For ease of use, the command edge transaction ...
can be abbreviated to edge tx ...
as shown in usage examples.
This command sends a specified XE <amount>
to the given <wallet>
address. The amount can be specified in XE or mXE (0.000001 XE) by providing the unit e.g. 100xe
or 100mxe
. If no unit is given, XE is assumed.
You must provide your passphrase to sign the transaction.
An example of sending 10 XE to the testnet supply wallet:
This command can be used non-interactively by providing all options upfront. Run edge tx send --help
for more information on options.
This command lists historic transactions to/from your XE wallet, from most recent to oldest. You can paginate transactions with the -l, --limit
and -p, --page
options. If these are not set, it will fetch your 10 most recent transactions.
An example fetching one (the most recent) transaction:
This command lists any pending transactions that have not yet been processed by the XE blockchain. There are no options for this command.
Stake commands enable you to manage your stakes on the XE blockchain. A stake is required for each device with which you intend to contribute computing power to the Edge network.
This is an informational command that displays current staking amounts, as configured on the XE blockchain.
This command creates a stake which, once processed by the XE blockchain, allows you to run a device of the specified <type>
.
Your stake will be created via a blockchain transaction, signed using your private key. You will need to enter the passphrase for your XE wallet to decrypt your private key for this purpose.
An example of creating a Host:
This command can be used non-interactively by providing all options upfront. Run edge stake create --help
for more information on options.
This command displays all stakes associated with your wallet. For example, the stake that was created above:
Unlocking a stake places the associated XE funds in a waiting period (currently 90 days) after which they can be released back to your XE wallet balance.
For ease of use, you can enter a truncated stake ID (minimum 3 characters).
For example, unlocking the stake created above:
This command can be used non-interactively by providing all options upfront. Run edge stake unlock --help
for more information on options.
This command releases an unlocked stake, returning its funds to your XE wallet balance.
For ease of use, you can enter a truncated stake ID (minimum 3 characters).
To reclaim the full amount, your stake must have exited the unlock wait period (currently 90 days). Alternatively, you may use the -e, --express
option to immediately release the stake for a fee.
For example, express-releasing the stake created above:
This command can be used non-interactively by providing all options upfront. Run edge stake release --help
for more information on options.
Device commands enable you to manage your device's participation in the Edge network.
Before using device commands, ensure the prerequisites are met:
Device commands will not work if Docker is not running on your device.
This command adds your device to the Edge network. This works by associating your device's ID with a stake. You must have created a stake already, and you will need to enter your passphrase to sign the assignment transaction.
An example of adding a new device to the network:
Your device assignment may take a minute or two to be processed by the XE blockchain. Afterwards, the other edge device
commands will be usable.
This command can be used non-interactively by providing all options upfront. Run edge device add --help
for more information on options.
This command displays information about your device and the stake to which it is associated. For example:
This command starts the network node on your device. This is determined by the type of stake to which the device is assigned.
This command displays the current operational status of the node on your device: namely, whether it is running or stopped.
This command checks for an update to the node, downloading the update automatically if necessary.
If the node is running, it will be stopped and restarted to update to the new version.
This command restarts the node without checking for an update. If the node is not already running, this has no effect.
This command stops the node. If the node is not already running, this has no effect.
Note that stopping a node does not remove the device from the network - it merely makes it inoperational until it is started again.
This command removes the device from the Edge network. This consists of unassigning the device from the stake, stopping the node, and destroying the device's identity. (A new identity will be created if the device is added back to the network.)
An example of removing a device from Testnet:
This command can be used non-interactively by providing all options upfront. Run edge device remove --help
for more information on options.
Some commands are purely informational and do not affect your device or wallet in any way.
This command displays links to Edge communities and publications.
The debug option may be useful for understanding if you intend to contribute to .
Ensure your device meets the minimum specification (see )
(v18.06+ required)
If you are setting up a device for the first time, see for step-by-step guidance.