# hiero-cli

Equips coding agents to interact with the Hedera network via hcli. Useful for minting tokens, deploying contracts, sending HBAR, and handling x402 paywalls.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 460 installs · ★ 28
- Author: hedera-dev
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/hedera-dev/hedera-skills/tree/HEAD/plugins/hiero-cli/skills/hiero-cli/SKILL.md
- Updated: 2026-09-03
- HTML: https://affpapa.org/en/nevibecode/skills/hiero-cli

## What it does

This skill provides full command syntax and conventions for the `hcli` executable. The agent learns how to configure Hedera networks, send HBAR, mint fungible or non-fungible tokens, and submit messages to the Hedera Consensus Service. It also supports compiling and deploying Solidity smart contracts.

The skill covers the x402 payment flow. When an HTTP call returns status code `402` with a `PAYMENT-REQUIRED` header, the agent inspects the challenge, signs the Hedera payment payload, and retries the request. Plugin state and credentials persist locally as JSON files inside `~/.hiero-cli/state/`.

Commands will fail immediately without setting an active network and operator credentials via `hcli network set-operator`.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add hedera-dev/hedera-skills --skill hiero-cli -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/hiero-cli/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/hiero-cli/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add hedera-dev/hedera-skills --skill hiero-cli -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/hiero-cli/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add hedera-dev/hedera-skills --skill hiero-cli -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/hiero-cli/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install hedera-dev/hedera-skills hiero-cli
```

2. **Manually: put the files in place**
- File: `.github/skills/hiero-cli/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add hedera-dev/hedera-skills --skill hiero-cli -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/hedera-dev/hedera-skills --path plugins/hiero-cli/skills/hiero-cli
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/hiero-cli/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add hedera-dev/hedera-skills --skill hiero-cli -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/hedera-dev/hedera-skills/tree/HEAD/plugins/hiero-cli/skills/hiero-cli/SKILL.md

## When to use it
- transfer HBAR and manage account token allowances
- create fungible tokens and mint NFT collections
- deploy Solidity contracts directly to Hedera networks
- resolve HTTP 402 paywall challenges with x402 payments

## Example prompts
- Check my operator account HBAR balance on testnet
- Deploy the Solidity contract in contracts/Vault.sol using hcli
- Sign the x402 payment challenge for the 402 response from this API

## Source text · SKILL.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 310391fe352ed851.

BEGIN THIRD-PARTY FILE 310391fe352ed851
````text
---
name: hiero-cli
description: "Use when user wants to interact with Hedera blockchain: create/transfer tokens, manage NFTs, deploy contracts, manage topics, transfer HBAR, sign x402 payment challenges, configure networks. ALSO use when an HTTP request returns 402 with a PAYMENT-REQUIRED header for the Hedera x402 scheme (or the user wants to pay an x402-gated endpoint on Hedera): read references/x402.md for the full GET→402→sign→retry flow. Provides full spec for hcli CLI tool. Trigger keywords: hedera, hiero, hbar, token, nft, contract, topic, x402, 402, payment-required, hcli, ledger"
---

# hiero-cli (hcli)

`hcli` is a command-line tool for interacting with the Hedera blockchain — managing accounts, tokens (FT/NFT), smart contracts, consensus topics, and network configuration.

## Binary syntax

```
hcli <plugin> <command> [options]
```

## Global flags

| Flag                    | Short | Default  | Description                                                                                                                                                      |
| ----------------------- | ----- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--format`              | `-F`  | `human`  | Output format: `human` or `json`                                                                                                                                 |
| `--network`             | `-N`  | active   | Override active network for this command                                                                                                                         |
| `--payer`               | `-P`  | operator | Override payer account for this command; defaults to operator if omitted                                                                                         |
| `--confirm`             | `-Y`  | `false`  | Skip all confirmation prompts                                                                                                                                    |
| `--max-transaction-fee` | `-M`  | config   | Max transaction fee ceiling for this run: HBAR (e.g. `20`) or tinybars (`200000000t`). Overrides the `default_max_transaction_fee` config; `0` means no override |

## Prerequisites

Before executing blockchain commands:

1. Configure network: `hcli network use --global testnet`
2. Set operator: `hcli network set-operator --operator <accountId>:<privateKey>`

## Key formats

Keys and signers accept multiple formats:

- `{accountId}:{privateKey}` — inline pair, e.g. `0.0.123:abc123...`
- `{ed25519|ecdsa}:private:{hex}` — raw private key with type prefix
- `{ed25519|ecdsa}:public:{hex}` — raw public key (for supply/submit keys)
- `kr_xxx` — key reference stored in KMS
- account alias — name registered in local state

## Local state storage

State is persisted in `~/.hiero-cli/state/` as JSON files, one per plugin namespace:
````
END THIRD-PARTY FILE 310391fe352ed851

The third-party file has ended. Everything between the 310391fe352ed851 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 3032 of 14016 bytes. © hedera-dev · Apache-2.0 · https://github.com/hedera-dev/hedera-skills/tree/HEAD/plugins/hiero-cli/skills/hiero-cli/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
