Skip to main content

safrochaind CLI overview

safrochaind is the single binary that powers a Safrochain node and acts as its CLI client. It follows the standard Cosmos SDK 0.50 layout:

safrochaind <command> [flags]
status / version / config / init / start
keys <add|list|show|delete|export|import>
query <module> ... (read-only, no signing)
tx <module> ... (signs and broadcasts)
comet <show-node-id|show-validator|reset-state|...>
module <feepay|feeshare|drip|clock|cw-hooks|...> ...

Install

git clone https://github.com/Safrochain-Org/safrochain-node
cd safrochain-node
make install
safrochaind version

For an exhaustive build/run guide, see Run a Node → Install.

Configure once, save typing forever

safrochaind config writes a per-user config file under ~/.safrochain/config/client.toml:

safrochaind config chain-id safro-mainnet-1
safrochaind config node https://rpc.safrochain.network:443
safrochaind config keyring-backend file
safrochaind config broadcast-mode sync
safrochaind config output json

After this, you can drop --chain-id, --node, --keyring-backend, --broadcast-mode, and --output from every subsequent command.

Global flags worth knowing

FlagPurpose
--node URLRPC to use. Mainnet: https://rpc.safrochain.network:443. Testnet: https://rpc.testnet.safrochain.com:443.
--chain-id IDsafro-mainnet-1 or safro-testnet-1.
--keyring-backend KINDfile (recommended) / os / test (sandbox only).
--from KEYwhich signer key to use.
--gas auto --gas-adjustment 1.3safe default; override with a fixed number for known-cheap txs.
--fees 5000usafminimum acceptable fee at the foundation min_gas_prices = 0.025usaf.
--broadcast-mode syncwait for inclusion in mempool but not confirmation.
--output jsonparse with jq/yq.
--yes -yskip confirmation prompt.

Keyring backends

BackendStorageWhen to use
fileencrypted on disk (passphrase)default for production
osOS keychain (macOS Keychain, Linux secret-service)dev workstations
testplaintext in ~/.safrochainlocal sandbox only
passpass-based storeadvanced

Always pass --keyring-backend file (or set it via safrochaind config). The default is os, which can silently fall back to plaintext in some container images.

Smoke commands (every new operator runs these)

safrochaind status \
| jq '.sync_info | {latest_block_height, catching_up}'

safrochaind query bank total --denom usaf

safrochaind query staking validators --limit 100 \
| jq '.validators[] | {moniker:.description.moniker, tokens:.tokens, jailed:.jailed}'

safrochaind query distribution params

safrochaind query gov params

Where to go next

  • Keys: managing operator and consensus keys
  • Bank: sending and querying SAF
  • Staking: delegate, redelegate, unbond, validator ops
  • Governance: submit, vote, query proposals
  • Query: every read-only namespace
  • Tx: every signing namespace plus broadcast workflows