//
Interacting with SEKAI modules CLI
Search
Duplicate
Try Notion
Interacting with SEKAI modules CLI
SEKAI provides a command-line interface (CLI) that enables users to interact with its modules. Using the CLI, users can create, sign, and submit Msg transactions, as well as query the blockchain's state and node information. Each module has its own set of CLI commands, which can be accessed through the main CLI entrypoint sekaid. These commands fall into two categories: transactions tx, which require signing, and queries query, which do not. To create a transaction using the CLI, users need to specify the transaction command, as well as any required arguments and flags. For more information on the available commands for a specific module, users can refer to the module's documentation or use the --help flag. For example, to see all available CLI commands for 🚧Transfers & balances (Bank module), users can run sekaid tx bank --help for transactions or sekaid query bank --help for queries.
For example, to send tokens from one account to another, users can run the following command:
Bash
Copy
sekaid tx bank send $from_key_or_address $to_address $amount --chain-id=$NETWORK_NAME --home=$SEKAID_HOME --fees=100ukex --keyring-backend=test --yes --broadcast-mode=block --log_format=json --output=json.
​
To query the blockchain state or node information, users can use the query command followed by the relevant subcommand and arguments. For example, to query the balance of an account, users can run the following command:
Bash
Copy
sekaid query bank balance $address --home=$SEKAID_HOME --chain-id=$NETWORK_NAME --output=json
​
📌
$NETWORK_NAME and $SEKAID_HOME env variables should have been set up during SEKAI installation process and all other flags can be set as env variable. More on this in the CLI flags configuration section.