Skip to main content

Most Used Commands

Create a new topic with admin and submit key set
hcli topic create \
  --name marketing-updates \
  --memo "Weekly digest" \
  --admin-key alice \
  --submit-key bob
Submit a message
hcli topic submit-message \
  --topic 0.0.7473019 \
  --message '{"event":"mint","amount":10}'
Find messages between a range of 1 and 3
hcli topic find-message \
  --topic marketing-updates \
  --sequence-gt 1 \
  --sequence-lt 3

Full Command Reference

Create a new Hedera Consensus Service topic with optional memo and keys.
-n, --name
string
required
Define the name for this topic.
-m, --memo
string
The memo for a topic.
-a, --admin-key
string
Pass an admin key as name or private key for the topic. Private key can be optionally prefixed with key type
(e.g., “ed25519:…” or “ecdsa:…”). Defaults to ecdsa if no prefix.
-s, --submit-key
string
Submit key as account name or {accountId}:{private_key} format.
-k, --key-manager
string(local|local_encrypted)
Key manager to use: local or local_encrypted (defaults to config setting)
List all topics stored in the state.
-n, --network
string
Filter topics by network.
Submit a message to a Hedera Consensus Service topic
-t, --topic
string
required
The topic ID or topic name.
-m, --message
string
required
Submit a message to the topic.
-s, --signer
string
Account to use for signing the message. Can be an alias or {accountId}:{private_key}.
Required for public topics (without submit keys). For topics with submit keys, must be one of the authorized signers.
-k, --key-manager
string(local|local_encrypted)
Key manager to use: local or local_encrypted (defaults to config setting)
Find messages in a topic by sequence number or filters
-t, --topic
string
required
The topic ID or topic name to filter for.
-g, --sequence-gt
int
Filter by sequence number greater than.
-G, --sequence-gte
int
Filter by sequence number greater than or equal to.
-l, --sequence-lt
int
Filter by sequence number less than.
-L, --sequence-lte
int
Filter by sequence number less than or equal to.
-e, --sequence-eq
int
Filter by sequence number equal to.