Skip to main content

Send your first message with the CLI

Use Node.js 22.16.0 or later and iosignal-cli 7.2.0. You need three terminals.

Install and start a server​

npm install -g iosignal-cli@7.2.0
io-server -l 7777

Leave terminal 1 running. Stop the server with Ctrl+C.

Connect two clients​

Run this in terminals 2 and 3:

io-client -c ws://localhost:7777

Wait for ready and a CID in each client. Anonymous CIDs can change between connections.

Send to a channel​

In client 2:

listen demo

In client 3:

signal demo hello

The receiver prints < -message: demo hello. Every subscriber to the exact tag demo receives the message.

Send directly to a CID​

Enter id in the receiver to find its CID. Replace actualCID below with that value, including a leading ? for an anonymous CID:

signal actualCID@ hello

The receiver displays a direct message tagged @. No subscription is required. See signal tags.

Exit a client with exit, quit, or Ctrl+C. CLI arguments are split on whitespace; shell quoting and JSON are not parsed by the interactive prompt. Do not append explanatory comments to commands.

Continue with client commands, server options, and authentication. For Arduino, add -L 8888 to the server and use matching TCP settings on the board.