Selen
Selen
End-to-end encrypted CLI chat, built in Crystal. All messages are PGP-encrypted before leaving the client — the server routes and stores only ciphertext.
Requirements
- Crystal >= 1.9.0
- GnuPG (
gpg) in PATH - libunibilium (required by the Crysterm TUI library)
- Debian/Ubuntu:
apt install libunibilium-dev - Arch:
pacman -S unibilium - macOS:
brew install unibilium
- Debian/Ubuntu:
Build
make check-deps # verify system dependencies are installed
make # development build — fast, uses all CPU cores
make build-opt # moderate optimization (-O1, all cores) — good balance
make release # full optimization — slow compile, fastest binaries
Binaries are written to ./bin/. Use make during development and make release for distribution.
Quick Start
Server:
./bin/selen-server --init-config # write default config
# edit ~/.config/selen/server.yml to set admin_fingerprint
./bin/selen-server
Client:
./bin/selen-client
# First run generates a PGP keypair automatically.
# Add a server with [a], connect with [1].
How It Works
- Each client holds a PGP keypair; the fingerprint is their identity.
- On connect, clients exchange public keys via the server.
- Messages are PGP-encrypted to all connected recipients before sending.
- The server stores and relays only ciphertext — it cannot read messages.
- Users who join later cannot decrypt messages sent before they arrived.
Terminal Resize & Tiling WMs
The UI reflows on resize via SIGWINCH and a 200 ms size poll. The poll covers tiling window managers (e.g. i3) where toggling between tiling and floating mode changes the terminal size without sending SIGWINCH.
Data Directory
All Selen data is in ~/.config/selen/. To uninstall:
rm -rf ~/.config/selen/
rm ./bin/selen-server ./bin/selen-client
Tests
make test
Docs
docs/architecture.md— system overview, directory layoutdocs/protocol.md— wire protocol (framing, message types, schemas)docs/crypto.md— PGP encryption, key exchange, GPG invocationsdocs/client.md— UI screens, commands, configdocs/server.md— server config, connection lifecycle, keepalivedocs/testing.md— running tests, what each spec covers
Repository
Selen
Owner
Statistic
- 0
- 0
- 0
- 0
- 1
- 6 days ago
- April 8, 2026
License
MIT License
Links
Synced at
Wed, 08 Apr 2026 22:38:22 GMT
Languages