Skip to content
ln.bot

CLI Reference

Complete reference for the lnbot command-line tool — wallet management, payments, invoices, addresses, webhooks, keys, MCP, and installation.

Updated View as Markdown

The lnbot command-line tool. Install with curl -fsSL https://ln.bot/install.sh | bash.

All commands support --wallet <name>, --json, and --yes flags. Run lnbot <command> --help for full details.

Wallet

lnbot init

Create a local config file and get started.

bash
$ lnbot init
✓ Config created at ~/.config/lnbot/config.json

  Next: lnbot wallet create --name <name>

lnbot wallet create [--name <name>]

Create a new wallet (name is auto-generated if omitted).

bash
$ lnbot wallet create --name agent01
✓ Wallet created
  id:       wal_7x9kQ2mR
  name:     agent01
  address:  x8km2n@ln.bot
  api_key:  key_...m2p4

⚠ Recovery passphrase (save this — shown only once):
  basket drum forest ocean pixel storm figure lamp narrow quest river wheat

lnbot wallet list

List all wallets in local config.

lnbot wallet use <name|id>

Switch the active wallet by name or wallet ID.

lnbot wallet rename <new-name>

Rename the active wallet (updates server and local config).

lnbot wallet delete [name]

Remove a wallet from local config (defaults to active wallet).

lnbot balance

Show balance, available, and on-hold amounts.

bash
$ lnbot balance
  balance:   47,000 sats
  available: 42,000 sats
  on hold:   5,000 sats

lnbot status

Wallet details, balance, address, and API latency.

bash
$ lnbot status
  name:      agent01
  id:        wal_7x9kQ2mR
  address:   x8km2n@ln.bot
  balance:   47,000 sats
  available: 42,000 sats
  on hold:   5,000 sats
  api:       ✓ connected (23ms)

lnbot whoami

Show wallet ID, name, address, and API key.

Payments

lnbot invoice create --amount <sats> [--memo <text>]

Create a Lightning invoice, show QR code, and wait for payment.

bash
$ lnbot invoice create --amount 1000 --memo "coffee"
  amount:  1,000 sats
  status:  pending
  bolt11:
  lnbc10u1pj9x...

  ⚡ Scan to pay:
  [QR CODE]

  Waiting for payment... ✓ Settled!
✓ Payment received! +1,000 sats

lnbot invoice list [--limit <n>] [--after <n>]

List recent invoices (default: 20).

lnbot pay <address-or-bolt11> [--amount <sats>] [--max-fee <sats>]

Send sats to a Lightning address or BOLT11 invoice.

bash
$ lnbot pay alice@ln.bot --amount 500
✓ Sent! Settled instantly
  amount:  500 sats
  balance: 46,500 sats

lnbot payment list [--limit <n>] [--after <n>]

List outgoing payments.

lnbot transactions [--limit <n>] [--after <n>]

List all transaction history (credits and debits).

bash
$ lnbot transactions
  credit  +     1,000 sats  bal:     47,000  2m ago
  debit   -       500 sats  bal:     46,000  5m ago
  credit  +     5,000 sats  bal:     46,500  1h ago

Addresses

lnbot address list

List all Lightning addresses for the wallet.

lnbot address buy <name>

Buy a vanity address (name@ln.bot).

bash
$ lnbot address buy alice
✓ Address claimed: alice
  cost: 1,000 sats

lnbot address transfer <address> --to <wallet>

Transfer an address to another wallet (or use --target-key <api-key>).

lnbot address delete <address>

Delete a Lightning address.

Webhooks

lnbot webhook create --url <url>

Register a webhook endpoint.

bash
$ lnbot webhook create --url https://myapp.com/hooks/lnbot
✓ Webhook created
  id:     whk_9xMn2
  url:    https://myapp.com/hooks/lnbot
  secret: whsec_Kp8x...

  Save the secret — it won't be shown again.

lnbot webhook list

List registered webhooks.

lnbot webhook delete <id>

Delete a webhook endpoint.

Keys & Security

lnbot key show

Show primary and secondary API keys.

lnbot key rotate <0|1>

Rotate an API key (0 = primary, 1 = secondary). Old key is revoked immediately.

bash
$ lnbot key rotate 0
✓ primary key rotated
  key: key_r4k...

  Save this — it won't be shown again.

lnbot backup recovery

Generate a 12-word recovery passphrase (shown once).

lnbot backup passkey

Register a WebAuthn passkey (browser only).

lnbot restore recovery --passphrase "word1 word2 ... word12"

Restore a wallet using the recovery passphrase.

lnbot restore passkey

Restore a wallet using a registered passkey (browser only).

MCP

lnbot mcp config --remote

Print MCP server JSON config for AI agents (Claude, Cursor, etc.).

bash
$ lnbot mcp config --remote
Add to your MCP client config:

{  "mcpServers": {
    "lnbot": {
      "type": "url",
      "url": "https://api.ln.bot/mcp",
      "headers": {
        "Authorization": "Bearer key_..."
      }
    }
  }
}

Install & Update

macOS / Linux

bash
curl -fsSL https://ln.bot/install.sh | bash

Windows (PowerShell)

powershell
iwr -useb https://ln.bot/install.ps1 | iex

Homebrew

bash
brew install lnbotdev/tap/lnbot

Update

bash
lnbot update

Check for new versions and show upgrade instructions.