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

@cyberdrk/onchain

v0.4.3

Published

CLI tool for crypto portfolio tracking, market data, and CEX history

Readme

@cyberdrk/onchain

CLI for crypto portfolio tracking, market data, and CEX history. Designed for both human use and AI agent integration.

Installation

npm install -g @cyberdrk/onchain

Or run directly with npx:

npx @cyberdrk/onchain price btc

Quick Start

# Check token prices
onchain price btc
onchain price eth sol matic

# View wallet balances (auto-detects EVM/Solana)
onchain balance 0x1234...5678

# CEX balances
onchain coinbase balance
onchain binance balance

# Market overview
onchain markets

# Prediction markets
onchain polymarket trending

Commands

Market Data

onchain price <token>           # Token price with 24h change
onchain markets                 # Market overview with trending coins

Wallet Data

onchain balance <address>       # Token balances (EVM or Solana)
onchain history <address>       # Transaction history
onchain portfolio <address>     # Full portfolio with DeFi positions

CEX Data

onchain coinbase balance        # Coinbase account balances
onchain coinbase history        # Trade history
onchain binance balance         # Binance account balances
onchain binance history         # Trade history

Prediction Markets

onchain polymarket trending     # Trending markets
onchain polymarket search <q>   # Search markets
onchain polymarket view <slug>  # Market details

Configuration

onchain setup                   # Interactive API key setup
onchain config                  # View current configuration
onchain test                    # Test all configured providers

Configuration

Run onchain setup for interactive configuration, or set environment variables:

| Feature | Environment Variable | Provider | |---------|---------------------|----------| | EVM wallets | DEBANK_API_KEY | DeBank Cloud | | Solana wallets | HELIUS_API_KEY | Helius | | Coinbase | COINBASE_API_KEY_ID + COINBASE_API_KEY_SECRET | Coinbase CDP | | Binance | BINANCE_API_KEY + BINANCE_API_SECRET | Binance | | Market data | COINGECKO_API_KEY | CoinGecko (optional) | | Market fallback | COINMARKETCAP_API_KEY | CoinMarketCap (optional) |

Config file locations:

  • Global: ~/.config/onchain/config.json5
  • Local: ./.onchainrc.json5

Global Options

--json              # Output as JSON (for scripting/agents)
--plain             # Disable colors and emoji
--no-color          # Disable colors only
--timeout <ms>      # Request timeout in milliseconds

Agent Integration

This CLI is designed for AI agent use with --json output:

# Get portfolio value
onchain --json portfolio 0x123... | jq '.totalValueUsd'

# Check if market is up
onchain --json markets | jq '.marketCapChange24h > 0'

# Get specific token price
onchain --json price eth | jq '{price: .priceUsd, change: .priceChange24h}'

Exit codes: 0 for success, 1 for errors.

Supported Chains

EVM (via DeBank): Ethereum, BNB Chain, Polygon, Arbitrum, Optimism, Avalanche, Base, zkSync Era, Linea, Scroll, Blast, Mantle, and 60+ more.

Solana (via Helius): Full mainnet support including SPL tokens and NFTs.

Development

pnpm install
pnpm run dev price btc    # Run without building
pnpm run build            # Build TypeScript
pnpm run test             # Run tests
pnpm run lint             # Lint code

License

MIT