Node CLI - v2.0
Installation
Section titled “Installation”-
Download the executable
Terminal window VERSION_NUM={put the version number here} && sudo -E bash -c "curl -L https://github.com/skalenetwork/node-cli/releases/download/$VERSION_NUM/skale-$VERSION_NUM-`uname -s`-`uname -m` > /usr/local/bin/skale" -
Apply executable permissions to the downloaded binary
Terminal window chmod +x /usr/local/bin/skale -
Test the Installation
Terminal window skale --help
Top Level Commands
Section titled “Top Level Commands”Prints build info.
skale infoVersion
Section titled “Version”Prints version number.
skale versionOptional Arguments
--shortprints the version only without additional text.
Node Commands
Section titled “Node Commands”Node Information
Section titled “Node Information”Retrieves the base info about SKALE node.
skale node infoOptional Arguments
-f/--formataccepts either json or text as valid input which formats the output accordingly
Node Initialization
Section titled “Node Initialization”Initialize a SKALE node on current machine.
skale node init [ENV_FILEPATH]Required Parameters
ENV_FILEPATHis a path to the .env file (required parameters are listed in theskale initcommand)
# SGX server URLSGX_SERVER_URL=
# disk mount point for storing sChains dataDISK_MOUNTPOINT=
# stream of docker-lvmpy to useDOCKER_LVMPY_STREAM=
# stream of skale-node to useCONTAINER_CONFIGS_STREAM=
# RPC endpoint of the node in the network where SKALE Manager is deployedENDPOINT=
# same as ENDPOINTIMA_ENDPOINT=
# URL to SKALE Manager contracts ABI and addressesMANAGER_CONTRACTS_ABI_URL=
# URL to IMA contracts ABI and addressesIMA_CONTRACTS_ABI_URL=
# URL to the Filebeat log server (provided by SKALE Core team)FILEBEAT_URL=
# Optional - Telegram API keyTG_API_KEY=
# Optional - Telegram chat IDTG_CHAT_ID=
# Optional - will enable monitoring containers (cadvisor, node-exporter)MONITORING_CONTAINERS=Node Initialization from Backup
Section titled “Node Initialization from Backup”Restores a SKALE node on another machine.
skale node restore [BACKUP_PATH] [ENV_FILEPATH]Required Parameters
BACKUP_PATHis the path to the archive with backup data generated byskale node backupcommandENV_FILEPATHis the path to .env file (required parameters are listed in theskale initcommand)
Node Backup
Section titled “Node Backup”Generates a backup file to restore SKALE node on another machine.
skale node backup [BACKUP_FOLDER_PATH]Required Parameters
BACKUP_FOLDER_PATHis the path to the folder where the backup tarball will be saved
Node Signature
Section titled “Node Signature”Generates a node signature that is used to link node to a specific validator.
skale node signature [VALIDATOR_ID]Required Parameters
VALIDATOR_ID- id of the validator
Node Registration
Section titled “Node Registration”skale node registerRequired Arguments
--ipis the public IP for RPC connections and consensus--domain/-dis the SKALE node domain name--nameis the SKALE node name
Optional Arguments
--portis a public port, the beginning of the port range for node SKALE Chains (default: 10000)
Node Update
Section titled “Node Update”Updates a SKALE node on the current machine.
skale node update [ENV_FILEPATH]Required Arguments
ENV_FILEPATHis the path to env file where parameters are defined
Optional Arguments
--yesexecutes without additional confirmation
Node Turn-off
Section titled “Node Turn-off”Turns off the SKALE node on current machine and optionally sets it to maintenance mode.
skale node turn-offOptional Arguments
--maintenance-onsets the SKALE node into maintenance mode before turning off--yesexecutes without additional confirmation
Node Turn-on
Section titled “Node Turn-on”Turns on SKALE node on current machine and optionally disables maintenance mode.
skale node turn-on [ENV_FILEPATH]Optional Arguments
Required Parameters
ENV_FILEPATHis the path to env file where parameters are defined
Optional Arguments
--maintenance-offturns off maintenance mode after turning on the node--yesexecutes without additional confirmation
Enable Maintenance Mode
Section titled “Enable Maintenance Mode”Enables maintenance mode on the node.
skale node maintenance-onOptional Arguments
--yesexecutes without additional confirmation
Disable Maintenance Mode
Section titled “Disable Maintenance Mode”skale node maintenance-offDomain name
Section titled “Domain name”Set SKALE node domain name
skale node set-domainOptional Arguments
--domain/-dthe SKALE node domain name--yesexecutes without additional confirmation
Wallet commands
Section titled “Wallet commands”Commands related to Ethereum wallet associated with SKALE node
Wallet information
Section titled “Wallet information”skale wallet infoOptional Arguments
-f/--formatformats the output. Valid inputs are json and text
Send ETH tokens
Section titled “Send ETH tokens”Sends ETH tokens from the SKALE node wallet to a specific address.
skale wallet send [ADDRESS] [AMOUNT]Required Parameters
ADDRESSis the Ethereum receiver addressAMOUNTis the Amount of ETH tokens to send
Optional Arguments
--yesexecutes without additional confirmation
sChain commands
Section titled “sChain commands”List sChains on Node
Section titled “List sChains on Node”Lists the SKALE Chains served by the connected node.
skale schains lsGet sChain Config
Section titled “Get sChain Config”skale schains config SCHAIN_NAMEGet sChain DKG Status
Section titled “Get sChain DKG Status”Lists the DKG status for each SKALE Chain on the node.
skale schains dkgGet sChain Info
Section titled “Get sChain Info”Shows information about a specified SKALE Chain on the node.
skale schains info SCHAIN_NAMERequired Parameters
SCHAIN_NAMEis a valid sChain on the node
Optional Arguments
--jsonshows info in JSON format
Repair sChain
Section titled “Repair sChain”Turn on repair mode for SKALE Chain
skale schains repair SCHAIN_NAMERequired Parameters
SCHAIN_NAMEis a valid sChain on the node
Optional Arguments
--yesexecutes repair without additional confirmation
Health commands
Section titled “Health commands”List Containers
Section titled “List Containers”Lists all SKALE containers running on the connected node.
skale health containersOptional Arguments
-a/--alllists all containers (by default - only running)
Healthcheck for sChains
Section titled “Healthcheck for sChains”Shows health check results for all SKALE Chains on the node.
skale health schainsOptional Arguments
--jsonshows info in JSON format
SGX Commands
Section titled “SGX Commands”Checks status of the SGX server. Returns the SGX server URL and connection status.
$ skale health sgxExample Output
Section titled “Example Output”SGX server status:┌────────────────┬────────────────────────────┐│ SGX server URL │ https://0.0.0.0:1026/ │├────────────────┼────────────────────────────┤│ Status │ CONNECTED │└────────────────┴────────────────────────────┘SSL Commands
Section titled “SSL Commands”SSL Status
Section titled “SSL Status”Retrieves the status of the SSL certificates on the node.
skale ssl statusUpload Certificates
Section titled “Upload Certificates”Uploads new SSL certificates.
skale ssl uploadRequired Arguments
-c/--cert-pathis the path to the certificate file-k/--key-pathis the path to the key file
Optional Arguments
-f/--forceoverwrites the existing certificates
Logs Commands
Section titled “Logs Commands”CLI Logs
Section titled “CLI Logs”Fetch Node CLI logs.
skale logs cliOptional Arguments
--debugshows debug logs with a more verbose output
Dump Logs
Section titled “Dump Logs”Dumps all logs from the connected node.
skale logs dump [PATH]Required Parameters
PATHis the required path to dump the logs to
Optional Arguments
--container,-c- Dump logs only from specified container
Resources Allocation Commands
Section titled “Resources Allocation Commands”Show Allocation File
Section titled “Show Allocation File”Show the resources allocation file.
skale resources-allocation showGenerate/Update
Section titled “Generate/Update”Generate (or updates if already exists) the allocation file.
skale resources-allocation generate [ENV_FILEPATH]Required Parameters
ENV_FILEPATHis the path to .env file (required parameters are listed in theskale initcommand)
Optional Arguments
--yesgenerates without additional confirmation-f/--forcerewrites allocation file if it exists
Validate commands
Section titled “Validate commands”Validate ABI
Section titled “Validate ABI”Checks whether ABI files contain valid JSON data.
skale validate abiOptional Argument
--jsonshows the validation result in json format
Exit codes
Section titled “Exit codes”Exit codes conventions for SKALE CLI tools.
| Code | Description |
|---|---|
| 0 | Everything is OK |
| 1 | General error exit code |
| 3 | Bad API response |
| 4 | Script execution error |
| 7 | Bad user error |
| 8 | Node state error |