# Commands This section describes the commands available from `terrad`, the command line interface that connects a running `terrad` process. ## `add-genesis-account` Adds a genesis account to `genesis.json`. **Syntax** ```bash terrad add-genesis-account ',' ``` **Example** ```bash terrad add-genesis-account acc1 '200000000uluna,550000ukrw' ``` ## `collect-gentxs` Collects genesis transactions and outputs them to `genesis.json`. **Syntax** ```bash terrad collect-gentxs ``` ## `debug` Helps debug the application. For a list of syntax and subcommands, see the [debug subcommands](subcommands.md#debug-addr). ## `export` Exports the state to JSON. **Syntax** ```bash terrad export ``` ## `gentx` Adds a genesis transaction to `genesis.json`. **Syntax** ```bash terrad gentx ``` **Example** ```bash terrad gentx myKey 1000000uluna --home=/path/to/home/dir --keyring-backend=os --chain-id=test-chain-1 \ --moniker="myValidator" \ --commission-max-change-rate=0.01 \ --commission-max-rate=1.0 \ --commission-rate=0.07 \ --details="..." \ --security-contact="..." \ --website="..." ``` ## `help` Shows help information. **Syntax** ```bash terrad help ``` ## `init` Initializes the configuration files for a validator and a node. **Syntax** ```bash terrad init ``` **Example** ```bash terrad init myNode ``` ## `keys` Manages Keyring commands. For a list of syntax and subcommands, see the [keys subcommands](subcommands.md#keys-add). ## `migrate` Migrates the source genesis into the target version and prints to STDOUT. **Syntax** ```bash terrad migrate ``` **Example** ```bash terrad migrate /genesis.json --chain-id=testnet --genesis-time=2020-04-19T17:00:00Z --initial-height=4000 ``` ## `query` Manages queries. For a list of syntax and subcommands, see the [query subcommands](subcommands.md#query-authz-grants). ## `rosetta` Creates a Rosetta server. **Syntax** ```bash terrad rosetta ``` ## `start` Runs the full node application with Tendermint in or out of process. By default, the application runs with Tendermint in process. **Syntax** ```bash terrad start ``` ## `status` Displays the status of a remote node. **Syntax** ```bash terrad status ``` ## `tendermint` Manages the Tendermint protocol. ## `testnet` Creates a testnet with the specified number of directories and populates each directory with the necessary files. **Syntax** ```bash terrad testnet ``` **Example** ```bash terrad testnet --v 6 --output-dir ./output --starting-ip-address 192.168.10.2 ``` ## `tx` Retrieves a transaction by its hash, account sequence, or signature. For a list of full syntax and subcommands, see the [tx subcommands](subcommands.md#tx-authz-exec). **Syntax to query by hash** ```bash terrad query tx ``` **Syntax to query by account sequence** ```bash terrad query tx --type=acc_seq
: ``` **Syntax to query by signature** ```bash terrad query tx --type=signature ``` ## `txs` Retrieves transactions that match the specified events where results are paginated. **Syntax** ```bash terrad query txs --events '' --page --limit ``` **Example** ```bash terrad query txs --events 'message.sender=cosmos1...&message.action=withdraw_delegator_reward' --page 1 --limit 30 ``` ## `unsafe-reset-all` Resets the blockchain database, removes address book files, and resets `data/priv_validator_state.json` to the genesis state. **Syntax** ```bash terrad unsafe-reset-all ``` ## `validate-genesis` Validates the genesis file at the default location or at the location specified. **Syntax** ```bash terrad validate-genesis ``` **Example** ```bash terrad validate-genesis ``` ## `version` Returns the version of Terra you're running. **Syntax** ```bash terrad version ```