CLI client
The rChat CLI client provides full-featured end-to-end encrypted messaging from the terminal. A TUI (terminal user interface) version is also available for a more visual experience.
Prerequisites
Section titled “Prerequisites”- A running rChat server (see Server Quick Start)
- The server WebSocket address (e.g.
wss://your-server.com)
Installation
Section titled “Installation”Download the binary for your platform:
# macOS Universalcurl -LO https://github.com/PDG-Global/rchat/releases/latest/download/rchat-cli-macos-universalchmod +x rchat-cli-macos-universalsudo mv rchat-cli-macos-universal /usr/local/bin/rchat-cli
# Linux x86_64curl -LO https://github.com/PDG-Global/rchat/releases/latest/download/rchat-cli-x86_64-linux-gnuchmod +x rchat-cli-x86_64-linux-gnusudo mv rchat-cli-x86_64-linux-gnu /usr/local/bin/rchat-cli
# Linux ARM64curl -LO https://github.com/PDG-Global/rchat/releases/latest/download/rchat-cli-aarch64-linux-gnuchmod +x rchat-cli-aarch64-linux-gnusudo mv rchat-cli-aarch64-linux-gnu /usr/local/bin/rchat-cli
# FreeBSD x86_64fetch https://github.com/PDG-Global/rchat/releases/latest/download/rchat-cli-x86_64-freebsdchmod +x rchat-cli-x86_64-freebsdsudo mv rchat-cli-x86_64-freebsd /usr/local/bin/rchat-cliQuick start
Section titled “Quick start”1. Generate your identity key
Section titled “1. Generate your identity key”rchat-cli keygenThis creates an Ed25519 identity key pair stored in ~/.config/rchat/identity.key. The private key never leaves this file.
2. Connect
Section titled “2. Connect”rchat-cli --server wss://your-server.comThe client will connect, publish your public key, and present an interactive prompt.
3. Start a conversation
Section titled “3. Start a conversation”/chat <contact-identity-key>The client performs the X3DH handshake automatically. Once established, type messages and press Enter to send.
Commands
Section titled “Commands”| Command | Description |
|---|---|
/chat <key> | Start a conversation with a contact |
/contacts | List known contacts |
/status | Show connection status |
/quit | Exit the client |
TUI version
Section titled “TUI version”For a richer terminal experience with a sidebar, message history, and contact list:
rchat-cli-tui --server wss://your-server.comNavigation:
Tab— Switch between contact list and message pane↑/↓— Navigate contacts or message historyEnter— Send messageq— Quit
Configuration file
Section titled “Configuration file”Create ~/.config/rchat/client.toml to avoid passing flags:
server = "wss://your-server.com"identity_key = "~/.config/rchat/identity.key"log_level = "info"Then simply run:
rchat-cliTroubleshooting
Section titled “Troubleshooting”“Connection refused”
Section titled ““Connection refused””- Verify the server is running
- Check the server address includes
wss://(notws://orhttps://) - Ensure port 443 is open on the server
“TLS handshake failed”
Section titled ““TLS handshake failed””- Verify the server’s TLS certificate is valid and not expired
- Check that the hostname in the server address matches the certificate
“Identity key not found”
Section titled ““Identity key not found””- Run
rchat-cli keygenfirst - Or specify the path with
--identity-key
For more troubleshooting help, see the Troubleshooting Guide.