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

@rail402.dev/cli

v0.1.2

Published

rail402 — a command-line x402 wallet and agent tool for Stellar: fund a testnet account, discover paid APIs in the Bazaar, pay them under a spend cap, and look up settlements on the explorer.

Readme

@rail402.dev/cli (rail402)

A command-line x402 wallet and agent tool for Stellar. Fund a testnet account, discover paid APIs in the Bazaar, pay them under a spend cap, and look up the settlement on the explorer, from your terminal or from inside an AI agent.

It is the Stellar-native counterpart to the EVM and Solana x402 CLIs (there wasn't one before). Under the hood it wraps @rail402.dev/agent-helpers (x402 v2, spend-cap enforced) and the Rail402 explorer read API.

npm install -g @rail402.dev/cli     # or run ad-hoc with: npx @rail402.dev/cli <command>

60-second tour (testnet, free)

rail402 fund --usdc                            # generate + fund a testnet account, USDC included
export RAIL402_SECRET=S...                      # the secret it printed
rail402 search "summarize a web page"          # find paid APIs in the Bazaar
rail402 buy "summarize a web page" --max 0.10   # discover the cheapest match AND pay it
rail402 tx <hash>                               # look the settlement up on the explorer

Amounts are decimals in the asset's units (--max 0.10 = 0.10 USDC). Every payment requires an explicit --max cap, so the CLI never spends an unbounded amount.

Commands

| Command | What it does | |---|---| | rail402 fund [--usdc] | Friendbot-fund a testnet account (generates one if you have no --secret); --usdc also adds the USDC trustline and drips starter USDC from the playground dispenser | | rail402 trust [CODE:ISSUER] | Add a trustline (defaults to the playground's testnet USDC) | | rail402 whoami | Show your address and balances | | rail402 search "<query>" | Search the Bazaar (--max, --type http\|mcp, --limit) | | rail402 buy "<query>" --max <amt> | Discover the cheapest match and pay it | | rail402 pay <url> --max <amt> | Pay a known resource URL (--query k=v, --method) | | rail402 tx <hash> | Look up a settlement on the explorer | | rail402 feed | Recent x402 payments (--limit, --seller, --scheme) | | rail402 supported | What the facilitator advertises | | rail402 config [show\|set\|path] | Show or change saved config | | rail402 help / version | |

For AI agents

Pass --json to any command for structured output, and store the key in an env var (agents can't type an interactive password):

export RAIL402_SECRET=S...
rail402 buy "convert usdc to stroops" --max 0.10 --json
# { "ok": true, "data": { "paid": { "amount": "500000", "transaction": "6c6b..." }, ... } }

Every failure is a machine-readable code with a non-null reason and a retryable flag, for example { "ok": false, "error": { "code": "mcp_budget_exceeded", "reason": "...", "retryable": false } }, so an agent reasons about the failure instead of parsing prose. A Claude skill that teaches an agent to drive this CLI ships in skill/.

Configuration

Every endpoint defaults to Rail402's hosted testnet infrastructure and every one is overridable, so the same binary drives your own self-hosted facilitator or explorer. Precedence: flag, then env, then ~/.rail402/config.json, then the default.

| Setting | Flag | Env | Default | |---|---|---|---| | Facilitator | --facilitator | RAIL402_FACILITATOR_URL | https://facilitator.rail402.dev | | Explorer API | --explorer | RAIL402_EXPLORER_URL | https://explorer-api.rail402.dev | | Explorer web (tx links) | --explorer-web | RAIL402_EXPLORER_WEB_URL | https://explorer.rail402.dev | | Network | --network | RAIL402_NETWORK | stellar:testnet | | Secret | --secret | RAIL402_SECRET | (none) |

# Point at your own deployment:
rail402 supported --facilitator https://my-facilitator.example
rail402 config set explorerUrl https://my-explorer.example    # persists to ~/.rail402/config.json

Testnet only. rail402 fund --usdc covers the whole bootstrap (XLM via friendbot, the USDC trustline, and a starter USDC drip from the playground dispenser). Larger USDC amounts come from the Circle faucet.

Part of Rail402. Apache-2.0.