# Useful commands

```bash
# Set Vars
MONIKER=<YOUR_MONIKER_NAME_GOES_HERE>
echo "export MONIKER=$MONIKER" >> $HOME/.bash_profile
echo "export INITIA_CHAIN_ID="initiation-1"" >> $HOME/.bash_profile
source $HOME/.bash_profile
```

### WALLET MANAGEMENT

{% hint style="info" %}
*Add Wallet Specify the value \<wallet> with your own wallet name*
{% endhint %}

```bash
#Create Wallet
initiad keys add wallet

#Recover Wallet
initiad keys add wallet --recover

#List Wallet
initiad keys list

#Delete Wallet
initiad keys delete wallet

#Check Wallet Balance
initiad q bank balances $(initiad keys show wallet -a)
```

### VALIDATOR MANAGEMENT

{% hint style="info" %}
*Please adjust , MONIKER , YOUR\_KEYBASE\_ID , YOUR\_DETAILS , YOUR\_WEBSITE\_URL*
{% endhint %}

```bash
#Create Validator
initiad tx mstaking create-validator \
--amount=100000000000uinit \
--pubkey=$(initiad tendermint show-validator) \
--moniker=$MONIKER \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id=$INITIA_CHAIN_ID \
--commission-rate=0.10 \
--commission-max-rate=0.20 \
--commission-max-change-rate=0.01 \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=1uinit \
-y

#Edit Validator
initiad tx mstaking edit-validator \
--new-moniker="YOUR MONIKER" \
--identity="IDENTITY KEYBASE" \
--details="DETAILS VALIDATOR" \
--website="LINK WEBSITE" \
--chain-id=$INITIA_CHAIN_ID \
--from=wallet \
--gas-adjustment=1.5 \
--gas="auto" \
--gas-prices=1uinit \
-y

#Unjail Validator
initiad tx slashing unjail --from wallet --chain-id $INITIA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uinit -y

#Check Jailed Reason
initiad query slashing signing-info $(initiad tendermint show-validator)
```

### TOKEN MANAGEMENT

```bash
#Withdraw Rewards
initiad tx distribution withdraw-all-rewards --from wallet --chain-id $INITIA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uinit -y

#Withdraw Rewards with Comission
initiad tx distribution withdraw-rewards $(initiad keys show wallet --bech val -a) --commission --from wallet --chain-id $INITIA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uinit -y

#Delegate Token to your own validator
initiad tx staking delegate $(initiad keys show wallet --bech val -a) 100000000uinit --from wallet --chain-id $INITIA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uinit -y

#Delegate Token to other validator
initiad tx staking redelegate $(initiad keys show wallet --bech val -a) <TO_VALOPER_ADDRESS> 1000000uaum --from wallet --chain-id $INITIA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uinit -y

#Unbond Token from your validator
initiad tx staking unbond $(initiad keys show wallet --bech val -a) 1000000000uinit --from wallet --chain-id $INITIA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uinit -y

#Send Token to another wallet
initiad tx bank send wallet <TO_WALLET_ADDRESS> 100000000uinit --from wallet --chain-id $INITIA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uinit -y
```

### GOVERNANCE

```bash
#Vote, You can change the value of yes to no,abstain,nowithveto
initiad tx gov vote 1 yes --from wallet --chain-id $INITIA_CHAIN_ID --gas-adjustment 1.5 --gas auto --gas-prices 1uinit -y

#List all proposals
initiad query gov proposals

#Create new text proposal
initiad tx gov submit-proposal \
--title="Title" \
--description="Description" \
--deposit=1000000000uinit \
--type="Text" \
--from=wallet \
--gas-prices=1uinit\ 
--gas-adjustment=1.5 \
--gas="auto" \
-y 
```

### SERVICES MANAGEMENT

```bash
# Reload Service
sudo systemctl daemon-reload

# Enable Service
sudo systemctl enable initiad

# Disable Service
sudo systemctl disable initiad

# Start Service
sudo systemctl start initiad

# Stop Service
sudo systemctl stop initiad

# Restart Service
sudo systemctl restart initiad

# Check Service Status
sudo systemctl status initiad

# Check Service Logs
sudo journalctl -u initiad -f --no-hostname -o cat
```

### UTILITY

```bash
#Set Indexer NULL / KV
sed -i 's|^indexer *=.*|indexer = "null"|' $HOME/.initia/config/config.toml

#Get Validator info
initiad status 2>&1 | jq .ValidatorInfo

#Get denom info
initiad q bank denom-metadata -oj | jq

#Get sync status
initiad status 2>&1 | jq .sync_info.catching_up

#Get latest height
initiad status 2>&1 | jq .sync_info.latest_block_height

#Reset Node
initiad tendermint unsafe-reset-all --home $HOME/.initia --keep-addr-book
```

### DELETE NODE

{% hint style="warning" %} <mark style="color:red;">**WARNING! Use this command wisely Backup your key first it will remove node from your system**</mark>
{% endhint %}

```bash
sudo systemctl stop initiad && sudo systemctl disable initiad && sudo rm /etc/systemd/system/initiad.service && sudo systemctl daemon-reload && sudo rm -rf $(which initiad) && rm -rf $HOME/.initia && rm -rf $HOME/initia
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.syanodes.my.id/initia/useful-commands.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
