npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@peakd/hive-tx-cli

v2026.2.2

Published

A CLI wrapper for the Hive blockchain API using hive-tx

Readme

Hive CLI

A command-line interface wrapper for the Hive blockchain API using hive-tx v6.

Features

  • Query Operations: Get account info, blocks, posts, and make raw API calls
  • Broadcast Operations: Vote, comment, transfer, and broadcast custom JSON
  • Image Uploads: Upload images to Hive ImageHoster
  • Secure Configuration: Store account credentials safely in ~/.hive-tx-cli/config.json (permissions 600)
  • Interactive Setup: Easy configuration with prompts
  • Node.js 22: Built for modern Node.js with TypeScript

Installation


pnpm install -g @peakd/hive-tx-cli

yarn global add @peakd/hive-tx-cli

npm install -g @peakd/hive-tx-cli

Devlopment

# Clone or download the project
git clone <repository-url>
cd hive-tx-cli

# Install dependencies
pnpm install

# Build the project
pnpm build

# Link globally (optional)
pnpm link --global

Quick Start

  1. Configure your account:

    hive config
  2. Check configuration status:

    hive status
  3. Query an account:

    hive account peakd

Commands

Configuration

# Interactive configuration setup
hive config

# Show current configuration
hive config --show

# Set a specific value
hive config set account myaccount
hive config set postingKey <your-posting-key>

# Get a specific value
hive config get account

# Clear all configuration
hive config --clear

Query Commands

# Get account information
hive account <username>

# Get dynamic global properties
hive props

# Get block by number
hive block <number>

# Get content (post/comment)
hive content <author> <permlink>

# Make a raw API call
hive call database_api get_accounts '[["username"]]'

Broadcast Commands

# Vote on a post/comment
hive vote --author <author> --permlink <permlink> --weight 100

# Create a post
hive post --permlink my-post --title "My Post" --body "Content here" --tags "hive,blockchain"

# Create a post with custom metadata
hive post --permlink my-post --title "My Post" --body "Content here" --tags "hive,blockchain" --metadata '{"app":"hive-tx-cli/2026.1.1","format":"markdown"}'

# Create a comment
hive comment --permlink my-reply --body "Comment text" --parent-author <author> --parent-permlink <permlink>

# Transfer HIVE or HBD (requires active key)
hive transfer --to <recipient> --amount "1.000 HIVE" --memo "Thanks!"

# Broadcast custom JSON
hive custom-json --id <app-id> --json '{"key":"value"}'

# Broadcast raw operations
hive broadcast '["vote",{"voter":"me","author":"you","permlink":"post","weight":10000}]' --key-type posting

Image Upload

# Upload an image (requires posting key)
hive upload --file ./path/to/image.jpg

# Use a different ImageHoster
hive upload --file ./image.png --host https://images.ecency.com

# Specify account for this command
hive upload --file ./image.jpg --account myaccount

The command returns JSON with the uploaded image URL.

Global Options

# Specify a different Hive node
hive --node https://api.hive.blog account peakd

# Specify account for this command only
hive --account myaccount vote --author author --permlink permlink --weight 100

Configuration File

Configuration is stored in ~/.hive-tx-cli/config.json with 600 permissions (read/write only for owner):

{
  "account": "your-username",
  "postingKey": "your-posting-private-key",
  "activeKey": "your-active-private-key",
  "node": "https://api.hive.blog"
}

Security Note: Never commit your private keys to version control!

Environment Variables

You can provide credentials via environment variables instead of the config file. When set, these values take precedence over the file.

  • HIVE_ACCOUNT
  • HIVE_POSTING_KEY
  • HIVE_ACTIVE_KEY

Example:

export HIVE_ACCOUNT="your-username"
export HIVE_POSTING_KEY="your-posting-private-key"
export HIVE_ACTIVE_KEY="your-active-private-key"

hive vote --author author --permlink permlink --weight 100

Development

# Run in development mode
pnpm dev

# Build for production
pnpm build

# Run specific command in dev mode
pnpm dev -- account peakd

Dependencies

Requirements

  • Node.js >= 22.0.0
  • pnpm (package manager)

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Support

For issues and questions related to hive-tx, visit: https://github.com/mahdiyari/hive-tx