The cardano-cli Commands
The command line interface (CLI) provides a collection of tools for generating keys, constructing transactions, creating certificates, and performing other important tasks. It is organized in a hierarchy of subcommands, and each level comes with its own built-in documentation of command syntax and options.
This section provides a reference of the core cardano-cli commands and their associated sub commands:
cardano-cli The set of cardano-cli commands include:
address: payment address commandsstake-address: stake address commandstransaction: transaction commandsnode: node operation commandsstake-pool: stake pool commandsquery: node query commands. This queries the local node whose Unix domain socket is obtained from the CARDANO_NODE_SOCKET_PATH environment variable.genesis: genesis block commandstext-view: commands for dealing with text view files that are stored on disk such as transactions or addressesgovernance: governance commands
cardano-cli address The address command contains the following sub commands:
key-gen: creates a single address key pairkey-hash: prints the hash of an address to stdoutbuild: builds a payment address, with optional delegation to a stake addressbuild-script: builds a token locking scriptinfo: prints details about the address
cardano-cli stake-address The stake-address command contains the following sub commands:
key-gen: creates a single address key pairbuild: builds a stake addressregistration-certificate: creates a registration certificatedelegation-certificate: creates a stake address delegation certificatederegistration-certificate: creates a de-registration certificate
cardano-cli transaction The transaction command contains the following sub commands:
build-raw: builds a low-level transaction (uses the--cardano-mode,--byron-mode,--shelley-modeflags)sign: signs the transactionassemble: combines and assembles the transaction witness(es) with a transaction body to create a transactionwitness: witnesses a transactionsubmit: submits the transaction to the local node whose Unix domain socket is obtained from the CARANO_NODE_SOCKET_PATH environment variable (uses the--cardano-mode,--byron-mode,--shelley-modeflags)calculate-min-fee: calculates the minimum fee for the transactiontxid: retrieves the transaction IDpolicyid: retrieves the policy ID
cardano-cli node The node command contains the following sub commands:
key-gen: creates a key pair for a node operator’s offline key and a new certificate issue counterkey-gen-KES: creates a key pair for a node KES operational keykey-gen-VRF: creates a key pair for a node VRF operational keykey-hash-VRF: creates a key hash for a node VRF operational keynew-counter: keeps track of the number of KES evolutions for a given operational certificate hot keyissue-op-cert: issues a node operational certificate
cardano-cli stake-pool The stake-pool command contains the following sub commands:
registration-certificate: creates a stake pool registration certificatede-registration-certificate: creates a stake pool de-registration certificateid: builds pool id from the offline keymetadata-hash: retrieves the metadata hash
cardano-cli query The query command contains the following sub commands:
protocol-parameters(advanced): retrieves the node’s current pool parameters (a raw dump ofLedger.ChainDepState).tip: gets the node’s current tip (slot number, hash, and block number)utxo: retrieves the node’s current UTxO, filtered by addressledger-state(advanced): dumps the current state of the node (a raw dump ofLedger.NewEpochState)stake-address-info: Get the current delegations and reward accounts filtered by stake address.stake-distribution: Get the node's current aggregated stake distributionstake-snapshot(advanced): Get the stake snapshot information for a stake poolpool-params(advanced): Get the current and future parameters for a stake pool
cardano-cli governance The governance command contains the following sub commands:
create-mir-certificate: creates an MIR (move instantaneous rewards) certificatecreate-update-proposal: creates an update proposalcreate-genesis-key-certificate: retrieves the genesis key certificate
cardano-cli genesis The genesis command contains the following sub commands:
key-gen-genesis: creates a genesis key pairkey-gen-delegate: creates a genesis delegate key pairkey-gen-utxo: creates a genesis UTxO key pairkey-hash: prints the identifier, or hash, of a public keyget-ver-key: derives verification key from a signing keyinitial-addr: gets the address for an initial UTxO based on the verification keyinitial-txin: gets the transaction ID for an initial UTxO based on the verification key.create: creates a genesis file from a genesis template, as well as genesis keys, delegation keys, and spending keys.create-staked: creates a staked genesis filehash: retrieves the hash value
cardano-cli text-view The text-view command contains the following sub command:
decode-cbor: prints a text view file, as decoded CBOR.