hive
1
总安装量
1
周安装量
#44710
全站排名
安装命令
npx skills add https://github.com/asgarth/skills --skill hive
Agent 安装分布
opencode
1
Skill 文档
Hive CLI ð
Use the hive CLI (hive-tx-cli) to query the Hive blockchain and broadcast transactions with the correct key type.
Install
# npm/pnpm/bun
npm install -g @peakd/hive-tx-cli
# One-shot (no install)
bunx @peakd/hive-tx-cli account peakd
Quick Start
hive config # Interactive configuration
hive status # Check configuration status
hive account peakd # Query an account
Authentication & Keys
- Posting key: Required for voting, commenting, posting
- Active key: Required for transfers and high-privilege operations
- Keys stored in
~/.hive-cli/config.jsonwith 600 permissions
hive config # Interactive setup
hive config set account <name>
hive config set postingKey <private-key>
hive config set activeKey <private-key>
hive config set node <url>
Query Commands
hive account <username> # Account information
hive props # Dynamic global properties
hive block <number> # Block by number
hive content <author> <permlink> # Post/comment content
hive call database_api get_accounts '[["username"]]' # Raw API call
Broadcast Commands
Voting
hive vote --author <author> --permlink <permlink> --weight 100
Posts & Comments
# Create a post
hive comment --permlink my-post --title "My Post" --body "Content" --tags "hive,blockchain"
# Create a reply
hive comment --permlink my-reply --body "Comment" --parent-author <author> --parent-permlink <permlink>
Transfers
hive transfer --to <recipient> --amount "1.000 HIVE" --memo "Thanks!"
hive transfer --to <recipient> --amount "1.000 HBD" --memo "Payment" --token HBD
Custom JSON & Raw Operations
hive custom-json --id <app-id> --json '{"key":"value"}'
hive broadcast '["vote",{"voter":"me","author":"you","permlink":"post","weight":10000}]' --key-type posting
Global Options
--node <url> # Override Hive node
hive --node https://api.hive.blog account peakd
--account <name> # Override account for this command
hive --account myaccount vote --author author --permlink permlink --weight 100
Configuration File
~/.hive-cli/config.json (permissions 600):
{
"account": "your-username",
"postingKey": "your-posting-private-key",
"activeKey": "your-active-private-key",
"node": "https://api.hive.blog"
}
Troubleshooting
Authentication errors
- Verify keys are private keys (not public keys)
- Check account name matches exactly
- Ensure config file permissions:
chmod 600 ~/.hive-cli/config.json
Node connection issues
- Try different node:
hive config set node https://api.hiveworks.com - Check network connectivity
Transaction failures
- Ensure sufficient Resource Credits (stake HIVE for RC)
- Use correct key type (posting vs active) for the operation
- Start with
hive statusto diagnose
References
- Hive docs: https://developers.hive.io/
- hive-tx-cli: https://github.com/asgarth/hive-tx-cli
TL;DR: Query with hive account/block/content. Broadcast with hive vote/comment/transfer. Configure keys via hive config. ð