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/cliZero third-party runtime dependencies. Built on
@bolthub/agent(itself zero-dep). Optional@getalby/sdkpeer dependency only if you use NWC wallets.
Or use with npx:
npx @bolthub/cli search weatherCommands
search
Search the marketplace for APIs by keyword or tag.
bolthub search weather
bolthub search --tag finance
bolthub search # list all APIsinfo
Get full details for a specific API: endpoints, pricing, and examples.
bolthub info bitcoin-datacall
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:
| Flag | Description |
|---|---|
--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:
| Variables | Wallet |
|---|---|
LND_REST_HOST + LND_MACAROON | LND (recommended: Node Launcher or self-hosted) |
LNBITS_URL + LNBITS_ADMIN_KEY | LNbits |
NWC_URI | Any NWC wallet (easiest) |
PHOENIXD_URL + PHOENIXD_PASSWORD | Phoenixd (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 500vs MCP Registry
The CLI and MCP Registry serve different use cases:
| CLI | MCP Registry | |
|---|---|---|
| Interface | Terminal / scripts | AI agent (Cursor, Claude) |
| Auth | Wallet env vars | Wallet env vars in MCP config |
| Discovery | search + info | search_apis + get_api_details |
| Best for | Manual testing, scripts, CI/CD | AI agent workflows |
Both use the same marketplace and the same wallet adapters under the hood.