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

@aeon-ai-pay/agent-pay

v0.8.8

Published

Agent skill & CLI for AI image generation, paid via x402 protocol with USDT on BSC

Readme

agent-pay

An Agent skill & CLI for AI image generation, paid per-request via the x402 protocol with USDT on BSC.

The user supplies a prompt; the CLI handles wallet setup, x402 payment, and returns the generated image.

Install Skill

# Install to all detected agents (Claude Code, Cursor, Codex, OpenClaw, Gemini CLI, etc.)
npx skills add AEON-Project/agent-pay -g -y

# Install to specific agents
npx skills add AEON-Project/agent-pay -a claude-code -a cursor -a codex -g -y

Supported agents: Claude Code, Cursor, Codex, OpenClaw, Gemini CLI, GitHub Copilot, Windsurf, Roo Code, and 39+ more.

CLI Usage

# First run: auto-create local wallet (private key generated locally, never uploaded)
npx @aeon-ai-pay/agent-pay setup --check

# Generate an image (auto-funds via WalletConnect when balance is insufficient)
# On success, every image in the response is downloaded to ~/agent-pay-images/
npx @aeon-ai-pay/agent-pay generate --prompt "a cyberpunk fox under neon rain"

# Choose aspect ratio / output format / model (defaults shown)
npx @aeon-ai-pay/agent-pay generate \
  --prompt "An orange tabby cat playing in the snow, cinematic lighting" \
  --aspect-ratio 16:9 \
  --output-format png \
  --model replicate/black-forest-labs/flux-schnell

# Save downloads to a custom directory
npx @aeon-ai-pay/agent-pay generate --prompt "..." --output ./out

# Check wallet balance (BNB + USDT)
npx @aeon-ai-pay/agent-pay wallet

# Manually top up USDT to local wallet
npx @aeon-ai-pay/agent-pay topup --amount 1

# Top up BNB gas for local wallet
npx @aeon-ai-pay/agent-pay gas --amount 0.001

# Withdraw remaining funds (USDT + BNB) back to main wallet
npx @aeon-ai-pay/agent-pay withdraw

# Show current configuration
npx @aeon-ai-pay/agent-pay setup --show

# Uninstall skill and clear cache
npx @aeon-ai-pay/agent-pay clean

Prerequisites

  • Node.js >= 18
  • A mobile wallet app with WalletConnect support (MetaMask, OKX Wallet, Trust Wallet, etc.)
  • USDT (BEP-20) on BSC for image-generation payments
  • A small amount of BNB for approve gas (~$0.002/tx, only needed on first authorization)

How It Works

1. CLI auto-generates a session key (disposable wallet) locally
2. On generate, if balance is insufficient, auto-funds via WalletConnect QR scan (USDT + BNB gas)
   - Top-up amount = exactly the shortfall (requiredUsdt - currentBalance)
3. First use requires a one-time approve authorization (unlimited allowance, no repeat needed)
4. Session key auto-signs the x402 payment — no manual confirmation required
5. Server returns the generated image (URLs); CLI downloads each, reads dimensions/size

Agent flow:
  User prompt -> Agent activates skill -> x402 two-phase protocol:
    1. GET /open/ai/x402/skillBoss/create?body=<urlencoded JSON>
       (decoded: { model, inputs: { prompt, aspect_ratio, output_format } })
                                              -> HTTP 402 + payment requirements
    2. Session key EIP-712 signature, retry same URL with PAYMENT-SIGNATURE header
                                              -> HTTP 200, { transaction, data: { images } }
    3. CLI downloads each images[].url to ~/agent-pay-images/, parses
       PNG/JPEG/WebP headers for width × height, fs.stat for size

Pricing

  • Per-call USDT amount is decided by the server in the 402 response — not hardcoded client-side.
  • The wallet is charged exactly that amount. Top-up covers exactly the shortfall (requiredUsdt - currentBalance).

Configuration

Config is stored in ~/.agent-pay/config.json (file permissions 600).

Run setup --check to auto-generate a local wallet. The main wallet private key is never stored locally — only the session key (a locally generated disposable wallet) is saved. Funding is done via WalletConnect QR scan.

Override the default service URL (optional):

npx @aeon-ai-pay/agent-pay setup --service-url https://custom-api.example.com

License

MIT