Two devices, one channel
Start bnw node start on two computers attached to the same LAN. They should discover one another through mDNS and log peer discovery and connection events.
On device A, create a channel:
bnw channel create "Test channel"The first output line is the channel ID. On device B, subscribe using that ID:
bnw channel join <CHANNEL_ID>After the subscription has propagated, post from device A:
bnw channel post <CHANNEL_ID> "Hello from device A" \ --idempotency-key channel-demo-1Public channel posting now uses the running node’s local API. The node requires the
validated channel record before it signs a message, so a newly joined device may
need to wait briefly for synchronization. Repeating the exact command with the
same idempotency key returns the original message ID and created: no; changing
the request while reusing the key is rejected.
Read the replicated message on device B. Results use stable chronological order and each line starts with the message content ID:
bnw channel read <CHANNEL_ID> --limit 32Replies are signed channel messages linked to an existing message in the same channel:
bnw channel post <CHANNEL_ID> "Reply from device B" \ --reply-to <MESSAGE_ID> \ --idempotency-key channel-demo-2For longer histories, request a smaller page and continue with the printed
next-after message ID:
bnw channel read <CHANNEL_ID> --limit 10bnw channel read <CHANNEL_ID> --limit 10 --after <NEXT_AFTER_MESSAGE_ID>To start from the latest messages, add --newest. The feed’s newest_first query field does the same through the API: pages come newest first, and next-after continues further back in time through the same order, without gaps or repeats. Nodes that predate the field ignore it and page oldest first.
Other useful commands are:
bnw channel listbnw peersbnw peers --connectedbnw object get <CONTENT_ID>bnw --helpWith a running node, bnw peers shows whether each known peer is connected or offline right now. --connected lists only live connections. Without a running node, it lists known peers from the database without connection state, and --connected reports that none are connected. The dashboard’s Peers card has the same Connected only toggle.
