Skip to main content

Documentation Index

Fetch the complete documentation index at: https://hedera-0c6e0218-514-egress-ports.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Most Used Commands

Create a new fungible token with treasury and admin key set to alias Alice
hcli token create-ft \
  --token-name "My Token" \
  --symbol "MTK" \
  --treasury alice \
  --decimals 2 \
  --initial-supply 1000 \
  --supply-type FINITE \
  --max-supply 10000 \
  --admin-key alice \
  --name mytoken-alias
Token associate
hcli token associate \
  --token mytoken-alias \
  --account bob
Transfer fungible tokens
hcli token transfer-ft \
  --token mytoken-alias \
  --to bob \
  --amount 10
Create an NFT collection, mint one serial, transfer it
hcli token create-nft \
  --token-name "My Collection" \
  --symbol "MCOL" \
  --treasury alice \
  --admin-key alice \
  --supply-key alice \
  --name my-nft-alias

hcli token mint-nft \
  --token my-nft-alias \
  --metadata "ipfs://bafyExample/metadata-1.json"

hcli token transfer-nft \
  --token my-nft-alias \
  --to bob \
  --serials 1

Full Command Reference

The token plugin includes many subcommands (NFTs, airdrops, mint, burn, freeze, and more). The sections below cover common FT and NFT flows. For the full command list and flags, run hcli token --help, then hcli token with your subcommand and --help. For repeatable creation from JSON, use token create-ft-from-file or token create-nft-from-file and the guide below.
Create a new fungible token with specified properties.
-T, --token-name
string
required
Fungible token name.
-Y, --symbol
string
required
Fungible token symbol.
-t, --treasury
string
Treasury account: {accountId}:{privateKey} pair, key reference, or account alias. Defaults to the operator.
-d, --decimals
int
default:"0"
Decimals for the fungible token. Default: 0.
-i, --initial-supply
string
Initial supply amount. Default: 1000000 in display units (with decimals applied). Append t for raw base units (e.g., 1000t).
-S, --supply-type
string
default:"INFINITE"
Supply type: INFINITE (default) or FINITE.
-m, --max-supply
string
Maximum supply at creation (display units, or append t for raw base units). Use with FINITE supply type.
-a, --admin-key
string (repeatable)
Optional admin key. Can be {accountId}:{privateKey} pair, private key in {ed25519|ecdsa}:private:{private-key} format, key reference, or account alias. Omit for a token without an admin key.
-A, --admin-key-threshold
int
M-of-N: number of admin keys required to sign (only when multiple --admin-key values are set).
-s, --supply-key
string (repeatable)
Supply key(s). Same key formats as other repeatable token keys.
-L, --supply-key-threshold
int
M-of-N for supply keys (only when multiple --supply-key values are set).
-f, --freeze-key
string (repeatable)
Optional freeze key(s).
-Z, --freeze-key-threshold
int
M-of-N for freeze keys (only when multiple --freeze-key values are set).
-F, --freeze-default
boolean
default:"false"
When true and a freeze key is set, new token associations are frozen by default. Ignored without a freeze key (a warning is logged).
-w, --wipe-key
string (repeatable)
Optional wipe key(s).
-W, --wipe-key-threshold
int
M-of-N for wipe keys (only when multiple --wipe-key values are set).
-y, --kyc-key
string (repeatable)
Optional KYC key(s).
-H, --kyc-key-threshold
int
M-of-N for KYC keys (only when multiple --kyc-key values are set).
-p, --pause-key
string (repeatable)
Optional pause key(s).
-U, --pause-key-threshold
int
M-of-N for pause keys (only when multiple --pause-key values are set).
-e, --fee-schedule-key
string (repeatable)
Optional fee schedule key(s).
-E, --fee-schedule-key-threshold
int
M-of-N for fee schedule keys (only when multiple --fee-schedule-key values are set).
-D, --metadata-key
string (repeatable)
Optional metadata key(s).
-O, --metadata-key-threshold
int
M-of-N for metadata keys (only when multiple --metadata-key values are set).
-n, --name
string
Optional name to register for the fungible token (local alias).
-k, --key-manager
string(local|local_encrypted)
Key manager to use: local or local_encrypted (defaults to config setting).
-M, --memo
string
Optional memo for the fungible token (max 100 characters).
-R, --auto-renew-period
string
Auto-renew period: seconds as integer, or with suffix s/m/h/d (e.g. 500, 500s, 50m, 2h, 1d). Requires --auto-renew-account.
-r, --auto-renew-account
string
Account that pays auto-renewal (account id, alias, or key reference). Required when --auto-renew-period is set.
-x, --expiration-time
string
Absolute token expiration as ISO 8601 datetime. Ignored when --auto-renew-period and --auto-renew-account are set.
Example
hcli token create-ft \
  --token-name "My Token" \
  --symbol "MTK" \
  --treasury alice \
  --decimals 2 \
  --initial-supply 1000 \
  --name my-ft-alias
