heidr
v0.0.7
Published
EVM blockchain CLI tool
Maintainers
Readme
heiðr
EVM blockchain CLI tool
heidr is a command-line interface for inspecting and interacting with EVM blockchains.
Nought was there but byte and hex,
ne'er a prompt nor token gleamed,
till heidr's runes were cast by hand.
Nine commands I saw, and nine the worlds,
each chain a branch on the cosmic tree,
and each flag a beacon to realms unseen.
Installation
Via Homebrew (macOS/Linux)
brew tap pxlvre/heidr
brew install heidrVia package manager (Linux)
Debian/Ubuntu (APT Repository):
curl -s https://pxlvre.github.io/heidr/apt/pubkey.gpg | sudo apt-key add -
echo "deb [arch=amd64] https://pxlvre.github.io/heidr/apt stable main" | sudo tee /etc/apt/sources.list.d/heidr.list
sudo apt update
sudo apt install heidrOr download the .deb package directly:
wget https://github.com/pxlvre/heidr/releases/latest/download/heidr_0.0.7_amd64.deb
sudo dpkg -i heidr_0.0.7_amd64.debFedora/RHEL/CentOS (.rpm):
# Download from releases
wget https://github.com/pxlvre/heidr/releases/latest/download/heidr-0.0.7.x86_64.rpm
sudo rpm -i heidr-0.0.7.x86_64.rpmArch Linux (AUR):
# Using yay or your preferred AUR helper
yay -S heidr
# Or manually
git clone https://aur.archlinux.org/heidr.git
cd heidr
makepkg -siVia Bun
bun install -g heidrVia npm
npm install -g heidrVia install script
curl -fsSL https://raw.githubusercontent.com/pxlvre/heidr/main/install.sh | bashFrom source
git clone https://github.com/pxlvre/heidr.git
cd heidr
bun install
bun linkUsage
Chains
# List all supported chains
heidr chains --list
# Get chain info
heidr chains --info mainnet
# Get chain info as JSON
heidr chains --info arbitrum --jsonBlocks
# Get latest block from Ethereum mainnet
heidr block latest
# Get latest block from Arbitrum
heidr block latest --chain arbitrum
# Get specific block from Polygon
heidr block 70000000 --chain polygonTransactions
# Get transaction from Ethereum mainnet
heidr tx 0x086164dca926230a5b67e572888a26dee10708a328477b49fdb94ac7bc446260
# Get transaction from Arbitrum
heidr tx 0x4fedc9635b64f4d3012345da58e71fc366c789045a9046e9836f81a0eafac198 --chain arbitrum
# Get transaction as JSON
heidr tx 0x123... --jsonBalances
# Get balance of an address
heidr balance 0x4838b106fce9647bdf1e7877bf73ce8b0bad5f97
# Get balance on Arbitrum
heidr balance 0x123... --chain arbitrum
# Get balance as JSON
heidr balance 0x123... --jsonGas Prices
# Get current gas price on Ethereum mainnet
heidr gas
# Get gas price on a different chain
heidr gas --chain arbitrum
# Get gas price as JSON
heidr gas --jsonContainer Usage
Build and run heidr using Podman (or Docker):
# From GitHub Container Registry
podman pull ghcr.io/pxlvre/heidr:latest
podman run --rm ghcr.io/pxlvre/heidr chains --list
# From Docker Hub
docker pull pxlvre/heidr:latest
docker run --rm pxlvre/heidr chains --list
# Get help
podman run --rm ghcr.io/pxlvre/heidr --helpDevelopment
# Run CLI in development
bun run dev chains --list
# Format code
bun run format
# Lint code
bun run lintRoadmap
See ROADMAP.md for planned features including JSON-RPC methods, Etherscan integration, Tenderly, Dune Analytics, and Gelato support.
Current Version: v0.0.7
Tech Stack
- Bun - JavaScript runtime
- Viem - Ethereum library
- Commander.js - CLI framework
- Chalk - Terminal styling
- CLI-Table3 - ASCII tables
License
AGPL-3.0-or-later - see LICENSE.md
