This document contains the detailed reference moved out of README.md.
All commands are available under cocod.
status- Check daemon and wallet statusinit [mnemonic]- Initialize wallet; generates mnemonic if omitted--passphrase <str>encrypt wallet at creation time--mint-url <url>set default mint URL
unlock <passphrase>- Unlock encrypted walletbalance- Get wallet balanceshistory- List history entries--offset <number>default0--limit <number>default20, max100--watchstream real-time updates after initial fetch
receive cashu <token>- Receive a Cashu tokenreceive bolt11 <amount>- Create a Lightning invoice--mint-url <url>override default mint for this request
send cashu <amount>- Create a Cashu token to send--mint-url <url>override default mint
send bolt11 <invoice>- Pay a Lightning invoice--mint-url <url>override default mint
mints add <url>- Add mint URLmints list- List configured mintsmints info <url>- Fetch mint metadata
npc address- Get your NPC Lightning addressnpc username <name>- Begin username purchase flow--confirmconfirm payment and complete purchase
x-cashu parse <request>- Parse an encoded payment requestx-cashu handle <request>- Settle request and returnX-Cashu: cashuB...header value
ping- Check daemon connectivitydaemon- Start daemon in foregroundstop- Stop daemon
The CLI talks to the daemon over HTTP on a UNIX socket.
- Base directory env var:
COCOD_DIR(default~/.cocod) - Socket path env var:
COCOD_SOCKET(default<COCOD_DIR>/cocod.sock)
- Success:
{ "output": <value> } - Error:
{ "error": "message" }
GET /pingGET /statusPOST /initPOST /unlockGET /balancePOST /receive/cashuPOST /receive/bolt11POST /send/cashuPOST /send/bolt11POST /x-cashu/parsePOST /x-cashu/handlePOST /mints/addGET /mints/listPOST /mints/infoGET /historyGET /events(SSE stream)GET /npc/addressPOST /npc/usernamePOST /stop
For full request/response and status details, see docs/daemon-api.json.