Create a new non-fungible token (NFT collection). Use token mint-nft after creation to mint serials. See hcli token create-nft --help for all key types and thresholds.
-T, --token-name
string
required
Token name.
-Y, --symbol
string
required
Token symbol.
-t, --treasury
string
Treasury account. Defaults to the operator.
-S, --supply-type
string
default:"INFINITE"
INFINITE or FINITE. With FINITE, set --max-supply.
-m, --max-supply
string
Max supply (display units, or append t for base units). Required when supply type is FINITE.
-a, --admin-key
string (repeatable)
Admin key(s). Defaults to operator key when omitted (see CLI help).
-s, --supply-key
string (repeatable)
Supply key(s) for minting NFT serials.
-n, --name
string
Optional local alias for the token.
-k, --key-manager
string(local|local_encrypted)
Key manager to use: local or local_encrypted (defaults to config setting).
Example
hcli token create-nft \
  --token-name "Collectible" \
  --symbol "COLL" \
  --treasury alice \
  --admin-key alice \
  --supply-key alice \
  --name coll-alias
Create a new fungible token from a JSON file definition with advanced features. See the full guide below.
Example: hcli token create-ft-from-file --file ~/projects/token.json
-f, --file
string
required
Fungible token definition file path (absolute or relative) to a JSON file.
-k, --key-manager
string(local|local_encrypted)
Key manager to use: local or local_encrypted (defaults to config setting).
Example
hcli token create-ft-from-file --file ./token-ft.json
Create a new NFT collection from a JSON definition. Schema matches the NFT file format in the guide.
-f, --file
string
required
NFT token definition file path (absolute or relative) to a JSON file.
-k, --key-manager
string(local|local_encrypted)
Key manager to use: local or local_encrypted (defaults to config setting).
Example
hcli token create-nft-from-file --file ./token-nft.json
Associate a token with an account to enable transfers.
-T, --token
string
required
Token: either a token alias or token-id
-a, --account
string
required
Account to associate: {accountId}:{privateKey} pair, key reference, or account alias.
-k, --key-manager
string(local|local_encrypted)
Key manager to use: local or local_encrypted (defaults to config setting).
ExamplesFungible or NFT token alias:
hcli token associate --token my-ft-alias --account bob
hcli token associate --token coll-alias --account bob
Mint a new NFT serial on an existing collection. Metadata must be at most 100 bytes.
-T, --token
string
required
NFT token: alias or token ID.
-m, --metadata
string
required
NFT metadata string (max 100 bytes), often a URI or short label.
-s, --supply-key
string (repeatable)
Supply key credential(s). Omit when the CLI can resolve signing keys from the key manager.
-k, --key-manager
string(local|local_encrypted)
Key manager to use: local or local_encrypted (defaults to config setting).
Example
hcli token mint-nft \
  --token coll-alias \
  --metadata "ipfs://bafyExample/1.json"
Transfer a fungible token from one account to another.
-T, --token
string
required
Fungible token: either a token alias or token-id.
-t, --to
string
required
Destination account: account ID or alias.
-f, --from
string
Account to transfer from: {accountId}:{privateKey} pair, key reference, or account alias. Defaults to the operator.
-a, --amount
string
required
Amount to transfer. Default: display units (with decimals applied). Append t for raw base units (e.g., 100t).
-k, --key-manager
string(local|local_encrypted)
Key manager to use: local or local_encrypted (defaults to config setting).
Example
hcli token transfer-ft \
  --token my-ft-alias \
  --to bob \
  --amount 25
