Application CLI
A complete command reference of the application CLI is summarized on this page.
| The application CLI is only available out of the box, if the blockchain application was bootstrapped with Lisk Commander. |
Commands
help
Displays the general help information for the application CLI.
A simple blockchain application that saves hello messages in user accounts.
VERSION
hello_app/0.1.0 darwin-x64 node-v16.15.0
USAGE
$ ./bin/run [COMMAND] --help
TOPICS
account Commands relating to hello_app accounts.
block Commands relating to hello_app blocks.
blockchain Commands relating to hello_app blockchain data.
config Commands relating to hello_app node configuration.
forger-info Commands relating to hello_app forger-info data.
forging Commands relating to hello_app forging.
genesis-block Creates genesis block file.
node Commands relating to hello_app node.
passphrase Commands relating to hello_app passphrases.
transaction Commands relating to hello_app transactions.
COMMANDS
autocomplete Display autocomplete installation instructions.
console Lisk interactive REPL (Read-eval-print loop), session to run commands.
hash-onion Create hash onions to be used by the forger.
help Display help for hello_app.
start Start Blockchain Node.
start
Starts the blockchain node.
USAGE
$ ./bin/run start
OPTIONS
-c, --config=config File path to a custom config. Environment variable "LISK_CONFIG_FILE" can also be used.
-d, --data-path=data-path Directory path to specify where node data is stored. Environment variable "LISK_DATA_PATH" can also be used.
-l, --log=trace|debug|info|warn|error|fatal File log level. Environment variable "LISK_FILE_LOG_LEVEL" can also be used.
-n, --network=network [default: default] Default network config to use. Environment variable "LISK_NETWORK" can also be used.
-p, --port=port Open port for the peer to peer incoming connections. Environment variable "LISK_PORT" can also be used.
--api-ipc Enable IPC communication. This will load plugins as a child process and communicate over IPC. Environment variable "LISK_API_IPC" can also be used.
--api-ws Enable websocket communication for api-client. Environment variable "LISK_API_WS" can also be used.
--api-ws-port=api-ws-port Port to be used for api-client websocket. Environment variable "LISK_API_WS_PORT" can also be used.
--console-log=trace|debug|info|warn|error|fatal Console log level. Environment variable "LISK_CONSOLE_LOG_LEVEL" can also be used.
--dashboard-plugin-port=dashboard-plugin-port Port to be used for Dashboard Plugin. Environment variable "LISK_DASHBOARD_PLUGIN_PORT" can also be used.
--enable-dashboard-plugin Enable Dashboard Plugin. Environment variable "LISK_ENABLE_DASHBOARD_PLUGIN" can also be used.
--enable-faucet-plugin Enable Faucet Plugin. Environment variable "LISK_ENABLE_FAUCET_PLUGIN" can also be used.
--enable-forger-plugin Enable Forger Plugin. Environment variable "LISK_ENABLE_FORGER_PLUGIN" can also be used.
--enable-http-api-plugin Enable HTTP API Plugin. Environment variable "LISK_ENABLE_HTTP_API_PLUGIN" can also be used.
--enable-monitor-plugin Enable Monitor Plugin. Environment variable "LISK_ENABLE_MONITOR_PLUGIN" can also be used.
--enable-report-misbehavior-plugin Enable ReportMisbehavior Plugin. Environment variable "LISK_ENABLE_REPORT_MISBEHAVIOR_PLUGIN" can also be used.
--faucet-plugin-port=faucet-plugin-port Port to be used for Faucet Plugin. Environment variable "LISK_FAUCET_PLUGIN_PORT" can also be used.
--http-api-plugin-port=http-api-plugin-port Port to be used for HTTP API Plugin. Environment variable "LISK_HTTP_API_PLUGIN_PORT" can also be used.
--http-api-plugin-whitelist=http-api-plugin-whitelist List of IPs in comma separated value to allow the connection. Environment variable "LISK_HTTP_API_PLUGIN_WHITELIST" can also be used.
--monitor-plugin-port=monitor-plugin-port Port to be used for Monitor Plugin. Environment variable "LISK_MONITOR_PLUGIN_PORT" can also be used.
--monitor-plugin-whitelist=monitor-plugin-whitelist List of IPs in comma separated value to allow the connection. Environment variable "LISK_MONITOR_PLUGIN_WHITELIST" can also be used.
--overwrite-config Overwrite network configs if they exist already
--seed-peers=seed-peers Seed peers to initially connect to in format of comma separated "ip:port". IP can be DNS name or IPV4 format. Environment variable "LISK_SEED_PEERS" can also be used.
EXAMPLES
start
start --network devnet --data-path /path/to/data-dir --log debug
start --network devnet --api-ws
start --network devnet --api-ws --api-ws-port 8888
start --network devnet --port 9000
start --network devnet --port 9002 --seed-peers 127.0.0.1:9001,127.0.0.1:9000
start --network testnet --overwrite-config
start --network testnet --config ~/my_custom_config.json
console
Lisk interactive REPL session to run commands.
USAGE
$ ./bin/run console
OPTIONS
--api-ipc=api-ipc Enable api-client with IPC communication.
--api-ws=api-ws Enable api-client with Websocket communication.
EXAMPLES
console
console --api-ws=ws://localhost:8080
console --api-ipc=/path/to/server
autocomplete
Displays autocomplete installation instructions.
USAGE
$ ./bin/run autocomplete [SHELL]
ARGUMENTS
SHELL shell type
OPTIONS
-r, --refresh-cache Refresh cache (ignores displaying instructions)
EXAMPLES
$ ./bin/run autocomplete
$ ./bin/run autocomplete bash
$ ./bin/run autocomplete zsh
$ ./bin/run autocomplete --refresh-cache
hash-onion
Create hash onions to be used by a delegate.
USAGE
$ ./bin/run hash-onion
OPTIONS
-c, --count=count [default: 1000000] Total number of hashes to produce.
-d, --distance=distance [default: 1000] Distance between each hashes.
-o, --output=output Output file path.
--pretty Prints JSON in pretty format rather than condensed.
EXAMPLES
hash-onion --count=1000000 --distance=2000 --pretty
hash-onion --count=1000000 --distance=2000 --output ~/my_onion.json
Topics
account
Commands relating to blockchain accounts.
USAGE
$ ./bin/run account:COMMAND
COMMANDS
account:create Return randomly-generated mnemonic passphrase with its corresponding public/private key pair and Lisk address.
account:get Get account information for a given address.
account:show Show account information for a given passphrase.
account:validate Validate base32 address.
account:create
Returns a randomly-generated mnemonic passphrase with its corresponding public/private key pair and Lisk address.
USAGE
$ ./bin/run account:create
OPTIONS
-c, --count=count [default: 1] Number of accounts to create.
EXAMPLES
account:create
account:create --count=3
account:get
Gets account information for a given address.
USAGE
$ ./bin/run account:get ADDRESS
ARGUMENTS
ADDRESS Address of an account in a hex format.
OPTIONS
-d, --data-path=data-path Directory path to specify where node data is stored. Environment variable "LISK_DATA_PATH" can also be used.
--pretty Prints JSON in pretty format rather than condensed.
EXAMPLE
account:get ab0041a7d3f7b2c290b5b834d46bdc7b7eb85815
account:show
Shows the account information for a given passphrase.
USAGE
$ ./bin/run account:show
OPTIONS
-p, --passphrase=passphrase Specifies a source for your secret passphrase. Command will prompt you for input if this option is not set.
Examples:
- --passphrase='my secret passphrase' (should only be used where security is not important)
EXAMPLE
account:show
block:get
Gets block information for a given id or height.
USAGE
$ ./bin/run block:get INPUT
ARGUMENTS
INPUT Height in number or block id in hex format.
OPTIONS
-d, --data-path=data-path Directory path to specify where node data is stored. Environment variable "LISK_DATA_PATH" can also be used.
--pretty Prints JSON in pretty format rather than condensed.
EXAMPLES
block:get e082e79d01016632c451c9df9276e486cb7f460dc793ff5b10d8f71eecec28b4
block:get 2
blockchain
Commands relating to the blockchain data.
USAGE
$ ./bin/run blockchain:COMMAND
COMMANDS
blockchain:export Export to <FILE>.
blockchain:hash Generate SHA256 hash from <PATH>.
blockchain:import Import from <FILE>.
blockchain:reset Reset the blockchain data.
blockchain:export
Export the blockchain data to a file.
USAGE
$ ./bin/run blockchain:export
OPTIONS
-d, --data-path=data-path Directory path to specify where node data is stored. Environment variable "LISK_DATA_PATH" can also be used.
-o, --output=output The output directory. Default will set to current working directory.
EXAMPLES
blockchain:export
blockchain:export --data-path ./data --output ./my/path/
blockchain:hash
Generate SHA256 hash from the blockchain data.
USAGE
$ ./bin/run blockchain:hash
OPTIONS
-d, --data-path=data-path Directory path to specify where node data is stored. Environment variable "LISK_DATA_PATH" can also be used.
EXAMPLES
blockchain:hash
blockchain:hash --data-path ./data
blockchain:import
Import the blockchain data from a file.
USAGE
$ ./bin/run blockchain:import FILEPATH
ARGUMENTS
FILEPATH Path to the gzipped blockchain data.
OPTIONS
-d, --data-path=data-path Directory path to specify where node data is stored. Environment variable "LISK_DATA_PATH" can also be used.
-f, --force Delete and overwrite existing blockchain data.
EXAMPLES
blockchain:import ./path/to/blockchain.db.tar.gz
blockchain:import ./path/to/blockchain.db.tar.gz --data-path ./lisk/
blockchain:import ./path/to/blockchain.db.tar.gz --data-path ./lisk/ --force
blockchain:reset
Resets the blockchain data.
USAGE
$ ./bin/run blockchain:reset
OPTIONS
-d, --data-path=data-path Directory path to specify where node data is stored. Environment variable "LISK_DATA_PATH" can also be used.
-y, --yes Skip confirmation prompt.
EXAMPLES
blockchain:reset
blockchain:reset --data-path ./lisk
blockchain:reset --yes
config
Commands relating to the configuration of the blockchain application.
USAGE
$ ./bin/run config:COMMAND
COMMANDS
config:create Creates network configuration file.
config:show Show application config.
config:create
Creates a configuration file for the blockchain application.
USAGE
$ ./bin/run config:create
OPTIONS
-i, --community-identifier=community-identifier [default: sdk] Community Identifier
-l, --label=label [default: beta-sdk-app] App Label
-o, --output=output [default: /Users/mona/git/lisk-sdk-examples/guides/04-plugin/hello_app] Directory where the config file is saved
EXAMPLES
config:create --output mydir
config:create --output mydir --label beta-sdk-app
config:create --output mydir --label beta-sdk-app --community-identifier sdk
config:show
Shows the application config.
USAGE
$ ./bin/run config:show
OPTIONS
-c, --config=config File path to a custom config. Environment variable "LISK_CONFIG_FILE" can also be used.
-d, --data-path=data-path Directory path to specify where node data is stored. Environment variable "LISK_DATA_PATH" can also be used.
--pretty Prints JSON in pretty format rather than condensed.
EXAMPLES
config:show
config:show --pretty
config:show --config ./custom-config.json --data-path ./data
forger-info
Commands relating to the forger-info data.
USAGE
$ ./bin/run forger-info:COMMAND
COMMANDS
forger-info:export Export to <FILE>.
forger-info:import Import from <FILE>.
forger-info:export
Export the forger-info data to a file.
USAGE
$ ./bin/run forger-info:export
OPTIONS
-d, --data-path=data-path Directory path to specify where node data is stored. Environment variable "LISK_DATA_PATH" can also be used.
-o, --output=output The output directory. Default will be set to the current working directory.
EXAMPLES
forger-info:export
forger-info:export --data-path ./data --output ./my/path/
forger-info:import
Import the forger-info data from a file.
SAGE
$ ./bin/run forger-info:import SOURCEPATH
ARGUMENTS
SOURCEPATH Path to the forger-info zip file that you want to import.
OPTIONS
-d, --data-path=data-path Directory path to specify where node data is stored. Environment variable "LISK_DATA_PATH" can also be used.
-f, --force To overwrite the existing data if present.
EXAMPLES
forger-info:import ./my/path
forger-info:import --data-path ./data --force
forging
Commands relating to forging.
USAGE
$ ./bin/run forging:COMMAND
COMMANDS
forging:config Generate delegate forging config for given passphrase and password.
forging:disable Disable forging for given delegate address.
forging:enable Enable forging for given delegate address.
forging:status Get forging information for the locally running node.
forging:config
Generates the delegate forging config for a given passphrase and password.
USAGE
$ ./bin/run forging:config
OPTIONS
-c, --count=count [default: 1000000] Total number of hashes to produce.
-d, --distance=distance [default: 1000] Distance between each hashes.
-o, --output=output The output directory. Default will set to current working directory.
-p, --passphrase=passphrase Specifies a source for your secret passphrase. Command will prompt you for input if this option is not set.
Examples:
- --passphrase='my secret passphrase' (should only be used where security is not important).
-w, --password=password Specifies a source for your secret password. Command will prompt you for input if this option is not set.
Examples:
- --password=pass:password123 (should only be used where security is not important).
--pretty Prints JSON in pretty format rather than condensed.
EXAMPLES
forging:config
forging:config --password your_password
forging:config --passphrase your_passphrase --password your_password --pretty
forging:config --count=1000000 --distance=2000 --output /tmp/forging_config.json
forging:disable
Disable forging for a given delegate address.
USAGE
$ ./bin/run forging:disable ADDRESS
ARGUMENTS
ADDRESS Address of an account in a base32 format.
OPTIONS
-d, --data-path=data-path Directory path to specify where node data is stored. Environment variable "LISK_DATA_PATH" can also be used.
-w, --password=password Specifies a source for your secret password. Command will prompt you for input if this option is not set.
Examples:
- --password=pass:password123 (should only be used where security is not important).
--overwrite Overwrites the forger info.
--pretty Prints JSON in pretty format rather than condensed.
EXAMPLES
forging:disable ab0041a7d3f7b2c290b5b834d46bdc7b7eb85815
forging:disable ab0041a7d3f7b2c290b5b834d46bdc7b7eb85815 --data-path ./data
forging:disable ab0041a7d3f7b2c290b5b834d46bdc7b7eb85815 --data-path ./data --password your_password
forging:enable
Enable forging for a given delegate address.
USAGE
$ ./bin/run forging:enable ADDRESS HEIGHT MAXHEIGHTPREVIOUSLYFORGED MAXHEIGHTPREVOTED
ARGUMENTS
ADDRESS Address of an account in a base32 format.
HEIGHT Last forged block height.
MAXHEIGHTPREVIOUSLYFORGED Delegates largest previously forged height.
MAXHEIGHTPREVOTED Delegates largest prevoted height for a block.
OPTIONS
-d, --data-path=data-path Directory path to specify where node data is stored. Environment variable "LISK_DATA_PATH" can also be used.
-w, --password=password Specifies a source for your secret password. Command will prompt you for input if this option is not set.
Examples:
- --password=pass:password123 (should only be used where security is not important).
--overwrite Overwrites the forger info.
--pretty Prints JSON in pretty format rather than condensed.
EXAMPLES
forging:enable ab0041a7d3f7b2c290b5b834d46bdc7b7eb85815 100 100 10
forging:enable ab0041a7d3f7b2c290b5b834d46bdc7b7eb85815 100 100 10 --overwrite
forging:enable ab0041a7d3f7b2c290b5b834d46bdc7b7eb85815 100 100 10 --data-path ./data
forging:enable ab0041a7d3f7b2c290b5b834d46bdc7b7eb85815 100 100 10 --data-path ./data --password your_password
forging:status
Get forging information for the locally running node.
USAGE
$ ./bin/run forging:status
OPTIONS
-d, --data-path=data-path Directory path to specify where node data is stored. Environment variable "LISK_DATA_PATH" can also be used.
--pretty Prints JSON in pretty format rather than condensed.
EXAMPLES
forging:status
forging:status --data-path ./sample --pretty
genesis-block:create
Creates genesis block file and corresponding delegate config data and accounts information.
USAGE
$ ./bin/run genesis-block:create
OPTIONS
-a, --accounts=accounts [default: 10] Number of non-validator accounts to generate
-o, --output=output [default: config] Output folder path of the generated genesis block
-t, --token-distribution=token-distribution [default: 100000000000] Amount of tokens distributed to each account
-v, --validators=validators [default: 103] Number of validator accounts to generate
--validators-hash-onion-count=validators-hash-onion-count [default: 100000] Number of hashes to produce for each hash-onion
--validators-hash-onion-distance=validators-hash-onion-distance [default: 1000] Distance between each hashes for hash-onion
--validators-passphrase-encryption-iterations=validators-passphrase-encryption-iterations [default: 1000000] Number of iterations to use for passphrase encryption
EXAMPLES
genesis-block:create --output mydir
genesis-block:create --output mydir --accounts 10
genesis-block:create --output mydir --accounts 10 --validators 103
genesis-block:create --output mydir --accounts 10 --validators 103 --token-distribution 500
node:info
Gets node information from a running application.
USAGE
$ ./bin/run node:info
OPTIONS
-d, --data-path=data-path Directory path to specify where node data is stored. Environment variable "LISK_DATA_PATH" can also be used.
--pretty Prints JSON in pretty format rather than condensed.
EXAMPLES
node:info
node:info --data-path ./lisk
passphrase
Commands relating to passphrases.
USAGE
$ ./bin/run passphrase:COMMAND
COMMANDS
passphrase:decrypt Decrypt secret passphrase using the password provided at the time of encryption.
passphrase:encrypt Encrypt secret passphrase using password.
passphrase:decrypt
Decrypt the secret passphrase using the password provided at the time of encryption.
USAGE
$ ./bin/run passphrase:decrypt ENCRYPTEDPASSPHRASE
ARGUMENTS
ENCRYPTEDPASSPHRASE Encrypted passphrase to decrypt.
OPTIONS
-w, --password=password Specifies a source for your secret password. Command will prompt you for input if this option is not set.
Examples:
- --password=pass:password123 (should only be used where security is not important).
--pretty Prints JSON in pretty format rather than condensed.
EXAMPLES
passphrase:decrypt "iterations=1000000&cipherText=9b1c60&iv=5c8843f52ed3c0f2aa0086b0&salt=2240b7f1aa9c899894e528cf5b600e9c&tag=23c01112134317a63bcf3d41ea74e83b&version=1"
passphrase:decrypt "iterations=1000000&cipherText=9b1c60&iv=5c8843f52ed3c0f2aa0086b0&salt=2240b7f1aa9c899894e528cf5b600e9c&tag=23c01112134317a63bcf3d41ea74e83b&version=1" --password your-password
passphrase:encrypt
Encrypt secret passphrase using a password.
USAGE
$ ./bin/run passphrase:encrypt
OPTIONS
-p, --passphrase=passphrase Specifies a source for your secret passphrase. Command will prompt you for input if this option is not set.
Examples:
- --passphrase='my secret passphrase' (should only be used where security is not important).
-w, --password=password Specifies a source for your secret password. Command will prompt you for input if this option is not set.
Examples:
- --password=pass:password123 (should only be used where security is not important).
--output-public-key Includes the public key in the output. This option is provided for the convenience of node operators.
--pretty Prints JSON in pretty format rather than condensed.
EXAMPLES
passphrase:encrypt
passphrase:encrypt --passphrase your-passphrase
passphrase:encrypt --password your-password
passphrase:encrypt --password your-password --passphrase your-passphrase --pretty
passphrase:encrypt --output-public-key
transaction
Commands relating to transactions.
USAGE
$ ./bin/run transaction:COMMAND
COMMANDS
transaction:create Create transaction which can be broadcast to the network. Note: fee and amount should be in Beddows!!
transaction:get Get transaction from local node by ID.
transaction:send Send transaction to the local node.
transaction:sign Sign encoded transaction.
transaction:create
Create transaction which can be broadcast to the network.
| The fee and amount are expected in Beddows! |
USAGE
$ ./bin/run transaction:create MODULEID ASSETID FEE
ARGUMENTS
MODULEID Registered transaction module id.
ASSETID Registered transaction asset id.
FEE Transaction fee in Beddows.
OPTIONS
-a, --asset=asset Creates transaction with specific asset information.
-d, --data-path=data-path Directory path to specify where node data is stored. Environment variable "LISK_DATA_PATH" can also be used.
-j, --json Print the transaction in JSON format.
-p, --passphrase=passphrase Specifies a source for your secret passphrase. Command will prompt you for input if this option is not set.
Examples:
- --passphrase='my secret passphrase' (should only be used where security is not important).
-s, --sender-public-key=sender-public-key Creates the transaction with the provided sender public key, when the passphrase is not provided.
--network-identifier=network-identifier Network identifier defined for the network or main | test for the Lisk Network.
--no-signature Creates the transaction without a signature. Your passphrase will therefore not be required.
--nonce=nonce Nonce of the transaction.
--offline Specify whether to connect to a local node or not.
--pretty Prints JSON in pretty format rather than condensed.
EXAMPLES
transaction:create 2 0 100000000 --asset='{"amount":100000000,"recipientAddress":"ab0041a7d3f7b2c290b5b834d46bdc7b7eb85815","data":"send token"}'
transaction:create 2 0 100000000 --asset='{"amount":100000000,"recipientAddress":"ab0041a7d3f7b2c290b5b834d46bdc7b7eb85815","data":"send token"}' --json
transaction:create 2 0 100000000 --offline --network mainnet --network-identifier 873da85a2cee70da631d90b0f17fada8c3ac9b83b2613f4ca5fddd374d1034b3 --nonce 1
--asset='{"amount":100000000,"recipientAddress":"ab0041a7d3f7b2c290b5b834d46bdc7b7eb85815","data":"send token"}'
transaction:get
Get transaction from the local node by ID.
USAGE
$ ./bin/run transaction:get ID
ARGUMENTS
ID Transaction ID in hex format.
OPTIONS
-d, --data-path=data-path Directory path to specify where node data is stored. Environment variable "LISK_DATA_PATH" can also be used.
--pretty Prints JSON in pretty format rather than condensed.
EXAMPLE
transaction:get eab06c6a22e88bca7150e0347a7d976acd070cb9284423e6eabecd657acc1263
transaction:send
Send transaction to the local node.
USAGE
$ ./bin/run transaction:send TRANSACTION
ARGUMENTS
TRANSACTION A transaction to be sent to the node encoded as hex string.
OPTIONS
-d, --data-path=data-path Directory path to specify where node data is stored. Environment variable "LISK_DATA_PATH" can also be used.
--pretty Prints JSON in pretty format rather than condensed.
EXAMPLE
transaction:send
080810011880cab5ee012220fd061b9146691f3c56504be051175d5b76d1b1d0179c5c4370e18534c58821222a2408641214ab0041a7d3f7b2c290b5b834d46bdc7b7eb858151a0a73656e6420746f6b656e324028edd3601cdc35a41bb23415a0d9f3c3e9cf188d9971adf18742cea39d58aa84809
aa87bcfe6feaac46211c80472ad9297fd87727709f5d7e7b4134caf106b02
transaction:sign
Signs an encoded transaction.
USAGE
$ ./bin/run transaction:sign TRANSACTION
ARGUMENTS
TRANSACTION The transaction to be signed encoded as hex string.
OPTIONS
-d, --data-path=data-path Directory path to specify where node data is stored. Environment variable "LISK_DATA_PATH" can also be used.
-j, --json Print the transaction in JSON format.
-p, --passphrase=passphrase Specifies a source for your secret passphrase. Command will prompt you for input if this option is not set.
Examples:
- --passphrase='my secret passphrase' (should only be used where security is not important).
-s, --sender-public-key=sender-public-key Sign the transaction with provided sender public key, when passphrase is not provided.
--include-sender Include sender signature in transaction.
--mandatory-keys=mandatory-keys Mandatory publicKey string in hex format.
--network-identifier=network-identifier Network identifier defined for the network or main | test for the Lisk Network.
--offline Specify whether to connect to a local node or not.
--optional-keys=optional-keys Optional publicKey string in hex format.
--pretty Prints JSON in pretty format rather than condensed.
EXAMPLES
transaction:sign <hex-encoded-binary-transaction>
transaction:sign <hex-encoded-binary-transaction> --network testnet