Go to file
2026-05-02 22:09:19 +02:00
menc final version functioning 2026-05-02 22:09:19 +02:00
owner final version functioning 2026-05-02 22:09:19 +02:00
pkg final version functioning 2026-05-02 22:09:19 +02:00
relay final version functioning 2026-05-02 22:09:19 +02:00
sfudp final version functioning 2026-05-02 22:09:19 +02:00
thrembio final version functioning 2026-05-02 22:09:19 +02:00
typio final version functioning 2026-05-02 22:09:19 +02:00
colors.go final version functioning 2026-05-02 22:09:19 +02:00
flake.lock final version functioning 2026-05-02 22:09:19 +02:00
go.mod final version functioning 2026-05-02 22:09:19 +02:00
go.sum final version functioning 2026-05-02 22:09:19 +02:00
main.go final version functioning 2026-05-02 22:09:19 +02:00
README.md final version functioning 2026-05-02 22:09:19 +02:00

whspbrd

Simple end-to-end encrypted terminal chat with a relay server.

Build

go build -o whspbrd

Server

./whspbrd --mode server --listen :9090

Client

First run once to print your identity (share with others):

./whspbrd --mode client --show-identity

Then connect (you need the peer fingerprint and base64 public key):

./whspbrd --mode client --connect 127.0.0.1:9090 --peer <peer-fingerprint> --peer-key <base64-pubkey>

## TUI

```bash
./whspbrd --mode client --tui --connect 127.0.0.1:9090

TUI commands:

  • /add <name> <pubkey> add a contact.
  • /rename <name|fingerprint> <new-name> rename contact.
  • /remove <name|fingerprint> remove contact.
  • /trust <pubkey> trust a peer key.
  • /sendfile <path> send a file.
  • /whoami show your fingerprint.
  • /pubkey show your public key.
  • /help list commands.

TUI navigation:

  • Tab switch focus between Users and Input.
  • Enter send message.
  • Up/Down select contact in Users.
  • PgUp/PgDn scroll chat history.
  • Ctrl+U / Ctrl+D page up/down.
  • Home / End jump to top/bottom of chat.

Self-test

./whspbrd --selftest

During chat, commands:

- `/whoami` shows your fingerprint.
- `/pubkey` shows your base64 public key.
- `/trust <base64-pubkey>` stores a peer key (TOFU).
- `/sendfile <path>` sends a file (images supported).
- `/quit` exits.
- `/list` shows last 50 messages (stored locally).

## Data locations

- Config: `$XDG_CONFIG_HOME/whspbrd` (fallback `~/.config/whspbrd`)
- Data: `$XDG_DATA_HOME/whspbrd` (fallback `~/.local/share/whspbrd`)

Files:

- `identity.key` long-term private key.
- `peers.json` trusted peers for TOFU.
- received files are written into the data directory.
- `messages.db` stores chat history (SQLite).