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

bfun-agent-dev

v0.2.2

Published

CLI, OpenClaw plugin, and agent skill for creating and trading B.fun meme tokens on BSC

Downloads

282

Readme

bfun-agent-dev

bfun-agent-dev is the testnet dev package for B.fun automation, with three layers:

  • bfun CLI for direct terminal use
  • OpenClaw plugin for installing the bundled skill
  • skills/bfun-integration for agent-guided create, quote, and trade workflows

The CLI delegates to the existing Commander program in src/index.js and always loads .env from the current working directory before execution.

Install

CLI only

npm install -g bfun-agent-dev

After install:

bfun --help

OpenClaw plugin + skill

openclaw plugins install bfun-agent-dev

This exposes the bfun-ai skill from skills/bfun-integration.

Configuration

Create a .env file in the directory where you run bfun:

BSC_RPC_URL=https://bsc-testnet-rpc.publicnode.com
# PRIVATE_KEY=0x...

Notes:

  • Default chain is BSC testnet (chainId 97).
  • PRIVATE_KEY is only required for write operations such as buy, sell, send, and create.
  • The CLI entry reads .env from process.cwd(), not from the package directory.

For OpenClaw, configure skill env under ~/.openclaw/openclaw.json:

{
  "skills": {
    "entries": {
      "bfun-ai": {
        "enabled": true,
        "env": {
          "PRIVATE_KEY": "0x...",
          "BSC_RPC_URL": "https://bsc-testnet-rpc.publicnode.com"
        }
      }
    }
  }
}

After modifying openclaw.json, restart OpenClaw for the changes to take effect.

Quick Start

Read-only commands

bfun config
bfun verify
bfun token-list --limit 5
bfun rankings now_trending --limit 10
bfun token-info 0xTokenAddress
bfun token-get 0xTokenAddress
bfun quote-buy 0xTokenAddress 0.01
bfun quote-sell 0xTokenAddress 1000
bfun tax-info 0xTokenAddress

Write commands

bfun buy 0xTokenAddress 0.01 --slippage 500
bfun sell 0xTokenAddress 1000 --slippage 500
bfun send 0xRecipient 0.01
bfun send 0xRecipient 100 --token 0xTokenAddress

Create a token

bfun create \
  --name "My Token" \
  --symbol "MTK" \
  --image ./logo.png \
  --description "Example token" \
  --pair ETH

The create command also supports advanced vesting, tax, vault, collateral-pair, and optional first-buy parameters. See skills/bfun-integration/references/create-flow.md for the full parameter model.

Agent Usage

When installed as an OpenClaw plugin, the bundled skill guides the agent to:

  1. Inspect market state with token-list, rankings, token-info, and token-get
  2. Quote trades before execution with quote-buy or quote-sell
  3. Confirm risk acceptance before any write operation
  4. Execute buy, sell, send, or create only through the CLI

Primary skill file:

Reference material:

Command Summary

Read-only:

  • bfun config
  • bfun verify
  • bfun token-info <tokenAddress>
  • bfun token-get <tokenAddress>
  • bfun token-list [--sort <value>] [--kw <keyword>] [--offset <n>] [--limit <n>]
  • bfun rankings <orderBy> [--limit <n>]
  • bfun quote-buy <tokenAddress> <bnbAmount> [--slippage <bps>]
  • bfun quote-sell <tokenAddress> <tokenAmount> [--slippage <bps>]
  • bfun tax-info <tokenAddress> [--user <address>]
  • bfun events [fromBlock] [--toBlock <block>] [--chunk <n>]

Write:

  • bfun buy <tokenAddress> <bnbAmount> [--slippage <bps>]
  • bfun sell <tokenAddress> <tokenAmount> [--slippage <bps>]
  • bfun send <toAddress> <amount> [--token <tokenAddress>]
  • bfun create ...

All commands return JSON for agent-friendly parsing. Success responses use { "success": true, "data": ... }. Failures return { "success": false, "error": ... } or, for create validation failures, { "success": false, "errors": [...] }.