# commands

This document provides instructions on the CLI command which can be used in the FirmaChain daemon.

{% hint style="info" %}
commands was written based on FirmaChain v0.3.5-patch.
{% endhint %}

## add-genesis-account

Add genesis account information to the genesis.json file. In order to run the command, you need the wallet address and amount.

**Usage**

```bash
firmachaind add-genesis-account <wallet-address> <amount>ufct
```

**Example**

```bash
firmachaind add-genesis-account firma1v..p4p599d 20000000ufct
```

## collect-gentxs

Registers the information on "gentx-.json" file to the genesis.json file. "gentx-.json" files can only be registered if they are in the ".firmachain/config/gentx/" path.

**Usage**

```bash
firmachaind collect-gentxs
```

## export

{% hint style="info" %}
Must run the command after halting the chain.
{% endhint %}

Exports the state to JSON.&#x20;

**Usage**

```bash
firmachaind export
```

**Usage (Save to file)**

```
firmachaind export > export.json
```

## gentx

This is a command to create a self delegating Validator and must be signed with a private key in the key ring. Once this command is successfully executed, a json file containing the Validator information will be created in the gentx folder.

**Usage**

```
firmachaind gentx <keyname> <amount>ufct --chain-id <chain-id>
```

**Example**

```bash
firmachaind gentx firmaKey 10000000ufct --chain-id colosseum-1 \
--commission-rate 0.05 \
--commission-max-rate 1.0 \
--commission-max-change-rate 0.07 \
--moniker "myValidator" \
--website "..." \
--details "..." \
--security-contact "..." \
--identity "A7BJEE.."
```

## help

You can check the list of available commands.

**Usage**

```bash
firmachaind --help or -h
```

## init

This command is used for initialization which is required for node formation.

**Usage**

```bash
firmachaind init <moniker-name> --chain-id <chain-id>
```

**Example**

```
firmachaind init myValidator --chain-id colosseum-1
```

## keys

Keyring management commands. These keys may be in any format supported by the Tendermint crypto library and can be used by light-clients, full nodes, or any other application that needs to sign with a private key. For the sub commands of the keys command, please refer to [this list](https://docs.firmachain.org/master/developer/firmachaind/sub-commands/keys).

## migrate

Migrate the source genesis into the target version and print to STDOUT.

**Usage**

```bash
firmachaind migrate <target-version> <genesis-file>
```

**Example**

```
firmachaind migrate v0.3.5 ./genesis.json
```

## query (q)

Using the query command, you can search the data registered on the chain. For the sub commands of the query command, please refer to [this](https://docs.firmachain.org/master/developer/firmachaind/sub-commands/query-q) list.

## rosetta

spin up a rosetta server

```bash
# usage
firmachaind rosetta
```

## start

Run the full node application with Tendermint in or out of process. By default, the application will run with Tendermint in process.

**Usage**

```bash
firmachaind start
```

## status

This feature shows the information(status) of the nodes currently in operation.

**Usage**

```bash
firmachaind status
```

## tendermint

Manages the Tendermint protocol.

## tx

This command allows you to register and sign on the chain. For the sub command of the tx command, please refer to [this](https://docs.firmachain.org/master/developer/firmachaind/sub-commands/transaction-tx) list.