Transfer one or more NFT serials to another account.
-T, --token
string
required
NFT token: alias or token ID.
-t, --to
string
required
Destination account ID or alias.
-f, --from
string
Source account. Defaults to the operator.
-s, --serials
string
required
Comma-separated serial numbers (e.g. 1,2,3).
-k, --key-manager
string(local|local_encrypted)
Key manager to use: local or local_encrypted (defaults to config setting).
Example
hcli token transfer-nft \
  --token coll-alias \
  --to bob \
  --serials 1
List all tokens (FT and NFT) stored in state for all networks.
-k, --keys
boolean
Show token key information (admin, supply, wipe, etc.).
Example
hcli token list --keys

Guide: Token Create From File (Specification)

Create a token by defining its configuration in a JSON file. This is the recommended approach for repeatable token creation (scripts, CI, team handoffs), and it supports aliases for token keys so you don’t have to hardcode account keys everywhere.

What it does

  • token create-ft-from-file reads a JSON file that matches the fungible schema and creates an FT on the selected network.
  • token create-nft-from-file reads a JSON file that matches the NFT schema and creates an NFT collection on the selected network.

Fungible token (FT) file

You can define:
  • token metadata (name, symbol, decimals, memo)
  • supply model (finite/infinite, initial/max supply)
  • token keys (admin, supply, wipe, kyc, freeze, pause, feeSchedule)
  • optional token associations
  • optional custom fees

Quickstart (FT)

Create a token.json file and add a JSON specification. Here’s a basic example that both uses the full key format for the treasuryKey and the alias format for the adminKey.
{
  "name": "token-keys-example",
  "symbol": "TRK",
  "decimals": 10,
  "supplyType": "infinite",
  "initialSupply": 1000,
  "treasuryKey": "<0.0.1002:3030020100300706052b8104000a042204207f109a9e3b0d8ecfba9cc23a3614433ce0fa7ddcc80f2a8f10b222179a5a80d6>",
  "adminKey": "alice-account"
}
You can create a token from this specification by running the following command: hcli token create-ft-from-file --file ./token.json

Full breakdown (FT)

Here’s a full breakdown of all the options you can use:
{
  "name": "token-full-example",
  "symbol": "TFE",
  "decimals": 8,
  "supplyType": "finite",
  "initialSupply": 1000000,
  "maxSupply": 10000000,
  "treasuryKey": "<alias or accountId:privateKey>",
  "adminKey": "<alias or accountId:privateKey>",
  "supplyKey": "<alias or accountId:privateKey>",
  "wipeKey": "<alias or accountId:privateKey>",
  "kycKey": "<alias or accountId:privateKey>",
  "freezeKey": "<alias or accountId:privateKey>",
  "pauseKey": "<alias or accountId:privateKey>",
  "feeScheduleKey": "<alias or accountId:privateKey>",
  "memo": "Full example token with all fields",
  "associations": ["<alias or accountId:privateKey>"],
  "customFees": [
    {
      "type": "fixed",
      "amount": 100,
      "unitType": "HBAR",
      "collectorId": "0.0.1234",
      "exempt": false
    }
  ]
}

NFT definition file quickstart

NFT JSON files use a different schema than FT files. There is no decimals or initialSupply. You must provide at least one adminKey and one supplyKey (each can be a single string or an array of key strings). For supplyType finite, set maxSupply. For infinite, do not include maxSupply. Example token-nft.json:
{
  "name": "nft-keys-example",
  "symbol": "NKE",
  "supplyType": "infinite",
  "treasuryKey": "alice-account",
  "adminKey": "alice-account",
  "supplyKey": "alice-account",
  "memo": "Example NFT collection from file"
}
Create the collection on the selected network:
hcli token create-nft-from-file --file ./token-nft.json
Optional fields include the same families of keys and thresholds as in code (wipeKey, freezeKey, pauseKey, feeScheduleKey, associations, and their threshold fields). For exact validation rules, rely on the CLI error output or the schema in the Hiero CLI repository (NonFungibleTokenFileSchema).