Run a CLI client
Install iosignal-cli@7.2.0 with Node.js 22.16.0 or later. io-client, io, and iosignal-cli start the same interactive client.
npm install -g iosignal-cli@7.2.0
io-client
io-client -c ws://localhost:7777
io-client -c cong://localhost:8888
io-client -c
io-client -c -j demo,alerts
io-client -h
io-client -V
With no -c, connect to ws://localhost:7777. Bare -c selects the public wss://io.iosignal.net/ws. localhost:7777 is also accepted without ws://. Start a local server in another terminal first.
| Option | Meaning |
|---|---|
-c, --connect [url] | WS, WSS, or CongSocket URL |
-i, --id <id> / -k, --key <key> | Credential pair |
-a, --auth-idKey <id.key> | Combined credentials |
-j, --join-channel <tags> | Initial comma-separated subscriptions |
--timestamps | Show timestamps in interactive logs |
-V, --version / -h, --help | Version / help |
When both ID and key are provided, they take precedence over --auth-idKey. There is no client --timeout option. Example: io-client -i uno -k uno-key or io-client -a uno.uno-key.
Wait for ready: cid: .... Use id to inspect the connection. Anonymous CIDs can change.
Subscribe and publish
In client A enter sub demo. In client B enter pub demo hello world. A prints < -message: demo hello world.
CLI listen and join are aliases for subscribe. They do not register a custom handler like SDK io.listen(tag, handler). Subscriptions are restored on reconnection and removed with unsub.
Interactive commands
Commands are case-sensitive, without a leading dot. Arguments are whitespace-separated; shell quotes and JSON are not parsed. Do not type explanatory comments.
| Command | Action |
|---|---|
help | List commands |
sub <tag> / subscribe / listen / join | Subscribe; commas separate tags |
unsub [tag] | Unsubscribe; omit tag for all |
pub <tag> [args...] / publish | Publish |
sig <tag> [args...] / signal | Send a signal |
sig_bin <tag> <bytes> | Send zero-filled binary, 0–1048576 bytes; server quota still applies |
call <target> <command> [args...] | Call a service |
sudo <command> [args...] | Call the sudo service with server privileges |
auth <id> <key> / login <id> <key> | Configure automatic login / attempt challenge-based login; id.key is also accepted |
hide / show | Hide/show incoming message and CID messages, not control/status responses |
id / ch / quota | Inspect connection, subscriptions, quota |
ping [cid] / pong / pping <cid> | Server ping/pong or peer CID ping |
echo [text] / iam [name] | Echo or nickname; one token for text/name |
encNo / encYes / encAuto / encMode | Set/query encryption mode |
close / open [url] / connect [url] | Close/reopen; closing may trigger automatic reconnection |
quit / exit | Exit |
open keeps the selected transport; restart the client to switch WS/TCP. Use a full cong://host:port URL for TCP reconnection. Echo and ordinary status output appear only in a TTY. Objects, binary, and multiple arguments are displayed; invalid input reports an error without terminating the CLI.