Skip to main content

Most Used Commands

Create a batch, queue two token creates, then execute
hcli batch create --name my-batch --key alice

hcli token create-ft \
  --token-name "Token A" --symbol "TA" \
  --treasury alice --decimals 8 \
  --initial-supply 1000 --supply-type FINITE --max-supply 10000 \
  --admin-key alice --supply-key alice --name token-a \
  --batch my-batch

hcli token create-ft \
  --token-name "Token B" --symbol "TB" \
  --treasury alice --decimals 8 \
  --initial-supply 500 --supply-type INFINITE \
  --admin-key alice --supply-key alice --name token-b \
  --batch my-batch

hcli batch execute --name my-batch
List batches
hcli batch list
Remove one queued transaction or drop the whole batch
hcli batch delete --name my-batch --order 2
hcli batch delete --name my-batch

Full Command Reference

Create a named batch and choose which key will sign the batch transaction when you run batch execute.
-n, --name
string
required
Name or alias for the batch.
-k, --key
string
Key used to sign batched transactions. Defaults to the operator when omitted. Accepts {accountId}:{privateKey}, {ed25519|ecdsa}:private:{private-key}, key reference, or account alias.
-m, --key-manager
string(local|local_encrypted)
Key manager to use: local or local_encrypted (defaults to config setting).
Example
hcli batch create --name my-batch --key alice
Sign and submit all transactions in the batch as one atomic batch transaction. The batch must already exist and contain at least one queued transaction. After a successful run, related plugins update local state (for example token or account hooks registered on this command).
-n, --name
string
required
Name of the batch to execute.
Example
hcli batch execute --name my-batch
List all batches stored in CLI state (name, size, execution status).Example
hcli batch list
Delete an entire batch, or remove a single queued transaction by its order index.
-n, --name
string
required
Name of the batch.
-o, --order
int
1-based order of the transaction to remove. If omitted, the whole batch is deleted.
Examples
hcli batch delete --name my-batch --order 3
hcli batch delete --name my-batch

Adding transactions to a batch (-B / --batch)

The Batch plugin registers hooks that other commands use. When a command supports batching and you pass -B <name> or --batch <name> (same option), the CLI does not submit that transaction immediately. It serializes the signed inner transaction and appends it to the batch named <name>. Run hcli <plugin> <subcommand> --help on the command you care about. If batching is wired for that command, the help text includes -B / --batch. As of the current Hiero CLI manifests, batch hooks are registered on:
  • Account: create, update, delete
  • HBAR: transfer
  • Topic: create, submit-message, update, delete
  • Token: many HTS transaction subcommands under token (see src/plugins/token/manifest.ts for the full list). Examples include create-ft, create-ft-from-file, create-nft, create-nft-from-file, associate, transfer-ft, transfer-nft, and other operations that declare batchify-set-batch-key / batchify-add-transaction.
Rules and limits
  • Create the batch with batch create before adding transactions.
  • A batch can hold at most 50 inner transactions (enforced in the batch hook implementation). Limits and atomic batch semantics on the network come from HIP-551: Batch transactions in the Hiero Improvement Proposals repository.
  • batch execute refuses to run if that batch name was already executed on the current network. Use batch list to inspect status and batch delete to remove a batch you no longer need (including freeing a name for reuse).

Operator key on batch create:

The --key / -k flag on batch create is optional in the CLI manifest. If you omit it, signing falls back to the operator key. Some older README text may say the key is required. Trust hcli batch create --help and this page.
For Hedera scheduled transactions (--scheduled / -X) instead of queued batch execution, see the Schedule plugin.