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

agstell-cli

v0.2.1

Published

CLI for AgentMarket — discover and call APIs with x402 micropayments on Stellar

Readme

AgentMarket CLI

Command-line interface for interacting with the AgentMarket API marketplace using x402 micropayments on Stellar.

Installation

npm install -g agentmarket-cli

Or use directly with npx:

npx agentmarket-cli

Quick Start

# Initialize with your Stellar wallet
agentmarket init

# Or generate a new testnet keypair
agentmarket init --generate

# Fund your testnet account
agentmarket fund

# Check your balance
agentmarket balance

# List available APIs
agentmarket list

# Call an API (auto-pays with USDC)
agentmarket call weather --city "San Francisco"

Commands

init

Initialize the CLI with your Stellar wallet.

# Interactive mode
agentmarket init

# With secret key
agentmarket init --key SXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

# Generate new keypair
agentmarket init --generate

# Use mainnet (default is testnet)
agentmarket init --network mainnet

fund

Fund your testnet account using Stellar Friendbot (testnet only).

agentmarket fund

balance

Check your wallet balance.

agentmarket balance
# or
agentmarket bal

Output:

Balance retrieved

  Network:     testnet
  Address:     GXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  XLM:         10000.0000000 XLM
  USDC:        100.0000000 USDC

list

List available APIs.

# List all APIs
agentmarket list

# Filter by category
agentmarket list --category Data
agentmarket list -c AI

Categories: Data, Finance, Geo, AI

call

Call an API with automatic x402 payment.

# Weather
agentmarket call weather --city "Tokyo"

# Air Quality
agentmarket call air-quality --city "Delhi"

# News
agentmarket call news --topic "cryptocurrency"

# Currency conversion
agentmarket call currency --from USD --to EUR --amount 100

# Geolocation
agentmarket call geolocation --ip "8.8.8.8"

# AI inference
agentmarket call ai --prompt "Explain blockchain in simple terms"

# Custom params (JSON)
agentmarket call weather -p '{"city": "London", "units": "metric"}'

# Dry run (no payment)
agentmarket call weather --city "Paris" --dry-run

info

Get detailed information about an API.

agentmarket info weather

history

View your call history.

# Last 20 calls
agentmarket history

# Last 50 calls
agentmarket history --limit 50

config

View or update configuration.

# Show config
agentmarket config --show

# Update settings
agentmarket config --network mainnet
agentmarket config --budget 50
agentmarket config --marketplace https://api.agentmarket.xyz

How It Works

  1. Request: When you call an API, the CLI first sends a request
  2. 402 Response: The server responds with HTTP 402 and payment details
  3. Payment: CLI automatically sends USDC via Stellar
  4. Data: CLI retries the request with payment proof and returns data

All of this happens automatically - you just make the call!

Configuration

Config is stored in ~/.agentmarket/config.json:

{
  "stellarNetwork": "testnet",
  "secretKey": "SXXXXX...",
  "publicKey": "GXXXXX...",
  "marketplaceUrl": "https://agentmarket.xyz",
  "budgetLimit": 10
}

Call history is stored in ~/.agentmarket/history.json.

Pricing

| API | Price per call | |-----|---------------| | Weather | $0.001 USDC | | Air Quality | $0.001 USDC | | News | $0.002 USDC | | Currency | $0.001 USDC | | Geolocation | $0.001 USDC | | AI Inference | $0.005 USDC |

Environment Variables

You can also configure via environment variables:

export AGENTMARKET_SECRET_KEY=SXXXXX...
export AGENTMARKET_NETWORK=testnet
export AGENTMARKET_URL=https://agentmarket.xyz

Development

# Clone
git clone https://github.com/agentmarket/cli.git
cd cli

# Install deps
npm install

# Build
npm run build

# Run locally
node dist/cli.js

# Development mode (watch)
npm run dev

License

MIT