BoltHub logoBoltHub
SDKs & Tools

CLI

@bolthub/cli: search, explore, and call APIs from the terminal.

Overview

The bolthub CLI lets you search the marketplace, inspect API details, and make paid API calls directly from the terminal. It's the command-line equivalent of the MCP Registry: same marketplace, same wallet support, designed for scripts and terminal workflows.

Install

npm install -g @bolthub/cli

Zero third-party runtime dependencies. Built on @bolthub/agent (itself zero-dep). Optional @getalby/sdk peer dependency only if you use NWC wallets.

Or use with npx:

npx @bolthub/cli search weather

Commands

Search the marketplace for APIs by keyword or tag.

bolthub search weather
bolthub search --tag finance
bolthub search              # list all APIs

info

Get full details for a specific API: endpoints, pricing, and examples.

bolthub info bitcoin-data

call

Call an API endpoint. Lightning payments are handled automatically.

bolthub call bitcoin-data /v1/prices
bolthub call bitcoin-data /v1/prices --max-cost 10
bolthub call ai-text /v1/summarize --method POST --body '{"text":"hello"}'

Options

Options for the call command:

FlagDescription
--method <METHOD>HTTP method (default: GET)
--max-cost <sats>Refuse invoices above this amount
--budget <sats>Total session spending limit
--body <json>JSON request body (for POST/PUT/PATCH)

Wallet configuration

The CLI uses the same wallet environment variables as the MCP tools. Set one of:

VariablesWallet
LND_REST_HOST + LND_MACAROONLND (recommended: Node Launcher or self-hosted)
LNBITS_URL + LNBITS_ADMIN_KEYLNbits
NWC_URIAny NWC wallet (easiest)
PHOENIXD_URL + PHOENIXD_PASSWORDPhoenixd (agent-side paying if you already run it)

Only one wallet type is needed. search and info commands don't require a wallet; only call does.

Examples

# Find weather APIs
bolthub search weather

# Check pricing before paying
bolthub info acme-weather

# Make a paid API call with cost protection
export LND_REST_HOST="https://your-lnd-node:8080"
export LND_MACAROON="0201036c6e..."
bolthub call acme-weather /v1/forecast --max-cost 20

# POST with a JSON body
bolthub call ai-text /v1/analyze --method POST \
  --body '{"text": "Summarize this article"}' \
  --budget 500

vs MCP Registry

The CLI and MCP Registry serve different use cases:

CLIMCP Registry
InterfaceTerminal / scriptsAI agent (Cursor, Claude)
AuthWallet env varsWallet env vars in MCP config
Discoverysearch + infosearch_apis + get_api_details
Best forManual testing, scripts, CI/CDAI agent workflows

Both use the same marketplace and the same wallet adapters under the hood.