How to interact with THORCli

Get Started (MacOS/Linux)


  1. 1.
    xcode-select xcode-select --install
  2. 2.
    Homebrew https://brew.sh


export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export GOBIN=$GOPATH/bin

THORChain Dependencies

go install google.golang.org/protobuf/cmd/[email protected]


git clone https://gitlab.com/thorchain/thornode
make install


This will produce a thornode executable named appropriately for the network type.

For Testnet

cd cmd/thornode
go build -tags testnet
cp thornode thornode-testnet && rm thornode

For Mainnet

cd cmd/thornode
go build -tags mainnet
cp thornode thornode-mainnet && rm thornode


Get started by requesting the help file, then drill down the menus.
./thornode-mainnet --help
THORChain Network
THORChain [command]
Available Commands:
add-genesis-account Add a genesis account to genesis.json
collect-gentxs Collect genesis txs and output a genesis.json file
debug Tool for helping with debugging your application
ed25519 Generate an ed25519 keys
export Export state to JSON
gentx Generate a genesis tx carrying a self delegation
help Help about any command
init Initialize private validator, p2p, genesis, and application configuration files
keys Manage your application's keys
migrate Migrate genesis to a specified target version
pubkey Convert Proto3 JSON encoded pubkey to bech32 format
query Querying subcommands
start Run the full node
status Query remote node for status
tendermint Tendermint subcommands
tx Transactions subcommands
unsafe-reset-all Resets the blockchain database, removes address book files, and resets data/priv_validator_state.json to the genesis state
validate-genesis validates the genesis file at the default location or at the location passed as an arg
version Print the application binary version information
-h, --help help for THORChain
--home string directory for config and data (default "/Users/dev/.thornode")
--log_format string The logging format (json|plain) (default "plain")
--log_level string The logging level (trace|debug|info|warn|error|fatal|panic) (default "info")
--trace print out full stack trace on errors

Add a new account

./thornode-mainnet keys add newAccount

Add an existing account (via mnemonic)

./thornode-mainnet keys add existingAccount --recover

List all the accounts

./thornode-mainnet keys list

Send a transaction

./thornode-mainnet tx bank send thor1505gp5h48zd24uexrfgka70fg8ccedafsnj0e3 thor1gutjhrw4xlu3n3p3k3r0vexl2xknq3nv8ux9fy 11000rune --gas 3000000 --chain-id thorchain-mainnet-v1 --node https://rpc.ninerealms.com:443
Copy link
Get Started (MacOS/Linux)
Popular Commands