afpay CLI reference
A payment tool for AI agents — send and receive across five networks through one interface, with spending limits you control.
afpay is compiled from a closed cli-spec-v1 registry: one source for argv parsing, typed invocation values, which parameter combinations are legal, output contracts, and help. An invocation runs only when it matches exactly one registered combination.
Global arguments
AFDATA registers these itself, so the syntax in Commands leaves them out.
| Argument | Where | What it does |
|---|---|---|
--help | every command | Every legal shape of that command, complete, plus its subcommands. JSON by default; --output plain for a terminal. |
--version | afpay only | Name, version, and build identity as one protocol result. |
--docs | afpay only | This document, rendered from the registry. |
--output <FORMAT> | per output contract | Render as json, yaml, plain (default json). |
--output-to <DESTINATION> | per output contract | Route results and diagnostics to split, stdout, stderr (default split). |
--stdout-file <PATH>, --stderr-file <PATH> | per output contract | Append that stream to a file instead. |
Success output is protocol events, on those terms, unless a command’s own Output line says otherwise.
A shape is one legal set of arguments that may appear together, under a stable id. Where a command has more than one, each id is a heading below. --help returns them all at once, so discovering a command costs one call; there is no recursive mode across commands, and this document is that view.
Commands
afpay— Run a long-lived afpay session instead of a single commandafpay api export— Write the OpenAPI document and standalone JSON Schemas to a directoryafpay balance— Balance across every networkafpay btc backup— Back up Bitcoin wallet data to a .tar.zst archiveafpay btc balance— Bitcoin balanceafpay btc config set— Update one Bitcoin wallet’s settingsafpay btc config show— Show one Bitcoin wallet’s configurationafpay btc limit add— Add a Bitcoin network or wallet spend limitafpay btc receive— Show the wallet’s receive addressafpay btc restore— Restore Bitcoin wallet data from a .tar.zst archiveafpay btc send— Send BTC on-chainafpay btc wallet close— Close a Bitcoin walletafpay btc wallet create— Create a Bitcoin walletafpay btc wallet dangerously-show-seed— Reveal the Bitcoin wallet seed; output is deliberately unredactedafpay btc wallet list— List Bitcoin walletsafpay cashu backup— Back up Cashu wallet data to a .tar.zst archiveafpay cashu balance— Cashu balanceafpay cashu config set— Update one Cashu wallet’s settingsafpay cashu config show— Show one Cashu wallet’s configurationafpay cashu limit add— Add a Cashu network or wallet spend limitafpay cashu receive— Redeem a Cashu token into a walletafpay cashu receive-from-ln— Create a Lightning invoice that mints Cashu proofs when paidafpay cashu receive-from-ln-claim— Claim the proofs minted by a settled receive-from-ln quoteafpay cashu restore— Restore Cashu wallet data from a .tar.zst archiveafpay cashu send— Mint a P2P Cashu token; to pay a Lightning invoice usecashu send-to-lnafpay cashu send-to-ln— Melt Cashu proofs to pay a Lightning invoiceafpay cashu wallet close— Close a Cashu walletafpay cashu wallet create— Create a Cashu wallet on one mintafpay cashu wallet dangerously-show-seed— Reveal the Cashu wallet seed; output is deliberately unredactedafpay cashu wallet list— List Cashu walletsafpay cashu wallet restore— Restore lost proofs from the mint, repairing counter or proof driftafpay container install— Build the image if missing, run the daemon, and print the client commandafpay container logs— Stream the container logs, unchangedafpay container status— Report whether the daemon is running, with its endpoint and client commandafpay container uninstall— Stop and remove the container; –purge also drops the image and cacheafpay evm backup— Back up EVM wallet data to a .tar.zst archiveafpay evm balance— EVM balanceafpay evm config set— Update one EVM wallet’s settingsafpay evm config show— Show one EVM wallet’s configurationafpay evm config token-add— Register a custom EVM token for balance trackingafpay evm config token-remove— Unregister a custom EVM tokenafpay evm limit add— Add a EVM network or wallet spend limitafpay evm receive— Show the wallet’s receive addressafpay evm restore— Restore EVM wallet data from a .tar.zst archiveafpay evm send— Send the chain’s native token or an ERC-20afpay evm wallet close— Close a EVM walletafpay evm wallet create— Create an EVM chain walletafpay evm wallet dangerously-show-seed— Reveal the EVM wallet seed; output is deliberately unredactedafpay evm wallet list— List EVM walletsafpay global backup— Back up every network’s data to a .tar.zst archiveafpay global config get— Read the runtime configuration, or one value by dot-pathafpay global config set— Set one runtime configuration valueafpay global limit add— Add a global spend limit, in USD centsafpay global restore— Restore every network’s data from a .tar.zst archiveafpay history list— List history records from the local storeafpay history status— Report one transaction’s current statusafpay history update— Incrementally sync backend history into the local storeafpay limit list— Show every spend-limit rule and its usageafpay limit reconcile— Force a stuck spend-ledger reservation to a terminal state (operator-only)afpay limit remove— Remove a spend-limit rule by IDafpay ln backup— Back up Lightning wallet data to a .tar.zst archiveafpay ln balance— Lightning balanceafpay ln config set— Update one Lightning wallet’s settingsafpay ln config show— Show one Lightning wallet’s configurationafpay ln limit add— Add a Lightning network or wallet spend limitafpay ln receive— Create a BOLT11 invoice, or return the reusable BOLT12 offerafpay ln restore— Restore Lightning wallet data from a .tar.zst archiveafpay ln send— Pay a BOLT11 invoice or a BOLT12 offer. Lightning carries no on-chain memo, so annotate with –local-memoafpay ln wallet close— Close a Lightning walletafpay ln wallet create— Create a Lightning walletafpay ln wallet dangerously-show-seed— Reveal the Lightning wallet seed; output is deliberately unredactedafpay ln wallet list— List Lightning walletsafpay pay confirm— Pay by confirming a plan asendresolved — the only command that moves moneyafpay skill install— Install or refresh the Agent-First Pay skillafpay skill status— Show whether the Agent-First Pay skill is installed, valid, and up to dateafpay skill uninstall— Remove an afpay-managed Agent-First Pay skillafpay sol backup— Back up Solana wallet data to a .tar.zst archiveafpay sol balance— Solana balanceafpay sol config set— Update one Solana wallet’s settingsafpay sol config show— Show one Solana wallet’s configurationafpay sol config token-add— Register a custom Solana token for balance trackingafpay sol config token-remove— Unregister a custom Solana tokenafpay sol limit add— Add a Solana network or wallet spend limitafpay sol receive— Show the wallet’s receive addressafpay sol restore— Restore Solana wallet data from a .tar.zst archiveafpay sol send— Send SOL or an SPL tokenafpay sol wallet close— Close a Solana walletafpay sol wallet create— Create a Solana walletafpay sol wallet dangerously-show-seed— Reveal the Solana wallet seed; output is deliberately unredactedafpay sol wallet list— List Solana walletsafpay ui receive— Open a panel showing the receive address or invoice as a code to scanafpay ui send— Open a panel showing a resolved payment and wait for a person to approve itafpay ui wallet— Open a panel showing every wallet and its balanceafpay wallet list— List wallets across every network
afpay
Run a long-lived afpay session instead of a single command
session-pipe — Read JSONL requests on stdin and answer on stdout
afpay --mode pipe [--data-dir <DIR>] [--log <FILTER>...] [--public-listen]
session-interactive — Human REPL with completion and QR helpers
afpay --mode interactive [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>]
session-tui — Full-screen terminal workflow over the same command interface
afpay --mode tui [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>]
session-rest — HTTP API server; only this shape accepts –rest-listen
afpay --mode rest [--data-dir <DIR>] [--log <FILTER>...] [--public-listen] [--rest-listen <HOST:PORT>] [--rest-api-key-secret <SOURCE>]
Arguments across every shape above:
| Argument | Meaning |
|---|---|
--mode | Long-lived session to run instead of a single command |
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Drive another afpay node from this session |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--public-listen | Allow binding to a non-loopback address; use only behind TLS or a firewall |
--rest-listen | Listen address for the REST server |
--rest-api-key-secret | Bearer API key the REST server requires (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
afpay api export
Write the OpenAPI document and standalone JSON Schemas to a directory
afpay api export [--directory <DIR>] [--force]
| Argument | Meaning |
|---|---|
--directory | Destination directory |
--force | Replace generated files that are already there |
afpay balance
Balance across every network
afpay balance [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>] [--network <cashu|ln|sol|evm|btc>] [--cashu-check]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Wallet ID (omit to show every wallet) |
--network | Restrict to one network |
--cashu-check | Verify Cashu proofs against the mint; slower but authoritative |
afpay btc backup
Back up Bitcoin wallet data to a .tar.zst archive
afpay btc backup [--data-dir <DIR>] [--archive-out <PATH>] [--wallet <WALLET_ID>]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--archive-out | Archive path (default: ./afpay-btc- |
--wallet | Wallet ID (omit to back up every Bitcoin wallet) |
afpay btc balance
Bitcoin balance
afpay btc balance [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Wallet ID (omit to show every Bitcoin wallet) |
afpay btc config set
Update one Bitcoin wallet’s settings
afpay btc config set [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID> [--label <LABEL>]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Wallet ID |
--label | New wallet label |
afpay btc config show
Show one Bitcoin wallet’s configuration
afpay btc config show [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID>
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Wallet ID |
afpay btc limit add
Add a Bitcoin network or wallet spend limit
afpay btc limit add [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>] --window <DURATION> --max-spend <AMOUNT>
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Wallet ID; omit for a limit covering the whole network |
--window | Rolling window, e.g. 30m, 1h, 24h, 7d |
--max-spend | Maximum spend in base units |
afpay btc receive
Show the wallet’s receive address
btc-receive — Return the receive address or invoice and exit
afpay btc receive [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>] [--qr-svg-file] [--idempotency-key <KEY>]
btc-receive-wait — Block until a matching payment settles; only this shape describes the wait
afpay btc receive [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>] --wait [--wait-timeout-s <SECONDS>] [--wait-poll-interval-ms <MS>] [--qr-svg-file] [--idempotency-key <KEY>] [--wait-sync-limit <N>]
Arguments across every shape above:
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Wallet ID (auto-selected if omitted) |
--wait | Block until a matching payment settles |
--wait-timeout-s | Give up waiting after N seconds |
--wait-poll-interval-ms | Poll interval while waiting |
--qr-svg-file | Write the receive QR payload to an SVG file |
--idempotency-key | Opaque key (≤128 chars); a repeat with the same key and body returns the receive already placed instead of minting a second invoice |
--wait-sync-limit | Max history records scanned per poll while resolving the tx id |
afpay btc restore
Restore Bitcoin wallet data from a .tar.zst archive
afpay btc restore <ARCHIVE> [--data-dir <DIR>] [--dangerously-overwrite] [--pg-url-secret <SOURCE>]
| Argument | Meaning |
|---|---|
ARCHIVE | Path to the backup archive |
--data-dir | Wallet and data directory |
--dangerously-overwrite | Clear existing data before restoring instead of merging |
--pg-url-secret | Override the PostgreSQL connection URL for the pg restore step (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
afpay btc send
Send BTC on-chain
afpay btc send [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --to <ADDRESS> --amount-sats <SATS> [--wallet <WALLET_ID>] [--onchain-memo <TEXT>] [--local-memo <KEY=VALUE>...]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--to | Recipient Bitcoin address (bc1… / tb1…) |
--amount-sats | Amount in satoshis |
--wallet | Source wallet ID (auto-selected if omitted) |
--onchain-memo | On-chain memo, sent with the transaction |
--local-memo | Local bookkeeping annotation; bare text is stored as note= |
afpay btc wallet close
Close a Bitcoin wallet
afpay btc wallet close [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID> [--dangerously-skip-balance-check-and-may-lose-money]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Wallet ID |
--dangerously-skip-balance-check-and-may-lose-money | Close even if the wallet still holds funds |
afpay btc wallet create
Create a Bitcoin wallet
btc-wallet-create-esplora — Esplora chain source; only this shape accepts –btc-esplora-url
afpay btc wallet create [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--idempotency-key <KEY>] [--btc-network <mainnet|signet>] [--btc-address-type <taproot|segwit>] [--btc-backend esplora] [--btc-esplora-url <URL>] [--mnemonic-secret <SOURCE>] [--label <LABEL>]
btc-wallet-create-core-rpc — Bitcoin Core RPC chain source; requires –btc-core-url
afpay btc wallet create [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--idempotency-key <KEY>] [--btc-network <mainnet|signet>] [--btc-address-type <taproot|segwit>] --btc-backend core-rpc --btc-core-url <URL> [--btc-core-auth-secret <SOURCE>] [--mnemonic-secret <SOURCE>] [--label <LABEL>]
btc-wallet-create-electrum — Electrum chain source; requires –btc-electrum-url
afpay btc wallet create [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--idempotency-key <KEY>] [--btc-network <mainnet|signet>] [--btc-address-type <taproot|segwit>] --btc-backend electrum --btc-electrum-url <URL> [--mnemonic-secret <SOURCE>] [--label <LABEL>]
Arguments across every shape above:
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--idempotency-key | Opaque key (≤128 chars); a repeat with the same key and body reports the wallet the first call created instead of generating a second key |
--btc-network | Bitcoin sub-network |
--btc-address-type | Address type |
--btc-backend | Chain-source backend |
--btc-esplora-url | Custom Esplora API URL |
--btc-core-url | Bitcoin Core RPC URL |
--btc-core-auth-secret | Bitcoin Core RPC credentials as USER:PASS (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--btc-electrum-url | Electrum server URL |
--mnemonic-secret | Existing BIP39 mnemonic to restore this wallet from (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--label | Optional wallet label |
afpay btc wallet dangerously-show-seed
Reveal the Bitcoin wallet seed; output is deliberately unredacted
afpay btc wallet dangerously-show-seed [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID>
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Wallet ID |
afpay btc wallet list
List Bitcoin wallets
afpay btc wallet list [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
afpay cashu backup
Back up Cashu wallet data to a .tar.zst archive
afpay cashu backup [--data-dir <DIR>] [--archive-out <PATH>] [--wallet <WALLET_ID>]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--archive-out | Archive path (default: ./afpay-cashu- |
--wallet | Wallet ID (omit to back up every Cashu wallet) |
afpay cashu balance
Cashu balance
afpay cashu balance [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>] [--check]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Wallet ID (omit to show every Cashu wallet) |
--check | Verify proofs against the mint; slower but authoritative |
afpay cashu config set
Update one Cashu wallet’s settings
afpay cashu config set [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID> [--label <LABEL>]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Wallet ID |
--label | New wallet label |
afpay cashu config show
Show one Cashu wallet’s configuration
afpay cashu config show [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID>
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Wallet ID |
afpay cashu limit add
Add a Cashu network or wallet spend limit
afpay cashu limit add [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>] --window <DURATION> --max-spend <AMOUNT>
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Wallet ID; omit for a limit covering the whole network |
--window | Rolling window, e.g. 30m, 1h, 24h, 7d |
--max-spend | Maximum spend in base units |
afpay cashu receive
Redeem a Cashu token into a wallet
afpay cashu receive [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] <TOKEN> [--wallet <WALLET_ID>]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
TOKEN | Cashu token string |
--wallet | Wallet ID (auto-matched from the token if omitted) |
afpay cashu receive-from-ln
Create a Lightning invoice that mints Cashu proofs when paid
cashu-receive — Return the receive address or invoice and exit
afpay cashu receive-from-ln [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>] [--qr-svg-file] [--idempotency-key <KEY>] [--amount-sats <SATS>] [--onchain-memo <TEXT>]
cashu-receive-wait — Block until a matching payment settles; only this shape describes the wait
afpay cashu receive-from-ln [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>] --wait [--wait-timeout-s <SECONDS>] [--wait-poll-interval-ms <MS>] [--qr-svg-file] [--idempotency-key <KEY>] [--amount-sats <SATS>] [--onchain-memo <TEXT>]
Arguments across every shape above:
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Wallet ID (auto-selected if omitted) |
--wait | Block until a matching payment settles |
--wait-timeout-s | Give up waiting after N seconds |
--wait-poll-interval-ms | Poll interval while waiting |
--qr-svg-file | Write the receive QR payload to an SVG file |
--idempotency-key | Opaque key (≤128 chars); a repeat with the same key and body returns the receive already placed instead of minting a second invoice |
--amount-sats | Amount in sats |
--onchain-memo | Invoice description |
afpay cashu receive-from-ln-claim
Claim the proofs minted by a settled receive-from-ln quote
afpay cashu receive-from-ln-claim [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID> --ln-quote-id <QUOTE_ID>
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Wallet ID |
--ln-quote-id | Quote ID or payment hash from the deposit |
afpay cashu restore
Restore Cashu wallet data from a .tar.zst archive
afpay cashu restore <ARCHIVE> [--data-dir <DIR>] [--dangerously-overwrite] [--pg-url-secret <SOURCE>]
| Argument | Meaning |
|---|---|
ARCHIVE | Path to the backup archive |
--data-dir | Wallet and data directory |
--dangerously-overwrite | Clear existing data before restoring instead of merging |
--pg-url-secret | Override the PostgreSQL connection URL for the pg restore step (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
afpay cashu send
Mint a P2P Cashu token; to pay a Lightning invoice use cashu send-to-ln
afpay cashu send [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --amount-sats <SATS> [--cashu-mint <URL>...] [--wallet <WALLET_ID>] [--onchain-memo <TEXT>] [--local-memo <KEY=VALUE>...]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--amount-sats | Amount in sats |
--cashu-mint | Restrict to wallets on these mints, tried in order |
--wallet | Source wallet ID (auto-selected if omitted) |
--onchain-memo | On-chain memo, sent with the transaction |
--local-memo | Local bookkeeping annotation; bare text is stored as note= |
afpay cashu send-to-ln
Melt Cashu proofs to pay a Lightning invoice
afpay cashu send-to-ln [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --to <BOLT11> [--wallet <WALLET_ID>] [--onchain-memo <TEXT>] [--local-memo <KEY=VALUE>...]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--to | Lightning invoice to pay |
--wallet | Source wallet ID (auto-selected if omitted) |
--onchain-memo | On-chain memo, sent with the transaction |
--local-memo | Local bookkeeping annotation; bare text is stored as note= |
afpay cashu wallet close
Close a Cashu wallet
afpay cashu wallet close [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID> [--dangerously-skip-balance-check-and-may-lose-money]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Wallet ID |
--dangerously-skip-balance-check-and-may-lose-money | Close even if the wallet still holds funds |
afpay cashu wallet create
Create a Cashu wallet on one mint
afpay cashu wallet create [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --cashu-mint <URL> [--label <LABEL>] [--mnemonic-secret <SOURCE>] [--idempotency-key <KEY>]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--cashu-mint | Cashu mint URL |
--label | Optional wallet label |
--mnemonic-secret | Existing BIP39 mnemonic to restore this wallet from (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--idempotency-key | Opaque key (≤128 chars); a repeat with the same key and body reports the wallet the first call created instead of generating a second key |
afpay cashu wallet dangerously-show-seed
Reveal the Cashu wallet seed; output is deliberately unredacted
afpay cashu wallet dangerously-show-seed [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID>
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Wallet ID |
afpay cashu wallet list
List Cashu wallets
afpay cashu wallet list [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
afpay cashu wallet restore
Restore lost proofs from the mint, repairing counter or proof drift
afpay cashu wallet restore [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID>
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Wallet ID |
afpay container install
Build the image if missing, run the daemon, and print the client command
container-install-release — Download the prebuilt release image pinned to this binary
afpay container install [--runtime <docker|podman|apple>] [--name <NAME>] [--port <PORT>] [--with <phoenixd|bitcoind>...] [--allow <CATEGORY=URL>...] [--btc-network <mainnet|signet>] [--btc-rpc-port <PORT>] [--btc-prune-mb <MB>] [--rebuild] [--reveal-daemon-secret]
container-install-from-source — Compile from a checkout; only this shape accepts –features and –context
afpay container install [--runtime <docker|podman|apple>] [--name <NAME>] [--port <PORT>] [--with <phoenixd|bitcoind>...] [--allow <CATEGORY=URL>...] [--btc-network <mainnet|signet>] [--btc-rpc-port <PORT>] [--btc-prune-mb <MB>] --from-source [--features <FEATURES>] [--context <DIR>] [--reveal-daemon-secret]
Arguments across every shape above:
| Argument | Meaning |
|---|---|
--runtime | Container runtime; auto-detected when omitted |
--name | Container name |
--port | Daemon port, published on 127.0.0.1 |
--with | Bundled daemon to install and enable |
--allow | Operator allowlist entry; a public listener refuses to start without one. Categories: mint, esplora, sol-rpc, evm-rpc, btc-core, btc-electrum, ln |
--btc-network | Bitcoin network when –with bitcoind |
--btc-rpc-port | bitcoind RPC port when –with bitcoind |
--btc-prune-mb | bitcoind prune target when –with bitcoind |
--rebuild | Rebuild the image even when it already exists |
--from-source | Compile the image from a source checkout instead of the prebuilt release |
--features | Cargo feature set for the source build |
--context | Source checkout to build from |
--reveal-daemon-secret | Print the generated daemon credential and the credential-bearing client command |
afpay container logs
Stream the container logs, unchanged
afpay container logs [--runtime <docker|podman|apple>] [--name <NAME>] [--follow]
Output: raw bytes on success; rejects --output and --output-to; redirect with --stdout-file or --stderr-file. Failures are still strict JSON on stderr.
| Argument | Meaning |
|---|---|
--runtime | Container runtime; auto-detected when omitted |
--name | Container name |
--follow | Keep streaming as new lines arrive |
afpay container status
Report whether the daemon is running, with its endpoint and client command
afpay container status [--runtime <docker|podman|apple>] [--name <NAME>] [--port <PORT>] [--reveal-daemon-secret]
| Argument | Meaning |
|---|---|
--runtime | Container runtime; auto-detected when omitted |
--name | Container name |
--port | Daemon port, published on 127.0.0.1 |
--reveal-daemon-secret | Print the generated daemon credential and the credential-bearing client command |
afpay container uninstall
Stop and remove the container; –purge also drops the image and cache
afpay container uninstall [--runtime <docker|podman|apple>] [--name <NAME>] [--purge]
| Argument | Meaning |
|---|---|
--runtime | Container runtime; auto-detected when omitted |
--name | Container name |
--purge | Also remove the built image and the cached context |
afpay evm backup
Back up EVM wallet data to a .tar.zst archive
afpay evm backup [--data-dir <DIR>] [--archive-out <PATH>] [--wallet <WALLET_ID>]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--archive-out | Archive path (default: ./afpay-evm- |
--wallet | Wallet ID (omit to back up every EVM wallet) |
afpay evm balance
EVM balance
afpay evm balance [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Wallet ID (omit to show every EVM wallet) |
afpay evm config set
Update one EVM wallet’s settings
afpay evm config set [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID> [--label <LABEL>] [--evm-rpc-endpoint <URL>...] [--chain-id <ID>]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Wallet ID |
--label | New wallet label |
--evm-rpc-endpoint | Replace the EVM JSON-RPC endpoints, in failover order |
--chain-id | EVM chain ID |
afpay evm config show
Show one EVM wallet’s configuration
afpay evm config show [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID>
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Wallet ID |
afpay evm config token-add
Register a custom EVM token for balance tracking
afpay evm config token-add [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID> --symbol <SYMBOL> --address <ADDRESS> [--decimals <N>]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Wallet ID |
--symbol | Token symbol, e.g. dai |
--address | Token contract or mint address |
--decimals | Token decimals |
afpay evm config token-remove
Unregister a custom EVM token
afpay evm config token-remove [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID> --symbol <SYMBOL>
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Wallet ID |
--symbol | Token symbol to remove |
afpay evm limit add
Add a EVM network or wallet spend limit
afpay evm limit add [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>] --window <DURATION> --max-spend <AMOUNT> [--token <TOKEN>]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Wallet ID; omit for a limit covering the whole network |
--window | Rolling window, e.g. 30m, 1h, 24h, 7d |
--max-spend | Maximum spend in base units |
--token | Token the limit applies to |
afpay evm receive
Show the wallet’s receive address
afpay evm receive [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>] [--onchain-memo <TEXT>]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Wallet ID (auto-selected if omitted) |
--onchain-memo | Memo recorded with the request |
afpay evm restore
Restore EVM wallet data from a .tar.zst archive
afpay evm restore <ARCHIVE> [--data-dir <DIR>] [--dangerously-overwrite] [--pg-url-secret <SOURCE>]
| Argument | Meaning |
|---|---|
ARCHIVE | Path to the backup archive |
--data-dir | Wallet and data directory |
--dangerously-overwrite | Clear existing data before restoring instead of merging |
--pg-url-secret | Override the PostgreSQL connection URL for the pg restore step (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
afpay evm send
Send the chain’s native token or an ERC-20
afpay evm send [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --to <ADDRESS> --amount <BASE_UNITS> --token <TOKEN> [--chain-id <ID>] [--wallet <WALLET_ID>] [--onchain-memo <TEXT>] [--local-memo <KEY=VALUE>...]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--to | Recipient address (0x…) |
--amount | Amount in base units (wei for ETH) |
--token | native, or a registered token symbol |
--chain-id | Pin the chain; a mismatched wallet returns wrong_chain |
--wallet | Source wallet ID (auto-selected if omitted) |
--onchain-memo | On-chain memo, sent with the transaction |
--local-memo | Local bookkeeping annotation; bare text is stored as note= |
afpay evm wallet close
Close a EVM wallet
afpay evm wallet close [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID> [--dangerously-skip-balance-check-and-may-lose-money]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Wallet ID |
--dangerously-skip-balance-check-and-may-lose-money | Close even if the wallet still holds funds |
afpay evm wallet create
Create an EVM chain wallet
afpay evm wallet create [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --evm-rpc-endpoint <URL>... [--chain-id <ID>] [--label <LABEL>] [--idempotency-key <KEY>]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--evm-rpc-endpoint | EVM JSON-RPC endpoint; repeat to set the failover order |
--chain-id | EVM chain ID |
--label | Optional wallet label |
--idempotency-key | Opaque key (≤128 chars); a repeat with the same key and body reports the wallet the first call created instead of generating a second key |
afpay evm wallet dangerously-show-seed
Reveal the EVM wallet seed; output is deliberately unredacted
afpay evm wallet dangerously-show-seed [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID>
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Wallet ID |
afpay evm wallet list
List EVM wallets
afpay evm wallet list [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
afpay global backup
Back up every network’s data to a .tar.zst archive
afpay global backup [--data-dir <DIR>] [--archive-out <PATH>] [--extra-dir <LABEL=/path>...]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--archive-out | Archive path (default: ./afpay-global- |
--extra-dir | Also archive this directory under LABEL |
afpay global config get
Read the runtime configuration, or one value by dot-path
afpay global config get [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [<KEY>]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
KEY | Dot-path key, e.g. log or exchange_rate.ttl_s; omit to show everything |
afpay global config set
Set one runtime configuration value
afpay global config set [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] <KEY> [<VALUE>...]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
KEY | Dot-path key |
VALUE | Value, or repeated values for a list-valued key |
afpay global limit add
Add a global spend limit, in USD cents
afpay global limit add [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --window <DURATION> --max-spend <CENTS>
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--window | Rolling window, e.g. 30m, 1h, 24h, 7d |
--max-spend | Maximum spend in USD cents |
afpay global restore
Restore every network’s data from a .tar.zst archive
afpay global restore <ARCHIVE> [--data-dir <DIR>] [--dangerously-overwrite] [--pg-url-secret <SOURCE>] [--extra-dir <LABEL=/path>...]
| Argument | Meaning |
|---|---|
ARCHIVE | Path to the backup archive |
--data-dir | Wallet and data directory |
--dangerously-overwrite | Clear existing data before restoring instead of merging |
--pg-url-secret | Override the PostgreSQL connection URL for the pg restore step (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--extra-dir | Also restore this directory from LABEL |
afpay history list
List history records from the local store
afpay history list [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>] [--network <cashu|ln|sol|evm|btc>] [--onchain-memo <TEXT>] [--limit <N>] [--offset <N>] [--since-epoch-s <EPOCH>] [--until-epoch-s <EPOCH>]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Filter by wallet ID |
--network | Restrict to one network |
--onchain-memo | Filter by exact on-chain memo |
--limit | Maximum records returned |
--offset | Records to skip |
--since-epoch-s | Only records created at or after this epoch second |
--until-epoch-s | Only records created before this epoch second |
afpay history status
Report one transaction’s current status
afpay history status [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --transaction-id <TX_ID>
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--transaction-id | Transaction ID |
afpay history update
Incrementally sync backend history into the local store
afpay history update [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>] [--network <cashu|ln|sol|evm|btc>] [--limit <N>]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Sync one wallet (default: every wallet in scope) |
--network | Restrict to one network |
--limit | Maximum records scanned per wallet |
afpay limit list
Show every spend-limit rule and its usage
afpay limit list [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
afpay limit reconcile
Force a stuck spend-ledger reservation to a terminal state (operator-only)
limit-reconcile-confirm — Record the spend: the payment actually succeeded
afpay limit reconcile [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --reservation-id <ID> --confirm --reason <TEXT>
limit-reconcile-cancel — Release the reservation: the payment did not happen
afpay limit reconcile [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --reservation-id <ID> --cancel --reason <TEXT>
Arguments across every shape above:
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--reservation-id | Reservation ID |
--confirm | The payment did settle |
--cancel | The payment did not settle |
--reason | Audit note (1..=512 chars) explaining the forced outcome |
afpay limit remove
Remove a spend-limit rule by ID
afpay limit remove [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --rule-id <RULE_ID>
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--rule-id | Rule ID, e.g. r_1a2b3c4d |
afpay ln backup
Back up Lightning wallet data to a .tar.zst archive
afpay ln backup [--data-dir <DIR>] [--archive-out <PATH>] [--wallet <WALLET_ID>]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--archive-out | Archive path (default: ./afpay-ln- |
--wallet | Wallet ID (omit to back up every Lightning wallet) |
afpay ln balance
Lightning balance
afpay ln balance [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Wallet ID (omit to show every Lightning wallet) |
afpay ln config set
Update one Lightning wallet’s settings
afpay ln config set [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID> [--label <LABEL>]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Wallet ID |
--label | New wallet label |
afpay ln config show
Show one Lightning wallet’s configuration
afpay ln config show [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID>
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Wallet ID |
afpay ln limit add
Add a Lightning network or wallet spend limit
afpay ln limit add [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>] --window <DURATION> --max-spend <AMOUNT>
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Wallet ID; omit for a limit covering the whole network |
--window | Rolling window, e.g. 30m, 1h, 24h, 7d |
--max-spend | Maximum spend in base units |
afpay ln receive
Create a BOLT11 invoice, or return the reusable BOLT12 offer
ln-receive — Return the receive address or invoice and exit
afpay ln receive [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>] [--qr-svg-file] [--idempotency-key <KEY>] [--amount-sats <SATS>]
ln-receive-wait — Block until a matching payment settles; only this shape describes the wait
afpay ln receive [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>] --wait [--wait-timeout-s <SECONDS>] [--wait-poll-interval-ms <MS>] [--qr-svg-file] [--idempotency-key <KEY>] [--amount-sats <SATS>]
Arguments across every shape above:
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Wallet ID (auto-selected if omitted) |
--wait | Block until a matching payment settles |
--wait-timeout-s | Give up waiting after N seconds |
--wait-poll-interval-ms | Poll interval while waiting |
--qr-svg-file | Write the receive QR payload to an SVG file |
--idempotency-key | Opaque key (≤128 chars); a repeat with the same key and body returns the receive already placed instead of minting a second invoice |
--amount-sats | Amount in sats; omit for a BOLT12 offer |
afpay ln restore
Restore Lightning wallet data from a .tar.zst archive
afpay ln restore <ARCHIVE> [--data-dir <DIR>] [--dangerously-overwrite] [--pg-url-secret <SOURCE>]
| Argument | Meaning |
|---|---|
ARCHIVE | Path to the backup archive |
--data-dir | Wallet and data directory |
--dangerously-overwrite | Clear existing data before restoring instead of merging |
--pg-url-secret | Override the PostgreSQL connection URL for the pg restore step (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
afpay ln send
Pay a BOLT11 invoice or a BOLT12 offer. Lightning carries no on-chain memo, so annotate with –local-memo
afpay ln send [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --to <INVOICE> [--amount-sats <SATS>] [--wallet <WALLET_ID>] [--local-memo <KEY=VALUE>...]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--to | BOLT11 invoice or BOLT12 offer (lno1…) |
--amount-sats | Amount in sats; required for a BOLT12 offer, rejected for BOLT11 |
--wallet | Source wallet ID (auto-selected if omitted) |
--local-memo | Local bookkeeping annotation; bare text is stored as note= |
afpay ln wallet close
Close a Lightning wallet
afpay ln wallet close [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID> [--dangerously-skip-balance-check-and-may-lose-money]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Wallet ID |
--dangerously-skip-balance-check-and-may-lose-money | Close even if the wallet still holds funds |
afpay ln wallet create
Create a Lightning wallet
ln-wallet-create-nwc — Nostr Wallet Connect; authenticates with a connection URI
afpay ln wallet create [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --backend nwc --nwc-uri-secret <SOURCE> [--label <LABEL>] [--idempotency-key <KEY>]
ln-wallet-create-phoenixd — phoenixd; authenticates with an endpoint and HTTP password
afpay ln wallet create [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --backend phoenixd --endpoint-url <URL> --password-secret <SOURCE> [--label <LABEL>] [--idempotency-key <KEY>]
ln-wallet-create-lnbits — LNbits; authenticates with an endpoint and admin API key
afpay ln wallet create [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --backend lnbits --endpoint-url <URL> --admin-key-secret <SOURCE> [--label <LABEL>] [--idempotency-key <KEY>]
Arguments across every shape above:
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--backend | Lightning backend this wallet talks to |
--nwc-uri-secret | NWC connection URI (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--endpoint-url | Backend HTTP endpoint |
--password-secret | phoenixd HTTP password (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--admin-key-secret | LNbits admin API key (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--label | Optional wallet label |
--idempotency-key | Opaque key (≤128 chars); a repeat with the same key and body reports the wallet the first call created instead of generating a second key |
afpay ln wallet dangerously-show-seed
Reveal the Lightning wallet seed; output is deliberately unredacted
afpay ln wallet dangerously-show-seed [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID>
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Wallet ID |
afpay ln wallet list
List Lightning wallets
afpay ln wallet list [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
afpay pay confirm
Pay by confirming a plan a send resolved — the only command that moves money
afpay pay confirm [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --plan-id <PLAN_ID> [--idempotency-key <KEY>]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--plan-id | The plan_id a send returned. Single-use, and refused once it expires or the terms it was resolved against change |
--idempotency-key | Opaque key (≤128 chars); a repeat with the same key and plan replays the first response instead of paying twice |
afpay skill install
Install or refresh the Agent-First Pay skill
skill-install-every-agent — Target every agent that supports the scope
afpay skill install [--agent all] [--scope <personal|workspace>] [--force]
skill-install-one-agent — Target one named agent; only this shape accepts –skills-dir
afpay skill install --agent <codex|claude-code|opencode|hermes> [--scope <personal|workspace>] [--skills-dir <DIR>] [--force]
Arguments across every shape above:
| Argument | Meaning |
|---|---|
--agent | Agent to manage |
--scope | Skill scope |
--skills-dir | Directory that contains skill folders |
--force | Overwrite or remove an Agent-First Pay skill this tool did not manage |
afpay skill status
Show whether the Agent-First Pay skill is installed, valid, and up to date
skill-status-every-agent — Target every agent that supports the scope
afpay skill status [--agent all] [--scope <personal|workspace>]
skill-status-one-agent — Target one named agent; only this shape accepts –skills-dir
afpay skill status --agent <codex|claude-code|opencode|hermes> [--scope <personal|workspace>] [--skills-dir <DIR>]
Arguments across every shape above:
| Argument | Meaning |
|---|---|
--agent | Agent to manage |
--scope | Skill scope |
--skills-dir | Directory that contains skill folders |
afpay skill uninstall
Remove an afpay-managed Agent-First Pay skill
skill-uninstall-every-agent — Target every agent that supports the scope
afpay skill uninstall [--agent all] [--scope <personal|workspace>] [--force]
skill-uninstall-one-agent — Target one named agent; only this shape accepts –skills-dir
afpay skill uninstall --agent <codex|claude-code|opencode|hermes> [--scope <personal|workspace>] [--skills-dir <DIR>] [--force]
Arguments across every shape above:
| Argument | Meaning |
|---|---|
--agent | Agent to manage |
--scope | Skill scope |
--skills-dir | Directory that contains skill folders |
--force | Overwrite or remove an Agent-First Pay skill this tool did not manage |
afpay sol backup
Back up Solana wallet data to a .tar.zst archive
afpay sol backup [--data-dir <DIR>] [--archive-out <PATH>] [--wallet <WALLET_ID>]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--archive-out | Archive path (default: ./afpay-sol- |
--wallet | Wallet ID (omit to back up every Solana wallet) |
afpay sol balance
Solana balance
afpay sol balance [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Wallet ID (omit to show every Solana wallet) |
afpay sol config set
Update one Solana wallet’s settings
afpay sol config set [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID> [--label <LABEL>] [--sol-rpc-endpoint <URL>...]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Wallet ID |
--label | New wallet label |
--sol-rpc-endpoint | Replace the Solana JSON-RPC endpoints, in failover order |
afpay sol config show
Show one Solana wallet’s configuration
afpay sol config show [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID>
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Wallet ID |
afpay sol config token-add
Register a custom Solana token for balance tracking
afpay sol config token-add [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID> --symbol <SYMBOL> --address <ADDRESS> [--decimals <N>]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Wallet ID |
--symbol | Token symbol, e.g. dai |
--address | Token contract or mint address |
--decimals | Token decimals |
afpay sol config token-remove
Unregister a custom Solana token
afpay sol config token-remove [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID> --symbol <SYMBOL>
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Wallet ID |
--symbol | Token symbol to remove |
afpay sol limit add
Add a Solana network or wallet spend limit
afpay sol limit add [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>] --window <DURATION> --max-spend <AMOUNT> [--token <TOKEN>]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Wallet ID; omit for a limit covering the whole network |
--window | Rolling window, e.g. 30m, 1h, 24h, 7d |
--max-spend | Maximum spend in base units |
--token | Token the limit applies to |
afpay sol receive
Show the wallet’s receive address
sol-receive — Return the receive address or invoice and exit
afpay sol receive [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>] [--qr-svg-file] [--idempotency-key <KEY>]
sol-receive-wait — Block until a matching payment settles; only this shape describes the wait
afpay sol receive [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--wallet <WALLET_ID>] --wait [--wait-timeout-s <SECONDS>] [--wait-poll-interval-ms <MS>] [--qr-svg-file] [--idempotency-key <KEY>] [--onchain-memo <TEXT>] [--min-confirmations <N>] [--reference <KEY>]
Arguments across every shape above:
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Wallet ID (auto-selected if omitted) |
--wait | Block until a matching payment settles |
--wait-timeout-s | Give up waiting after N seconds |
--wait-poll-interval-ms | Poll interval while waiting |
--qr-svg-file | Write the receive QR payload to an SVG file |
--idempotency-key | Opaque key (≤128 chars); a repeat with the same key and body returns the receive already placed instead of minting a second invoice |
--onchain-memo | On-chain memo to watch for |
--min-confirmations | Confirmation depth before the payment counts as settled |
--reference | Reference key to watch for (base58) |
afpay sol restore
Restore Solana wallet data from a .tar.zst archive
afpay sol restore <ARCHIVE> [--data-dir <DIR>] [--dangerously-overwrite] [--pg-url-secret <SOURCE>]
| Argument | Meaning |
|---|---|
ARCHIVE | Path to the backup archive |
--data-dir | Wallet and data directory |
--dangerously-overwrite | Clear existing data before restoring instead of merging |
--pg-url-secret | Override the PostgreSQL connection URL for the pg restore step (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
afpay sol send
Send SOL or an SPL token
afpay sol send [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --to <ADDRESS> --amount <BASE_UNITS> --token <TOKEN> [--reference <KEY>] [--wallet <WALLET_ID>] [--onchain-memo <TEXT>] [--local-memo <KEY=VALUE>...]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--to | Recipient Solana address (base58) |
--amount | Amount in base units (lamports for SOL) |
--token | native for SOL, or a registered token symbol |
--reference | Reference key for order binding (base58-encoded 32 bytes) |
--wallet | Source wallet ID (auto-selected if omitted) |
--onchain-memo | On-chain memo, sent with the transaction |
--local-memo | Local bookkeeping annotation; bare text is stored as note= |
afpay sol wallet close
Close a Solana wallet
afpay sol wallet close [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID> [--dangerously-skip-balance-check-and-may-lose-money]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Wallet ID |
--dangerously-skip-balance-check-and-may-lose-money | Close even if the wallet still holds funds |
afpay sol wallet create
Create a Solana wallet
afpay sol wallet create [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --sol-rpc-endpoint <URL>... [--label <LABEL>] [--sol-cluster <mainnet-beta|devnet|testnet>] [--idempotency-key <KEY>]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--sol-rpc-endpoint | Solana JSON-RPC endpoint; repeat to set the failover order |
--label | Optional wallet label |
--sol-cluster | Intended cluster; plans warn when RPC hostname evidence differs |
--idempotency-key | Opaque key (≤128 chars); a repeat with the same key and body reports the wallet the first call created instead of generating a second key |
afpay sol wallet dangerously-show-seed
Reveal the Solana wallet seed; output is deliberately unredacted
afpay sol wallet dangerously-show-seed [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] --wallet <WALLET_ID>
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--wallet | Wallet ID |
afpay sol wallet list
List Solana wallets
afpay sol wallet list [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
afpay ui receive
Open a panel showing the receive address or invoice as a code to scan
ui-receive-cashu — A Lightning invoice that mints Cashu proofs when paid
afpay ui receive [--data-dir <DIR>] [--log <FILTER>...] --network cashu [--mode <window|link|session>] [--wallet <WALLET_ID>] [--amount-sats <SATS>] [--onchain-memo <TEXT>]
ui-receive-ln — A BOLT11 invoice, or the reusable BOLT12 offer
afpay ui receive [--data-dir <DIR>] [--log <FILTER>...] --network ln [--mode <window|link|session>] [--wallet <WALLET_ID>] [--amount-sats <SATS>]
ui-receive-sol — The wallet’s Solana receive address
afpay ui receive [--data-dir <DIR>] [--log <FILTER>...] --network sol [--mode <window|link|session>] [--wallet <WALLET_ID>]
ui-receive-evm — The wallet’s EVM receive address
afpay ui receive [--data-dir <DIR>] [--log <FILTER>...] --network evm [--mode <window|link|session>] [--wallet <WALLET_ID>] [--onchain-memo <TEXT>]
ui-receive-btc — The wallet’s Bitcoin receive address
afpay ui receive [--data-dir <DIR>] [--log <FILTER>...] --network btc [--mode <window|link|session>] [--wallet <WALLET_ID>]
Arguments across every shape above:
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--network | Network to be paid on |
--mode | How this reaches the person: window a browser window is open on this machine; link the page is reachable from this machine’s network at the link URL; session the session is registered only; open it with afui session open or reach it through afui session serve. Falls back to AFUI_DELIVERY, then window |
--wallet | Wallet ID (auto-selected if omitted) |
--amount-sats | Amount in sats |
--onchain-memo | Memo recorded with the request |
afpay ui send
Open a panel showing a resolved payment and wait for a person to approve it
ui-send-cashu — Melt Cashu proofs to pay a Lightning invoice
afpay ui send [--data-dir <DIR>] [--log <FILTER>...] --network cashu [--mode <window|session>] --to <DESTINATION> [--wallet <WALLET_ID>] [--onchain-memo <TEXT>] [--local-memo <KEY=VALUE>...]
ui-send-ln — Pay a BOLT11 invoice or a BOLT12 offer
afpay ui send [--data-dir <DIR>] [--log <FILTER>...] --network ln [--mode <window|session>] --to <DESTINATION> [--amount-sats <SATS>] [--wallet <WALLET_ID>] [--local-memo <KEY=VALUE>...]
ui-send-sol — Send SOL or an SPL token
afpay ui send [--data-dir <DIR>] [--log <FILTER>...] --network sol [--mode <window|session>] --to <DESTINATION> --amount <BASE_UNITS> --token <TOKEN> [--reference <KEY>] [--wallet <WALLET_ID>] [--onchain-memo <TEXT>] [--local-memo <KEY=VALUE>...]
ui-send-evm — Send the chain’s native token or an ERC-20
afpay ui send [--data-dir <DIR>] [--log <FILTER>...] --network evm [--mode <window|session>] --to <DESTINATION> --amount <BASE_UNITS> --token <TOKEN> [--chain-id <ID>] [--wallet <WALLET_ID>] [--onchain-memo <TEXT>] [--local-memo <KEY=VALUE>...]
ui-send-btc — Send BTC on-chain
afpay ui send [--data-dir <DIR>] [--log <FILTER>...] --network btc [--mode <window|session>] --to <DESTINATION> --amount-sats <SATS> [--wallet <WALLET_ID>] [--onchain-memo <TEXT>] [--local-memo <KEY=VALUE>...]
Arguments across every shape above:
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--network | Network the payment leaves on |
--mode | How this reaches the person: window a browser window is open on this machine; session the session is registered only; open it with afui session open or reach it through afui session serve. Falls back to AFUI_DELIVERY, then window |
--to | Recipient address, BOLT11 invoice, or BOLT12 offer |
--amount | Amount in base units (lamports for SOL, wei for ETH) |
--amount-sats | Amount in satoshis |
--token | native, or a registered token symbol |
--reference | Reference key for order binding (base58-encoded 32 bytes) |
--chain-id | Pin the chain; a mismatched wallet returns wrong_chain |
--wallet | Source wallet ID (auto-selected if omitted) |
--onchain-memo | On-chain memo, sent with the transaction |
--local-memo | Local bookkeeping annotation; bare text is stored as note= |
afpay ui wallet
Open a panel showing every wallet and its balance
afpay ui wallet [--data-dir <DIR>] [--log <FILTER>...] [--wallet <WALLET_ID>] [--network <cashu|ln|sol|evm|btc>] [--cashu-check] [--mode <window|link|session>]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--wallet | Wallet ID (omit to show every wallet) |
--network | Restrict to one network |
--cashu-check | Verify Cashu proofs against the mint; slower but authoritative |
--mode | How this reaches the person: window a browser window is open on this machine; link the page is reachable from this machine’s network at the link URL; session the session is registered only; open it with afui session open or reach it through afui session serve. Falls back to AFUI_DELIVERY, then window |
afpay wallet list
List wallets across every network
afpay wallet list [--data-dir <DIR>] [--log <FILTER>...] [--peer-url <URL>] [--peer-api-key-secret <SOURCE>] [--dry-run] [--network <cashu|ln|sol|evm|btc>]
| Argument | Meaning |
|---|---|
--data-dir | Wallet and data directory |
--log | Log filter to enable; repeat, or pass a comma-separated list |
--peer-url | Run this command on another afpay node instead of locally |
--peer-api-key-secret | The peer’s –rest-api-key-secret; required with –peer-url (the value, or where to read it: env:NAME, file[+FORMAT]:PATH#DOT_PATH, literal:VALUE) |
--dry-run | Preview the command without executing it |
--network | Restrict to one network |
Exit codes
| Code | Meaning |
|---|---|
| 0 | The command ran and succeeded. |
| 1 | The command ran and failed. The event carries a domain error.code. |
| 2 | The invocation was rejected before anything ran. error.code is one of the cli_* codes below. |
The split is the useful one for a caller: exit 2 means the call was never made, so retrying it unchanged cannot help, while exit 1 means it was.
CLI errors
Every structural failure emits one strict JSON kind:"error" event on stderr, leaves stdout empty, and exits 2. The code names the failure — cli_unknown_argument for an unknown spelling, cli_unregistered_combination for registered arguments in a mixture that is not, and one each for cli_unknown_command, cli_missing_argument_value, cli_invalid_argument_value, cli_duplicate_argument, cli_unexpected_positional, and cli_invalid_utf8. message identifies a safe argument spelling or the failure category and hint gives the command to run next; neither ever quotes a raw value, including secrets. These are decided before any config, secret source, filesystem, network, or domain I/O.
Two exit-1 codes describe the tool itself rather than the call: cli_invocation_invalid means the program misread its own resolved invocation — an unknown action id, or an argument id the selected combination cannot produce — and output_setup_failed means an output sink (--stdout-file, --stderr-file, stream redirection) could not be established. Both are defects to report, not inputs to correct; retrying the same command cannot help.
Domain failures (exit 1) carry their own stable error.code instead, drawn from whatever this tool defines rather than from the cli_* set. Error events are routinely logged, so a message never quotes a value that came from an argument able to carry a credential — a header, a cookie, a token, a password, a proxy URL, an environment value, a form field. Such an error names the argument and the shape that was wrong, and stops there. A value that cannot be a secret — a path, a dot-path, a session name — is quoted, because an error that cannot say which one it means is not worth logging either.