CLI Commands
Complete list of Avalanche CLI commands and their usage.
avalanche blockchain
The blockchain command suite provides a collection of tools for developing and deploying Blockchains.
To get started, use the blockchain create command wizard to walk through the configuration of your very first Blockchain. Then, go ahead and deploy it with the blockchain deploy command. You can use the rest of the commands to manage your Blockchain configurations and live deployments.
Usage:
Subcommands:
addValidator
: The blockchain addValidator command adds a node as a validator to an L1 of the user provided deployed network. If the network is proof of authority, the owner of the validator manager contract must sign the transaction. If the network is proof of stake, the node must stake the L1's staking token. Both processes will issue a RegisterL1ValidatorTx on the P-Chain.
This command currently only works on Blockchains deployed to either the Fuji Testnet or Mainnet.
changeOwner
: The blockchain changeOwner changes the owner of the deployed Blockchain.changeWeight
: The blockchain changeWeight command changes the weight of a L1 Validator.
The L1 has to be a Proof of Authority L1.
configure
: AvalancheGo nodes support several different configuration files. Each network (a Subnet or an L1) has their own config which applies to all blockchains/VMs in the network. Each blockchain within the network can have its own chain config. A chain can also have special requirements for the AvalancheGo node configuration itself. This command allows you to set all those files.create
: The blockchain create command builds a new genesis file to configure your Blockchain. By default, the command runs an interactive wizard. It walks you through all the steps you need to create your first Blockchain.
The tool supports deploying Subnet-EVM, and custom VMs. You can create a custom, user-generated genesis with a custom VM by providing the path to your genesis and VM binaries with the --genesis and --vm flags.
By default, running the command with a blockchainName that already exists causes the command to fail. If you'd like to overwrite an existing configuration, pass the -f flag.
delete
: The blockchain delete command deletes an existing blockchain configuration.deploy
: The blockchain deploy command deploys your Blockchain configuration locally, to Fuji Testnet, or to Mainnet.
At the end of the call, the command prints the RPC URL you can use to interact with the Subnet.
Avalanche-CLI only supports deploying an individual Blockchain once per network. Subsequent attempts to deploy the same Blockchain to the same network (local, Fuji, Mainnet) aren't allowed. If you'd like to redeploy a Blockchain locally for testing, you must first call avalanche network clean to reset all deployed chain state. Subsequent local deploys redeploy the chain with fresh state. You can deploy the same Blockchain to multiple networks, so you can take your locally tested Blockchain and deploy it on Fuji or Mainnet.
describe
: The blockchain describe command prints the details of a Blockchain configuration to the console. By default, the command prints a summary of the configuration. By providing the --genesis flag, the command instead prints out the raw genesis file.export
: The blockchain export command write the details of an existing Blockchain deploy to a file.
The command prompts for an output path. You can also provide one with the --output flag.
import
: Import blockchain configurations into avalanche-cli.
This command suite supports importing from a file created on another computer, or importing from blockchains running public networks (e.g. created manually or with the deprecated subnet-cli)
join
: The blockchain join command configures your validator node to begin validating a new Blockchain.
To complete this process, you must have access to the machine running your validator. If the CLI is running on the same machine as your validator, it can generate or update your node's config file automatically. Alternatively, the command can print the necessary instructions to update your node manually. To complete the validation process, the Blockchain's admins must add the NodeID of your validator to the Blockchain's allow list by calling addValidator with your NodeID.
After you update your validator's config, you need to restart your validator manually. If you provide the --avalanchego-config flag, this command attempts to edit the config file at that path.
This command currently only supports Blockchains deployed on the Fuji Testnet and Mainnet.
list
: The blockchain list command prints the names of all created Blockchain configurations. Without any flags, it prints some general, static information about the Blockchain. With the --deployed flag, the command shows additional information including the VMID, BlockchainID and SubnetID.publish
: The blockchain publish command publishes the Blockchain's VM to a repository.removeValidator
: The blockchain removeValidator command stops a whitelisted blockchain network validator from validating your deployed Blockchain.
To remove the validator from the Subnet's allow list, provide the validator's unique NodeID. You can bypass these prompts by providing the values with flags.
stats
: The blockchain stats command prints validator statistics for the given Blockchain.upgrade
: The blockchain upgrade command suite provides a collection of tools for updating your developmental and deployed Blockchains.validators
: The blockchain validators command lists the validators of a blockchain and provides several statistics about them.vmid
: The blockchain vmid command prints the virtual machine ID (VMID) for the given Blockchain.
Flags:
addValidator
The blockchain addValidator command adds a node as a validator to an L1 of the user provided deployed network. If the network is proof of authority, the owner of the validator manager contract must sign the transaction. If the network is proof of stake, the node must stake the L1's staking token. Both processes will issue a RegisterL1ValidatorTx on the P-Chain.
This command currently only works on Blockchains deployed to either the Fuji Testnet or Mainnet.
Usage:
Flags:
changeOwner
The blockchain changeOwner changes the owner of the deployed Blockchain.
Usage:
Flags:
changeWeight
The blockchain changeWeight command changes the weight of a L1 Validator.
The L1 has to be a Proof of Authority L1.
Usage:
Flags:
configure
AvalancheGo nodes support several different configuration files. Each network (a Subnet or an L1) has their own config which applies to all blockchains/VMs in the network. Each blockchain within the network can have its own chain config. A chain can also have special requirements for the AvalancheGo node configuration itself. This command allows you to set all those files.
Usage:
Flags:
create
The blockchain create command builds a new genesis file to configure your Blockchain. By default, the command runs an interactive wizard. It walks you through all the steps you need to create your first Blockchain.
The tool supports deploying Subnet-EVM, and custom VMs. You can create a custom, user-generated genesis with a custom VM by providing the path to your genesis and VM binaries with the --genesis and --vm flags.
By default, running the command with a blockchainName that already exists causes the command to fail. If you'd like to overwrite an existing configuration, pass the -f flag.
Usage:
Flags:
delete
The blockchain delete command deletes an existing blockchain configuration.
Usage:
Flags:
deploy
The blockchain deploy command deploys your Blockchain configuration locally, to Fuji Testnet, or to Mainnet.
At the end of the call, the command prints the RPC URL you can use to interact with the Subnet.
Avalanche-CLI only supports deploying an individual Blockchain once per network. Subsequent attempts to deploy the same Blockchain to the same network (local, Fuji, Mainnet) aren't allowed. If you'd like to redeploy a Blockchain locally for testing, you must first call avalanche network clean to reset all deployed chain state. Subsequent local deploys redeploy the chain with fresh state. You can deploy the same Blockchain to multiple networks, so you can take your locally tested Blockchain and deploy it on Fuji or Mainnet.
Usage:
Flags:
describe
The blockchain describe command prints the details of a Blockchain configuration to the console. By default, the command prints a summary of the configuration. By providing the --genesis flag, the command instead prints out the raw genesis file.
Usage:
Flags:
export
The blockchain export command write the details of an existing Blockchain deploy to a file.
The command prompts for an output path. You can also provide one with the --output flag.
Usage:
Flags:
import
Import blockchain configurations into avalanche-cli.
This command suite supports importing from a file created on another computer, or importing from blockchains running public networks (e.g. created manually or with the deprecated subnet-cli)
Usage:
Subcommands:
file
: The blockchain import command will import a blockchain configuration from a file or a git repository.
To import from a file, you can optionally provide the path as a command-line argument. Alternatively, running the command without any arguments triggers an interactive wizard. To import from a repository, go through the wizard. By default, an imported Blockchain doesn't overwrite an existing Blockchain with the same name. To allow overwrites, provide the --force flag.
public
: The blockchain import public command imports a Blockchain configuration from a running network.
By default, an imported Blockchain doesn't overwrite an existing Blockchain with the same name. To allow overwrites, provide the --force flag.
Flags:
import file
The blockchain import command will import a blockchain configuration from a file or a git repository.
To import from a file, you can optionally provide the path as a command-line argument. Alternatively, running the command without any arguments triggers an interactive wizard. To import from a repository, go through the wizard. By default, an imported Blockchain doesn't overwrite an existing Blockchain with the same name. To allow overwrites, provide the --force flag.
Usage:
Flags:
import public
The blockchain import public command imports a Blockchain configuration from a running network.
By default, an imported Blockchain doesn't overwrite an existing Blockchain with the same name. To allow overwrites, provide the --force flag.
Usage:
Flags:
join
The blockchain join command configures your validator node to begin validating a new Blockchain.
To complete this process, you must have access to the machine running your validator. If the CLI is running on the same machine as your validator, it can generate or update your node's config file automatically. Alternatively, the command can print the necessary instructions to update your node manually. To complete the validation process, the Blockchain's admins must add the NodeID of your validator to the Blockchain's allow list by calling addValidator with your NodeID.
After you update your validator's config, you need to restart your validator manually. If you provide the --avalanchego-config flag, this command attempts to edit the config file at that path.
This command currently only supports Blockchains deployed on the Fuji Testnet and Mainnet.
Usage:
Flags:
list
The blockchain list command prints the names of all created Blockchain configurations. Without any flags, it prints some general, static information about the Blockchain. With the --deployed flag, the command shows additional information including the VMID, BlockchainID and SubnetID.
Usage:
Flags:
publish
The blockchain publish command publishes the Blockchain's VM to a repository.
Usage:
Flags:
removeValidator
The blockchain removeValidator command stops a whitelisted blockchain network validator from validating your deployed Blockchain.
To remove the validator from the Subnet's allow list, provide the validator's unique NodeID. You can bypass these prompts by providing the values with flags.
Usage:
Flags:
stats
The blockchain stats command prints validator statistics for the given Blockchain.
Usage:
Flags:
upgrade
The blockchain upgrade command suite provides a collection of tools for updating your developmental and deployed Blockchains.
Usage:
Subcommands:
apply
: Apply generated upgrade bytes to running Blockchain nodes to trigger a network upgrade.
For public networks (Fuji Testnet or Mainnet), to complete this process, you must have access to the machine running your validator. If the CLI is running on the same machine as your validator, it can manipulate your node's configuration automatically. Alternatively, the command can print the necessary instructions to upgrade your node manually.
After you update your validator's configuration, you need to restart your validator manually. If you provide the --avalanchego-chain-config-dir flag, this command attempts to write the upgrade file at that path. Refer to https://docs.avax.network/nodes/maintain/chain-config-flags#subnet-chain-configs for related documentation.
export
: Export the upgrade bytes file to a location of choice on diskgenerate
: The blockchain upgrade generate command builds a new upgrade.json file to customize your Blockchain. It guides the user through the process using an interactive wizard.import
: Import the upgrade bytes file into the local environmentprint
: Print the upgrade.json file contentvm
: The blockchain upgrade vm command enables the user to upgrade their Blockchain's VM binary. The command can upgrade both local Blockchains and publicly deployed Blockchains on Fuji and Mainnet.
The command walks the user through an interactive wizard. The user can skip the wizard by providing command line flags.
Flags:
upgrade apply
Apply generated upgrade bytes to running Blockchain nodes to trigger a network upgrade.
For public networks (Fuji Testnet or Mainnet), to complete this process, you must have access to the machine running your validator. If the CLI is running on the same machine as your validator, it can manipulate your node's configuration automatically. Alternatively, the command can print the necessary instructions to upgrade your node manually.
After you update your validator's configuration, you need to restart your validator manually. If you provide the --avalanchego-chain-config-dir flag, this command attempts to write the upgrade file at that path. Refer to https://docs.avax.network/nodes/maintain/chain-config-flags#subnet-chain-configs for related documentation.
Usage:
Flags:
upgrade export
Export the upgrade bytes file to a location of choice on disk
Usage:
Flags:
upgrade generate
The blockchain upgrade generate command builds a new upgrade.json file to customize your Blockchain. It guides the user through the process using an interactive wizard.
Usage:
Flags:
upgrade import
Import the upgrade bytes file into the local environment
Usage:
Flags:
upgrade print
Print the upgrade.json file content
Usage:
Flags:
upgrade vm
The blockchain upgrade vm command enables the user to upgrade their Blockchain's VM binary. The command can upgrade both local Blockchains and publicly deployed Blockchains on Fuji and Mainnet.
The command walks the user through an interactive wizard. The user can skip the wizard by providing command line flags.
Usage:
Flags:
validators
The blockchain validators command lists the validators of a blockchain and provides several statistics about them.
Usage:
Flags:
vmid
The blockchain vmid command prints the virtual machine ID (VMID) for the given Blockchain.
Usage:
Flags:
avalanche config
Customize configuration for Avalanche-CLI
Usage:
Subcommands:
authorize-cloud-access
: set preferences to authorize access to cloud resourcesmetrics
: set user metrics collection preferencesmigrate
: migrate command migrates old ~/.avalanche-cli.json and ~/.avalanche-cli/config to /.avalanche-cli/config.json..snapshotsAutoSave
: set user preference between auto saving local network snapshots or notupdate
: set user preference between update check or not
Flags:
authorize-cloud-access
set preferences to authorize access to cloud resources
Usage:
Flags:
metrics
set user metrics collection preferences
Usage:
Flags:
migrate
migrate command migrates old ~/.avalanche-cli.json and ~/.avalanche-cli/config to /.avalanche-cli/config.json..
Usage:
Flags:
snapshotsAutoSave
set user preference between auto saving local network snapshots or not
Usage:
Flags:
update
set user preference between update check or not
Usage:
Flags:
avalanche contract
The contract command suite provides a collection of tools for deploying and interacting with smart contracts.
Usage:
Subcommands:
deploy
: The contract command suite provides a collection of tools for deploying smart contracts.initValidatorManager
: Initializes Proof of Authority(PoA) or Proof of Stake(PoS)Validator Manager contract on a Blockchain and sets up initial validator set on the Blockchain. For more info on Validator Manager, please head to https://github.com/ava-labs/icm-contracts/tree/main/contracts/validator-manager
Flags:
deploy
The contract command suite provides a collection of tools for deploying smart contracts.
Usage:
Subcommands:
erc20
: Deploy an ERC20 token into a given Network and Blockchain
Flags:
deploy erc20
Deploy an ERC20 token into a given Network and Blockchain
Usage:
Flags:
initValidatorManager
Initializes Proof of Authority(PoA) or Proof of Stake(PoS)Validator Manager contract on a Blockchain and sets up initial validator set on the Blockchain. For more info on Validator Manager, please head to https://github.com/ava-labs/icm-contracts/tree/main/contracts/validator-manager
Usage:
Flags:
avalanche help
Help provides help for any command in the application. Simply type avalanche help [path to command] for full details.
Usage:
Flags:
avalanche icm
The messenger command suite provides a collection of tools for interacting with ICM messenger contracts.
Usage:
Subcommands:
deploy
: Deploys ICM Messenger and Registry into a given L1.sendMsg
: Sends and wait reception for a ICM msg between two blockchains.
Flags:
deploy
Deploys ICM Messenger and Registry into a given L1.
Usage:
Flags:
sendMsg
Sends and wait reception for a ICM msg between two blockchains.
Usage:
Flags:
avalanche ictt
The ictt command suite provides tools to deploy and manage Interchain Token Transferrers.
Usage:
Subcommands:
deploy
: Deploys a Token Transferrer into a given Network and Subnets
Flags:
deploy
Deploys a Token Transferrer into a given Network and Subnets
Usage:
Flags:
avalanche interchain
The interchain command suite provides a collection of tools to set and manage interoperability between blockchains.
Usage:
Subcommands:
messenger
: The messenger command suite provides a collection of tools for interacting with ICM messenger contracts.relayer
: The relayer command suite provides a collection of tools for deploying and configuring an ICM relayers.tokenTransferrer
: The tokenTransfer command suite provides tools to deploy and manage Token Transferrers.
Flags:
messenger
The messenger command suite provides a collection of tools for interacting with ICM messenger contracts.
Usage:
Subcommands:
deploy
: Deploys ICM Messenger and Registry into a given L1.sendMsg
: Sends and wait reception for a ICM msg between two blockchains.
Flags:
messenger deploy
Deploys ICM Messenger and Registry into a given L1.
Usage:
Flags:
messenger sendMsg
Sends and wait reception for a ICM msg between two blockchains.
Usage:
Flags:
relayer
The relayer command suite provides a collection of tools for deploying and configuring an ICM relayers.
Usage:
Subcommands:
deploy
: Deploys an ICM Relayer for the given Network.logs
: Shows pretty formatted AWM relayer logsstart
: Starts AWM relayer on the specified network (Currently only for local network).stop
: Stops AWM relayer on the specified network (Currently only for local network, cluster).
Flags:
relayer deploy
Deploys an ICM Relayer for the given Network.
Usage:
Flags:
relayer logs
Shows pretty formatted AWM relayer logs
Usage:
Flags:
relayer start
Starts AWM relayer on the specified network (Currently only for local network).
Usage:
Flags:
relayer stop
Stops AWM relayer on the specified network (Currently only for local network, cluster).
Usage:
Flags:
tokenTransferrer
The tokenTransfer command suite provides tools to deploy and manage Token Transferrers.
Usage:
Subcommands:
deploy
: Deploys a Token Transferrer into a given Network and Subnets
Flags:
tokenTransferrer deploy
Deploys a Token Transferrer into a given Network and Subnets
Usage:
Flags:
avalanche key
The key command suite provides a collection of tools for creating and managing signing keys. You can use these keys to deploy Subnets to the Fuji Testnet, but these keys are NOT suitable to use in production environments. DO NOT use these keys on Mainnet.
To get started, use the key create command.
Usage:
Subcommands:
create
: The key create command generates a new private key to use for creating and controlling test Subnets. Keys generated by this command are NOT cryptographically secure enough to use in production environments. DO NOT use these keys on Mainnet.
The command works by generating a secp256 key and storing it with the provided keyName. You can use this key in other commands by providing this keyName.
If you'd like to import an existing key instead of generating one from scratch, provide the --file flag.
delete
: The key delete command deletes an existing signing key.
To delete a key, provide the keyName. The command prompts for confirmation before deleting the key. To skip the confirmation, provide the --force flag.
export
: The key export command exports a created signing key. You can use an exported key in other applications or import it into another instance of Avalanche-CLI.
By default, the tool writes the hex encoded key to stdout. If you provide the --output flag, the command writes the key to a file of your choosing.
list
: The key list command prints information for all stored signing keys or for the ledger addresses associated to certain indices.transfer
: The key transfer command allows to transfer funds between stored keys or ledger addresses.
Flags:
create
The key create command generates a new private key to use for creating and controlling test Subnets. Keys generated by this command are NOT cryptographically secure enough to use in production environments. DO NOT use these keys on Mainnet.
The command works by generating a secp256 key and storing it with the provided keyName. You can use this key in other commands by providing this keyName.
If you'd like to import an existing key instead of generating one from scratch, provide the --file flag.
Usage:
Flags:
delete
The key delete command deletes an existing signing key.
To delete a key, provide the keyName. The command prompts for confirmation before deleting the key. To skip the confirmation, provide the --force flag.
Usage:
Flags:
export
The key export command exports a created signing key. You can use an exported key in other applications or import it into another instance of Avalanche-CLI.
By default, the tool writes the hex encoded key to stdout. If you provide the --output flag, the command writes the key to a file of your choosing.
Usage:
Flags:
list
The key list command prints information for all stored signing keys or for the ledger addresses associated to certain indices.
Usage:
Flags:
transfer
The key transfer command allows to transfer funds between stored keys or ledger addresses.
Usage:
Flags:
avalanche network
The network command suite provides a collection of tools for managing local Blockchain deployments.
When you deploy a Blockchain locally, it runs on a local, multi-node Avalanche network. The blockchain deploy command starts this network in the background. This command suite allows you to shutdown, restart, and clear that network.
This network currently supports multiple, concurrently deployed Blockchains.
Usage:
Subcommands:
clean
: The network clean command shuts down your local, multi-node network. All deployed Subnets shutdown and delete their state. You can restart the network by deploying a new Subnet configuration.start
: The network start command starts a local, multi-node Avalanche network on your machine.
By default, the command loads the default snapshot. If you provide the --snapshot-name flag, the network loads that snapshot instead. The command fails if the local network is already running.
status
: The network status command prints whether or not a local Avalanche network is running and some basic stats about the network.stop
: The network stop command shuts down your local, multi-node network.
All deployed Subnets shutdown gracefully and save their state. If you provide the
--snapshot-name flag, the network saves its state under this named snapshot. You can
reload this snapshot with network start --snapshot-name snapshotName
. Otherwise, the
network saves to the default snapshot, overwriting any existing state. You can reload the
default snapshot with network start.
Flags:
clean
The network clean command shuts down your local, multi-node network. All deployed Subnets shutdown and delete their state. You can restart the network by deploying a new Subnet configuration.
Usage:
Flags:
start
The network start command starts a local, multi-node Avalanche network on your machine.
By default, the command loads the default snapshot. If you provide the --snapshot-name flag, the network loads that snapshot instead. The command fails if the local network is already running.
Usage:
Flags:
status
The network status command prints whether or not a local Avalanche network is running and some basic stats about the network.
Usage:
Flags:
stop
The network stop command shuts down your local, multi-node network.
All deployed Subnets shutdown gracefully and save their state. If you provide the
--snapshot-name flag, the network saves its state under this named snapshot. You can
reload this snapshot with network start --snapshot-name snapshotName
. Otherwise, the
network saves to the default snapshot, overwriting any existing state. You can reload the
default snapshot with network start.
Usage:
Flags:
avalanche node
The node command suite provides a collection of tools for creating and maintaining validators on Avalanche Network.
To get started, use the node create command wizard to walk through the configuration to make your node a primary validator on Avalanche public network. You can use the rest of the commands to maintain your node and make your node a Subnet Validator.
Usage:
Subcommands:
addDashboard
: (ALPHA Warning) This command is currently in experimental mode.
The node addDashboard command adds custom dashboard to the Grafana monitoring dashboard for the cluster.
create
: (ALPHA Warning) This command is currently in experimental mode.
The node create command sets up a validator on a cloud server of your choice. The validator will be validating the Avalanche Primary Network and Subnet of your choice. By default, the command runs an interactive wizard. It walks you through all the steps you need to set up a validator. Once this command is completed, you will have to wait for the validator to finish bootstrapping on the primary network before running further commands on it, e.g. validating a Subnet. You can check the bootstrapping status by running avalanche node status
The created node will be part of group of validators called clusterName
and users can call node commands with clusterName
so that the command
will apply to all nodes in the cluster
destroy
: (ALPHA Warning) This command is currently in experimental mode.
The node destroy command terminates all running nodes in cloud server and deletes all storage disks.
If there is a static IP address attached, it will be released.
devnet
: (ALPHA Warning) This command is currently in experimental mode.
The node devnet command suite provides a collection of commands related to devnets.
You can check the updated status by calling avalanche node status clusterName
export
: (ALPHA Warning) This command is currently in experimental mode.
The node export command exports cluster configuration and its nodes config to a text file.
If no file is specified, the configuration is printed to the stdout.
Use --include-secrets to include keys in the export. In this case please keep the file secure as it contains sensitive information.
Exported cluster configuration without secrets can be imported by another user using node import command.
import
: (ALPHA Warning) This command is currently in experimental mode.
The node import command imports cluster configuration and its nodes configuration from a text file created from the node export command.
Prior to calling this command, call node whitelist command to have your SSH public key and IP whitelisted by the cluster owner. This will enable you to use avalanche-cli commands to manage the imported cluster.
Please note, that this imported cluster will be considered as EXTERNAL by avalanche-cli, so some commands affecting cloud nodes like node create or node destroy will be not applicable to it.
list
: (ALPHA Warning) This command is currently in experimental mode.
The node list command lists all clusters together with their nodes.
loadtest
: (ALPHA Warning) This command is currently in experimental mode.
The node loadtest command suite starts and stops a load test for an existing devnet cluster.
local
: The node local command suite provides a collection of commands related to local nodesrefresh-ips
: (ALPHA Warning) This command is currently in experimental mode.
The node refresh-ips command obtains the current IP for all nodes with dynamic IPs in the cluster, and updates the local node information used by CLI commands.
resize
: (ALPHA Warning) This command is currently in experimental mode.
The node resize command can change the amount of CPU, memory and disk space available for the cluster nodes.
scp
: (ALPHA Warning) This command is currently in experimental mode.
The node scp command securely copies files to and from nodes. Remote source or destionation can be specified using the following format: [clusterName|nodeID|instanceID|IP]:/path/to/file. Regular expressions are supported for the source files like /tmp/*.txt. File transfer to the nodes are parallelized. IF source or destination is cluster, the other should be a local file path. If both destinations are remote, they must be nodes for the same cluster and not clusters themselves. For example: avalanche node scp /tmp/file.txt [cluster1|NodeID-XXXX]:/tmp/file.txt $ avalanche node scp node1:/tmp/file.txt NodeID-XXXX:/tmp/file.txt
ssh
: (ALPHA Warning) This command is currently in experimental mode.
The node ssh command execute a given command [cmd] using ssh on all nodes in the cluster if ClusterName is given. If no command is given, just prints the ssh command to be used to connect to each node in the cluster. For provided NodeID or InstanceID or IP, the command [cmd] will be executed on that node. If no [cmd] is provided for the node, it will open ssh shell there.
status
: (ALPHA Warning) This command is currently in experimental mode.
The node status command gets the bootstrap status of all nodes in a cluster with the Primary Network. If no cluster is given, defaults to node list behaviour.
To get the bootstrap status of a node with a Blockchain, use --blockchain flag
sync
: (ALPHA Warning) This command is currently in experimental mode.
The node sync command enables all nodes in a cluster to be bootstrapped to a Blockchain.
You can check the blockchain bootstrap status by calling avalanche node status clusterName
--blockchain blockchainName
update
: (ALPHA Warning) This command is currently in experimental mode.
The node update command suite provides a collection of commands for nodes to update their avalanchego or VM config.
You can check the status after update by calling avalanche node status
upgrade
: (ALPHA Warning) This command is currently in experimental mode.
The node update command suite provides a collection of commands for nodes to update their avalanchego or VM version.
You can check the status after upgrade by calling avalanche node status
validate
: (ALPHA Warning) This command is currently in experimental mode.
The node validate command suite provides a collection of commands for nodes to join
the Primary Network and Subnets as validators.
If any of the commands is run before the nodes are bootstrapped on the Primary Network, the command
will fail. You can check the bootstrap status by calling avalanche node status clusterName
-
whitelist
: (ALPHA Warning) The whitelist command suite provides a collection of tools for granting access to the cluster.Command adds IP if --ip params provided to cloud security access rules allowing it to access all nodes in the cluster via ssh or http. It also command adds SSH public key to all nodes in the cluster if --ssh params is there. If no params provided it detects current user IP automaticaly and whitelists it
Flags:
addDashboard
(ALPHA Warning) This command is currently in experimental mode.
The node addDashboard command adds custom dashboard to the Grafana monitoring dashboard for the cluster.
Usage:
Flags:
create
(ALPHA Warning) This command is currently in experimental mode.
The node create command sets up a validator on a cloud server of your choice. The validator will be validating the Avalanche Primary Network and Subnet of your choice. By default, the command runs an interactive wizard. It walks you through all the steps you need to set up a validator. Once this command is completed, you will have to wait for the validator to finish bootstrapping on the primary network before running further commands on it, e.g. validating a Subnet. You can check the bootstrapping status by running avalanche node status
The created node will be part of group of validators called clusterName
and users can call node commands with clusterName
so that the command
will apply to all nodes in the cluster
Usage:
Flags:
destroy
(ALPHA Warning) This command is currently in experimental mode.
The node destroy command terminates all running nodes in cloud server and deletes all storage disks.
If there is a static IP address attached, it will be released.
Usage:
Flags:
devnet
(ALPHA Warning) This command is currently in experimental mode.
The node devnet command suite provides a collection of commands related to devnets.
You can check the updated status by calling avalanche node status clusterName
Usage:
Subcommands:
deploy
: (ALPHA Warning) This command is currently in experimental mode.
The node devnet deploy command deploys a subnet into a devnet cluster, creating subnet and blockchain txs for it. It saves the deploy info both locally and remotely.
wiz
: (ALPHA Warning) This command is currently in experimental mode.
The node wiz command creates a devnet and deploys, sync and validate a subnet into it. It creates the subnet if so needed.
Flags:
devnet deploy
(ALPHA Warning) This command is currently in experimental mode.
The node devnet deploy command deploys a subnet into a devnet cluster, creating subnet and blockchain txs for it. It saves the deploy info both locally and remotely.
Usage:
Flags:
devnet wiz
(ALPHA Warning) This command is currently in experimental mode.
The node wiz command creates a devnet and deploys, sync and validate a subnet into it. It creates the subnet if so needed.
Usage:
Flags:
export
(ALPHA Warning) This command is currently in experimental mode.
The node export command exports cluster configuration and its nodes config to a text file.
If no file is specified, the configuration is printed to the stdout.
Use --include-secrets to include keys in the export. In this case please keep the file secure as it contains sensitive information.
Exported cluster configuration without secrets can be imported by another user using node import command.
Usage:
Flags:
import
(ALPHA Warning) This command is currently in experimental mode.
The node import command imports cluster configuration and its nodes configuration from a text file created from the node export command.
Prior to calling this command, call node whitelist command to have your SSH public key and IP whitelisted by the cluster owner. This will enable you to use avalanche-cli commands to manage the imported cluster.
Please note, that this imported cluster will be considered as EXTERNAL by avalanche-cli, so some commands affecting cloud nodes like node create or node destroy will be not applicable to it.
Usage:
Flags:
list
(ALPHA Warning) This command is currently in experimental mode.
The node list command lists all clusters together with their nodes.
Usage:
Flags:
loadtest
(ALPHA Warning) This command is currently in experimental mode.
The node loadtest command suite starts and stops a load test for an existing devnet cluster.
Usage:
Subcommands:
start
: (ALPHA Warning) This command is currently in experimental mode.
The node loadtest command starts load testing for an existing devnet cluster. If the cluster does not have an existing load test host, the command creates a separate cloud server and builds the load test binary based on the provided load test Git Repo URL and load test binary build command.
The command will then run the load test binary based on the provided load test run command.
stop
: (ALPHA Warning) This command is currently in experimental mode.
The node loadtest stop command stops load testing for an existing devnet cluster and terminates the separate cloud server created to host the load test.
Flags:
loadtest start
(ALPHA Warning) This command is currently in experimental mode.
The node loadtest command starts load testing for an existing devnet cluster. If the cluster does not have an existing load test host, the command creates a separate cloud server and builds the load test binary based on the provided load test Git Repo URL and load test binary build command.
The command will then run the load test binary based on the provided load test run command.
Usage:
Flags:
loadtest stop
(ALPHA Warning) This command is currently in experimental mode.
The node loadtest stop command stops load testing for an existing devnet cluster and terminates the separate cloud server created to host the load test.
Usage:
Flags:
local
The node local command suite provides a collection of commands related to local nodes
Usage:
Subcommands:
destroy
: Cleanup local node.start
: The node local start command creates Avalanche nodes on the local machine. Once this command is completed, you will have to wait for the Avalanche node to finish bootstrapping on the primary network before running further commands on it, e.g. validating a Subnet.
You can check the bootstrapping status by running avalanche node status local.
status
: Get status of local node.stop
: Stop local node.track
: Track specified blockchain with local nodevalidate
: Use Avalanche Node set up on local machine to set up specified L1 by providing the RPC URL of the L1.
This command can only be used to validate Proof of Stake L1.
Flags:
local destroy
Cleanup local node.
Usage:
Flags:
local start
The node local start command creates Avalanche nodes on the local machine. Once this command is completed, you will have to wait for the Avalanche node to finish bootstrapping on the primary network before running further commands on it, e.g. validating a Subnet.
You can check the bootstrapping status by running avalanche node status local.
Usage:
Flags:
local status
Get status of local node.
Usage:
Flags:
local stop
Stop local node.
Usage:
Flags:
local track
Track specified blockchain with local node
Usage:
Flags:
local validate
Use Avalanche Node set up on local machine to set up specified L1 by providing the RPC URL of the L1.
This command can only be used to validate Proof of Stake L1.
Usage:
Flags:
refresh-ips
(ALPHA Warning) This command is currently in experimental mode.
The node refresh-ips command obtains the current IP for all nodes with dynamic IPs in the cluster, and updates the local node information used by CLI commands.
Usage:
Flags:
resize
(ALPHA Warning) This command is currently in experimental mode.
The node resize command can change the amount of CPU, memory and disk space available for the cluster nodes.
Usage:
Flags:
scp
(ALPHA Warning) This command is currently in experimental mode.
The node scp command securely copies files to and from nodes. Remote source or destionation can be specified using the following format: [clusterName|nodeID|instanceID|IP]:/path/to/file. Regular expressions are supported for the source files like /tmp/*.txt. File transfer to the nodes are parallelized. IF source or destination is cluster, the other should be a local file path. If both destinations are remote, they must be nodes for the same cluster and not clusters themselves. For example: avalanche node scp /tmp/file.txt [cluster1|NodeID-XXXX]:/tmp/file.txt $ avalanche node scp node1:/tmp/file.txt NodeID-XXXX:/tmp/file.txt
Usage:
Flags:
ssh
(ALPHA Warning) This command is currently in experimental mode.
The node ssh command execute a given command [cmd] using ssh on all nodes in the cluster if ClusterName is given. If no command is given, just prints the ssh command to be used to connect to each node in the cluster. For provided NodeID or InstanceID or IP, the command [cmd] will be executed on that node. If no [cmd] is provided for the node, it will open ssh shell there.
Usage:
Flags:
status
(ALPHA Warning) This command is currently in experimental mode.
The node status command gets the bootstrap status of all nodes in a cluster with the Primary Network. If no cluster is given, defaults to node list behaviour.
To get the bootstrap status of a node with a Blockchain, use --blockchain flag
Usage:
Flags:
sync
(ALPHA Warning) This command is currently in experimental mode.
The node sync command enables all nodes in a cluster to be bootstrapped to a Blockchain.
You can check the blockchain bootstrap status by calling avalanche node status clusterName
--blockchain blockchainName
Usage:
Flags:
update
(ALPHA Warning) This command is currently in experimental mode.
The node update command suite provides a collection of commands for nodes to update their avalanchego or VM config.
You can check the status after update by calling avalanche node status
Usage:
Subcommands:
subnet
: (ALPHA Warning) This command is currently in experimental mode.
The node update subnet command updates all nodes in a cluster with latest Subnet configuration and VM for custom VM.
You can check the updated subnet bootstrap status by calling avalanche node status clusterName
--subnet subnetName
Flags:
update subnet
(ALPHA Warning) This command is currently in experimental mode.
The node update subnet command updates all nodes in a cluster with latest Subnet configuration and VM for custom VM.
You can check the updated subnet bootstrap status by calling avalanche node status clusterName
--subnet subnetName
Usage:
Flags:
upgrade
(ALPHA Warning) This command is currently in experimental mode.
The node update command suite provides a collection of commands for nodes to update their avalanchego or VM version.
You can check the status after upgrade by calling avalanche node status
Usage:
Flags:
validate
(ALPHA Warning) This command is currently in experimental mode.
The node validate command suite provides a collection of commands for nodes to join
the Primary Network and Subnets as validators.
If any of the commands is run before the nodes are bootstrapped on the Primary Network, the command
will fail. You can check the bootstrap status by calling avalanche node status clusterName
Usage:
Subcommands:
primary
: (ALPHA Warning) This command is currently in experimental mode.
The node validate primary command enables all nodes in a cluster to be validators of Primary Network.
subnet
: (ALPHA Warning) This command is currently in experimental mode.
The node validate subnet command enables all nodes in a cluster to be validators of a Subnet.
If the command is run before the nodes are Primary Network validators, the command will first
make the nodes Primary Network validators before making them Subnet validators.
If The command is run before the nodes are bootstrapped on the Primary Network, the command will fail.
You can check the bootstrap status by calling avalanche node status clusterName
If The command is run before the nodes are synced to the subnet, the command will fail.
You can check the subnet sync status by calling avalanche node status clusterName
--subnet subnetName
Flags:
validate primary
(ALPHA Warning) This command is currently in experimental mode.
The node validate primary command enables all nodes in a cluster to be validators of Primary Network.
Usage:
Flags:
validate subnet
(ALPHA Warning) This command is currently in experimental mode.
The node validate subnet command enables all nodes in a cluster to be validators of a Subnet.
If the command is run before the nodes are Primary Network validators, the command will first
make the nodes Primary Network validators before making them Subnet validators.
If The command is run before the nodes are bootstrapped on the Primary Network, the command will fail.
You can check the bootstrap status by calling avalanche node status clusterName
If The command is run before the nodes are synced to the subnet, the command will fail.
You can check the subnet sync status by calling avalanche node status clusterName
--subnet subnetName
Usage:
Flags:
whitelist
(ALPHA Warning) The whitelist command suite provides a collection of tools for granting access to the cluster.
Command adds IP if --ip params provided to cloud security access rules allowing it to access all nodes in the cluster via ssh or http. It also command adds SSH public key to all nodes in the cluster if --ssh params is there. If no params provided it detects current user IP automaticaly and whitelists it
Usage:
Flags:
avalanche primary
The primary command suite provides a collection of tools for interacting with the Primary Network
Usage:
Subcommands:
addValidator
: The primary addValidator command adds a node as a validator in the Primary Networkdescribe
: The subnet describe command prints details of the primary network configuration to the console.
Flags:
addValidator
The primary addValidator command adds a node as a validator in the Primary Network
Usage:
Flags:
describe
The subnet describe command prints details of the primary network configuration to the console.
Usage:
Flags:
avalanche teleporter
The messenger command suite provides a collection of tools for interacting with ICM messenger contracts.
Usage:
Subcommands:
deploy
: Deploys ICM Messenger and Registry into a given L1.sendMsg
: Sends and wait reception for a ICM msg between two blockchains.
Flags:
deploy
Deploys ICM Messenger and Registry into a given L1.
Usage:
Flags:
sendMsg
Sends and wait reception for a ICM msg between two blockchains.
Usage:
Flags:
avalanche transaction
The transaction command suite provides all of the utilities required to sign multisig transactions.
Usage:
Subcommands:
commit
: The transaction commit command commits a transaction by submitting it to the P-Chain.sign
: The transaction sign command signs a multisig transaction.
Flags:
commit
The transaction commit command commits a transaction by submitting it to the P-Chain.
Usage:
Flags:
sign
The transaction sign command signs a multisig transaction.
Usage:
Flags:
avalanche update
Check if an update is available, and prompt the user to install it
Usage:
Flags:
avalanche validator
The validator command suite provides a collection of tools for managing validator balance on P-Chain.
Validator's balance is used to pay for continuous fee to the P-Chain. When this Balance reaches 0, the validator will be considered inactive and will no longer participate in validating the L1
Usage:
Subcommands:
getBalance
: This command gets the remaining validator P-Chain balance that is available to pay P-Chain continuous feeincreaseBalance
: This command increases the validator P-Chain balancelist
: This command gets a list of the validators of the L1
Flags:
getBalance
This command gets the remaining validator P-Chain balance that is available to pay P-Chain continuous fee
Usage:
Flags:
increaseBalance
This command increases the validator P-Chain balance
Usage:
Flags:
list
This command gets a list of the validators of the L1
Usage:
Flags: