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 🙏

© 2025 – Pkg Stats / Ryan Hefner

memeputer-cli

v1.0.0

Published

CLI tool for interacting with Memeputer AI agents via x402 payments

Downloads

135

Readme

Memeputer CLI 🤖

Pay and interact with AI agents from your terminal using x402 micropayments.

✨ Pay $0 in gas fees - All transactions use PayAI Facilitator!

Installation

npm install -g memeputer-cli

Quick Start

# List available agents
memeputer agents

# Ask an agent (auto-pays via x402)
memeputer ask memeputer "What can you do?"

# Generate a PFP image
memeputer pfp "cyberpunk samurai with neon katana" --wallet ~/.config/solana/id.json -o ./pfp.png

# Check your wallet balance
memeputer balance --wallet ~/.config/solana/id.json

Commands

memeputer agents

List all available agents with pricing and categories.

Example:

memeputer agents
# Shows table of agents with prices

memeputer agents --json
# Output in JSON format for scripting

memeputer ask <agent> <message>

Interact with any agent. Payment happens automatically via x402 protocol.

Examples:

# Chat with memeputer
memeputer ask memeputer "Tell me a joke" -w ~/.config/solana/id.json

# Get trading analysis
memeputer ask tradeputer "What's the sentiment on SOL?"

# Voice generation
memeputer ask veoputer "Create an upbeat podcast intro"

Options:

  • -w, --wallet <path> - Path to Solana wallet keypair file
  • --json - Output in JSON format
  • -q, --quiet - Suppress progress output

memeputer pfp <prompt>

Generate a profile picture using PFPputer.

Examples:

# Generate and view URL
memeputer pfp "pixel art wizard" -w ./my-wallet.json

# Generate and save locally
memeputer pfp "anime character with blue hair" -w ./wallet.json -o ./avatar.png

Options:

  • -w, --wallet <path> - Path to Solana wallet keypair file
  • -o, --output <path> - Save image to file path
  • --json - Output in JSON format
  • -q, --quiet - Suppress progress output

memeputer balance

Check your wallet's USDC balance.

Example:

memeputer balance -w ~/.config/solana/id.json

# Output:
# 💰 Wallet Balance
#   Address: 7zH2...pump
#   Balance: 10.50 USDC

Configuration

Create ~/.memeputerrc for default settings:

{
  "wallet": "/path/to/wallet.json",
  "network": "mainnet-beta",
  "apiUrl": "https://agents.api.memeputer.com"
}

Environment Variables

  • MEMEPUTER_WALLET - Default wallet path
  • MEMEPUTER_API_URL - API endpoint (default: https://agents.api.memeputer.com)
  • SOLANA_RPC_URL - Custom Solana RPC endpoint (default: Helius)

How It Works

The CLI uses the x402 micropayment protocol:

  1. 🔐 Loads your Solana wallet from file
  2. 📡 Calls agent API (first call returns 402 Payment Required)
  3. 💸 Creates USDC payment transaction automatically
  4. ✅ Signs transaction with your wallet
  5. 📤 Sends payment via PayAI Facilitator (you pay $0 gas!)
  6. 🤖 Returns AI-generated result

All payments are instant and on-chain. No accounts, no subscriptions.

Requirements

  • Node.js 18+
  • Solana wallet with USDC
    • Get a wallet at https://phantom.app
    • Export keypair to JSON file
    • Add USDC to your wallet

Getting a Wallet

Option 1: Phantom Wallet (Browser)

  1. Install Phantom browser extension
  2. Create wallet
  3. Go to Settings → Export Private Key
  4. Save as JSON file

Option 2: Solana CLI

# Install Solana CLI
sh -c "$(curl -sSfL https://release.solana.com/stable/install)"

# Generate new wallet
solana-keygen new --outfile ~/.config/solana/id.json

# Check address
solana address

# Add USDC to this address

Example Workflows

Generate PFP and save locally

memeputer pfp "pixel art wizard casting spell" \
  -w ~/.config/solana/id.json \
  -o ~/Desktop/wizard.png

# Output includes:
# - AI response
# - Image URL
# - Transaction signature
# - Local file path

Get trading analysis

memeputer ask tradeputer "analyze BTC/USD" -w ./wallet.json

# Agent responds with:
# - Market analysis
# - Price predictions
# - Trading signals

Check balance before paying

memeputer balance -w ~/.config/solana/id.json
# Balance: 10.50 USDC ✅ (enough for ~100 interactions)

memeputer ask memeputer "What's the weather?" -w ~/.config/solana/id.json
# Payment auto-sent, response received!

JSON output for scripting

# Get response as JSON
result=$(memeputer pfp "anime character" -w ./wallet.json --json)

# Extract media URL
echo $result | jq -r '.mediaUrl'

# Download image
curl $(echo $result | jq -r '.mediaUrl') -o image.png

Pricing

Agent prices are set by their creators. Typical prices:

  • General chat: $0.01-$0.05 per message
  • Image generation: $0.05-$0.15 per image
  • Voice/audio: $0.05-$0.10 per generation
  • Trading signals: $0.10-$0.50 per analysis

You pay exactly the agent price + $0.00 gas fees! (PayAI covers gas)

Troubleshooting

"Insufficient USDC balance"

Your wallet needs USDC (not SOL) to pay agents.

  1. Get USDC on an exchange (Coinbase, Binance)
  2. Withdraw to your Solana wallet address
  3. Run memeputer balance to verify

"Wallet file not found"

Provide full path to your wallet JSON file:

memeputer ask memeputer "hi" --wallet /full/path/to/wallet.json

"Network timeout"

Solana RPC can be slow. Try again or set custom RPC:

export SOLANA_RPC_URL="https://api.mainnet-beta.solana.com"

"Agent not found"

Check available agents:

memeputer agents
# Lists all marketplace-enabled agents

Development

# Clone repo
git clone https://github.com/memeputer/memeputer

# Install dependencies
cd apps/cli
npm install

# Run in dev mode
npm run dev

# Build
npm run build

# Test locally
npm link
memeputer agents

Publishing

# Build for production
npm run build

# Publish to npm
npm publish

# Users can then install:
npm install -g memeputer-cli

Support

  • Website: https://memeputer.com
  • Marketplace: https://agents.memeputer.com
  • API Docs: https://agents.memeputer.com/docs
  • Discord: https://discord.gg/memeputer
  • Twitter: @MemeputerAI

License

MIT


Made with 💜 by the Memeputer team