Operate Iroha 3 via CLI
The iroha binary is the shared CLI for the current Iroha 2 and Iroha 3 codebase. The same source tree also exposes iroha2 and iroha3 aliases for track-specific scripting, while iroha remains the stable command used in these examples.
1. Prerequisites
Start a local network first:
The examples below assume the generated client configuration from the localnet created in Launch Iroha 3:
./localnet/client.toml2. Basic CLI Setup
Show the top-level help:
cargo run --bin iroha -- --config ./localnet/client.toml --helpThe CLI is organized into these top-level command groups:
accountfor account-oriented shortcutstxfor transaction-level helpersledgerfor on-ledger reads and writesopsfor operator diagnosticsappfor app API helperscontractfor contract deployment and callstoolsfor diagnostics and developer utilitiestairafor Taira and Nexus-oriented workflows
The ledger group also contains domain-specific transaction helpers such as ledger transaction.
Use --output-format text for human-readable operator output and --machine for strict automation mode.
3. Basic Ledger Commands
List all domains:
cargo run --bin iroha -- --config ./localnet/client.toml ledger domain list allRegister a domain. Current Iroha IDs are dataspace-qualified, so use a domain such as docs.universal rather than a bare docs literal:
cargo run --bin iroha -- --config ./localnet/client.toml ledger domain register --id docs.universalSend a simple ping transaction:
cargo run --bin iroha -- --config ./localnet/client.toml ledger transaction ping --msg "hello from iroha"Read a recent block or subscribe to block events:
cargo run --bin iroha -- --config ./localnet/client.toml ledger blocks 1 --timeout 30s
cargo run --bin iroha -- --config ./localnet/client.toml ledger events block4. Operator Commands
Consensus status:
cargo run --bin iroha -- --config ./localnet/client.toml --output-format text ops sumeragi statusPer-phase latency snapshot:
cargo run --bin iroha -- --config ./localnet/client.toml --output-format text ops sumeragi phasesRBC throughput and active sessions:
cargo run --bin iroha -- --config ./localnet/client.toml --output-format text ops sumeragi rbc status
cargo run --bin iroha -- --config ./localnet/client.toml --output-format text ops sumeragi rbc sessionsCollector plan and on-chain consensus parameters:
cargo run --bin iroha -- --config ./localnet/client.toml ops sumeragi collectors
cargo run --bin iroha -- --config ./localnet/client.toml ops sumeragi params5. Where to Go Next
To regenerate a full Markdown help snapshot from the source checkout, run:
cargo run -p iroha_cli --bin iroha -- tools markdown-help > crates/iroha_cli/CommandLineHelp.md