CLI Reference
Reference for the lnbot CLI covering setup, wallet management, payments, invoices, addresses, webhooks, keys, and MCP.
The lnbot command-line tool. Install with curl -fsSL https://ln.bot/install.sh | bash.
All commands support --wallet <name|id>, --json, and --yes flags. Run lnbot <command> --help for full details.
Getting Started
lnbot init
Register a new account, create your first wallet, and save credentials locally.
$ lnbot init
Registering account... done
Creating wallet... done
✓ Account and wallet created
wallet: k9x2mwp (wal_7x9kQ2mR)
address: k9x2mwp@ln.bot
api key: uk_...m2p4
⚠ Recovery passphrase (save this — shown only once):
basket drum forest ocean pixel storm figure lamp narrow quest river wheatRun this once — subsequent wallets are created with lnbot wallet create.
Wallet
lnbot wallet create
Create a new wallet (name is auto-generated).
$ lnbot wallet create
✓ Wallet created
id: wal_7x9kQ2mR
name: k9x2mwp
address: k9x2mwp@ln.botlnbot wallet list
List all wallets under your account. The active wallet is marked with a bullet.
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 balance
Show balance, available, and on-hold amounts.
$ lnbot balance
balance: 47,000 sats
available: 42,000 sats
on hold: 5,000 satslnbot status
Wallet details, balance, address, and API latency.
$ 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 current wallet info.
Payments
lnbot invoice create --amount <sats> [--memo <text>]
Create a Lightning invoice, show QR code, and wait for payment.
$ 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 satslnbot 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.
$ lnbot pay alice@ln.bot --amount 500
✓ Sent! Settled instantly
amount: 500 sats
balance: 46,500 satslnbot payment list [--limit <n>] [--after <n>]
List outgoing payments.
lnbot transactions [--limit <n>] [--after <n>]
List all transaction history (credits and debits).
$ 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 agoAddresses
lnbot address list
List all Lightning addresses for the wallet.
lnbot address buy <name>
Buy a vanity address (name@ln.bot).
$ lnbot address buy alice
✓ Address claimed: alice
cost: 1,000 satslnbot address transfer <address> --to <wallet>
Transfer a vanity address to another wallet.
lnbot address delete <address>
Delete a Lightning address.
Webhooks
lnbot webhook create --url <url>
Register a webhook endpoint.
$ 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 from local config.
lnbot key rotate <0|1>
Rotate a user key (0 = primary, 1 = secondary). Old key is revoked immediately.
$ lnbot key rotate 0
✓ primary key rotated
key: uk_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 an account using the recovery passphrase.
lnbot restore passkey
Restore an account using a registered passkey (browser only).
MCP
lnbot mcp config --remote
Print MCP server JSON config for AI agents (Claude, Cursor, etc.).
$ lnbot mcp config --remote
Add to your MCP client config:
{ "mcpServers": {
"lnbot": {
"type": "url",
"url": "https://api.ln.bot/v1/wallets/wal_.../mcp",
"headers": {
"Authorization": "Bearer uk_..."
}
}
}
}Use --wallet to target a specific wallet:
$ lnbot mcp config --remote --wallet wal_abcInstall & Update
macOS / Linux
curl -fsSL https://ln.bot/install.sh | bashHomebrew
brew install lnbotdev/tap/lnbotGo
go install github.com/lnbotdev/cli@latestUpdate
lnbot updateShell Completions
source <(lnbot completion bash) # Bash
source <(lnbot completion zsh) # Zsh
lnbot completion fish | source # Fish