cgram@terminal: ~
██████╗██████╗ ██████╗ █████╗ ███╗ ███╗
██╔════╝██╔═══╝ ██╔══██╗██╔══██╗████╗ ████║
██║ ██║ ██╗ ██████╔╝███████║██╔████╔██║
██║ ██║ ██║██╔══██╗██╔══██║██║╚██╔╝██║
╚██████╗╚█████╔╝██║ ██║██║ ██║██║ ╚═╝ ██║
╚═════╝ ╚════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝
user@cgram
──────────
server:server.cgram.live
status:connected
e2e: enabled
# Quick navigation
/* FEATURES */
$ cgram --help
Usage: cgram [options]
Options:
--encrypt
E2E Encryption - X3DH key exchange + NaCl secretbox (XSalsa20 + Poly1305)
--websocket
Real-time - WebSocket + Protobuf binary protocol for minimal overhead
--local
Local Storage - SQLite-backed message history. Data stays on your machine.
--notify
Notifications - Native OS notifications on macOS, Linux, and Windows
--vim
Vim Mode - Command mode with :add, :rename, :delete, j/k navigation
--reconnect
Auto-reconnect - Seamless reconnection on network interruption
/* INSTALLATION */
select method: | | |
~/darwin
$ curl -Lo cgram https://github.com/isalikov/cgram-cli/releases/latest/download/cgram-darwin-arm64
$ chmod +x cgram
$ sudo mv cgram /usr/local/bin/
# verify installation
$ cgram --version
/* KEYBOARD SHORTCUTS */
keybindings:
<Tab>switch between contacts and chat
<j/k>navigate contacts / scroll messages
<Enter>open chat / send message
<Shift+Enter>new line in message
<:>enter command mode
<?>show help overlay
<Esc>close overlay
<Ctrl+C>quit application
commands:
:add <user>add a contact by username
:rename <name>rename selected contact
:deletedelete selected contact
:iddisplay your user ID
:helpshow all commands
:quitexit cgram
# tip: use vim-style navigation for a seamless terminal experience
/* ARCHITECTURE */
zero-knowledge design
The server is a stateless relay. It never sees your message content, only encrypted blobs. All encryption and decryption happens client-side.
┌─────────────────┐ ┌─────────────────┐ │ │ │ │ │ YOUR DEVICE │ │ THEIR DEVICE │ │ │ │ │ │ ┌───────────┐ │ ┌───────────────┐ │ ┌───────────┐ │ │ │ encrypt() │──┼────►│ RELAY SERVER │────►┼──│ decrypt() │ │ │ └───────────┘ │ │ │ │ └───────────┘ │ │ │ │ ░░░░░░░░░░░░░ │ │ │ │ private key │ │ encrypted blob│ │ private key │ │ ████████████ │ │ ░░░░░░░░░░░░░ │ │ ████████████ │ │ │ └───────────────┘ │ │ └─────────────────┘ └─────────────────┘
# key exchange
X3DH
Extended Triple Diffie-Hellman
# encryption
NaCl secretbox
XSalsa20 + Poly1305 MAC
# transport
WebSocket + Protobuf
Binary protocol, minimal overhead
/* ECOSYSTEM */
cgram is fully open source. inspect the code, run your own server, contribute.
# clone all repos
$ git clone https://github.com/isalikov/cgram-cli.git