BSTK Chat (bstkchat)
BSTK Chat is a real-time, zero-configuration terminal chat client with optional AES-256-GCM end-to-end encryption (E2EE), Rich Markdown rendering, and a modern interactive TUI. Anyone who launches bstkchat and enters the same Room ID (and optional password) joins a shared room instantly—no server setup required.
Features
- Mobile & Browser Web App (PWA on GitHub Pages): Open https://btkcreations.github.io/BSTKCHAT/ on any phone or browser and tap Install to Home Screen—connects via MQTT over Secure WebSockets (
wss://broker.hivemq.com:8884/mqtt) with compatible AES-256-GCM E2EE so mobile and terminal users chat in the same rooms. - Browser Web UI (
--web//web): Launch a local, token-authenticated browser interface (bstkchat --web) with Dark/Light themes, live peer sidebar, file drag-and-drop, and SSE real-time updates—while keeping all E2EE and decentralized chain storage locally on your machine. - Zero Configuration + CLI Flags: Connects automatically over MQTT (
broker.hivemq.com) with TLS (8883) enabled by default, or use--nick,--room,--password,--broker,--port,--no-tls,--web, and--web-port. - End-to-End Encryption (E2EE): Protect rooms with a password using
scryptkey derivation, per-message random 96-bit nonces, AES-256-GCM authenticated encryption, and topic-bound AAD. - Encrypted File Sharing: Send files up to 512 KB with
/send <filepath>, verified with SHA-256 and saved safely via/accept [id]. - Modern Terminal UI/UX:
- Non-blocking input powered by
prompt_toolkitwithAlt+Entermulti-line editing (or/multilinetoggle). - Live bottom status bar showing connection state, active
#room, E2EE badge, online count, logging state, and livetyping...indicators. - Switchable toolbar themes (
/theme dark|light|ansi) and compact single-line mode (/compact). - Context-aware autocomplete for
/commands,/msg,/accept,/theme,/log, and@mentions, plus↑/↓command history.
- Non-blocking input powered by
- Rich Markdown, DMs & Presence: Send formatted Markdown, encrypted DMs (
/msg), audio/mention alerts (/muteto toggle), auto-away status, and/whouser tables. - Decentralized Encrypted Room Chain & Peer Sync: Every room maintains an append-only, SHA-256 hash-linked encrypted store (
~/.bstkchat/chains/<room>.json) on each participant's device. When new peers join, online peers automatically sync missing encrypted messages (/chain,/sync, or--no-storeto opt out). - Local Logs, History & Search: Saves sanitized transcripts to
~/.bstkchat/logs/<room>.logwith/history,/search,/log on|off|ephemeral, and saved preferences in~/.bstkchat/config.json.
Installation
Option 1: Using uv (Recommended)
Run without installing:
uvx bstkchat
Or install globally:
uv tool install bstkchat
bstkchat
Option 2: Using pip
pip install bstkchat
bstkchat
Option 3: From Source
git clone https://github.com/BTKcreations/BSTKCHAT.git
cd BSTKCHAT
pip install .
bstkchat
Quick Start & Examples
1. Start a Private Encrypted Room
- Launch
bstkchat:bstkchat
- Enter your Nickname (or press
Enterfor a randomUser-XXXname). - Enter a Room ID (e.g.,
dev-sync-42) or pressEnterto use the generated phonetic ID (e.g.,quantum-beacon-55). - Enter a Room Password to enable AES-256-GCM E2EE.
- Share the Room ID and Password with your teammates—anyone with both can join and decrypt messages.
2. Example In-Chat Workflow
# Send Rich Markdown and code snippets
Alice > Hey @Bob, check this: `pip install bstkchat`
# Send an encrypted private Direct Message to Bob
Alice > /msg Bob Can you review PR #12?
# Set your status
Alice > /status In a meeting
# Switch to another encrypted room (use quotes for passwords with spaces)
Alice > /room release-ops "my secret passphrase"
# Check who is online
Alice > /who
# Pause local logging
Alice > /log off
Use Cases
- Quick Developer Syncs: Spin up a temporary room in seconds from any terminal without opening a browser or creating an account.
- Pair Programming & Code Sharing: Share formatted Markdown and code snippets directly in the terminal while staying in your coding workflow.
- Ad-Hoc Encrypted Discussions: Use a shared passphrase for private conversations where payloads are encrypted before leaving your terminal.
- Remote / SSH / Headless Environments: Chat from minimal Linux/Windows/macOS terminals or over SSH sessions where GUI chat apps aren't available.
Slash Commands
| Command | Description |
|---|---|
/help |
Displays a formatted table of all available commands |
/room <id> [password|--lock] |
Switches rooms; use --lock to prompt for password without saving it in history |
/nick <name> |
Changes your nickname and notifies peers in the room |
/msg <user> <message> |
Sends an encrypted private direct message (DM) to a user |
/send <filepath> |
Sends an encrypted file (up to 512 KB) with SHA-256 verification |
/accept [id] |
Accepts a pending file transfer and saves it to ~/Downloads/bstkchat/ |
/status <text> |
Sets your custom status message (e.g., AFK, Coding) |
/who or /users |
Lists all online participants, statuses, and last-seen times |
/invite |
Prints a copyable bstkchat --room ... command to invite others |
/history [N] |
Displays the last N lines (default 15) from the room's local log |
/search <query> |
Searches the current room's local log file |
/chain |
Shows the decentralized room chain block count, integrity check, and path |
/sync [N] |
Requests up to N missing encrypted messages from online peers |
/log [on|off|ephemeral] |
Controls local logging (ephemeral deletes the room log on exit) |
/mute |
Toggles terminal bell alerts for mentions, DMs, and file offers |
/compact |
Toggles compact single-line message rendering |
/multiline |
Toggles multi-line input (Enter = newline, Alt+Enter = send) |
/theme <dark|light|ansi> |
Switches the bottom status bar theme |
/web |
Opens the local browser Web UI for the active session |
/clear |
Clears the terminal screen and redraws the room banner |
/exit or /quit |
Announces departure and exits cleanly |
Security Notes
- Password-protected rooms derive a 256-bit key with
scryptand encrypt each message using AES-256-GCM with a unique random 96-bit nonce and room-topic AAD. - Public rooms (no password) still use a room-derived key for transport formatting, so anyone who knows the Room ID can read messages—always set a password for confidential chats.
- Local logs are stored in plain text under
~/.bstkchat/logs/when logging is enabled; use/log offif you do not want transcripts saved to disk.
Metadata
Release files for bstkchat 2.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bstkchat-2.5.0.tar.gz | 47.2 kB | Without provenance | Details for bstkchat-2.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bstkchat-2.5.0-py3-none-any.whl | Python 3 | none | any | Details for bstkchat-2.5.0-py3-none-any.whl |
Total release size: 86.9 kB
Release files / bstkchat-2.5.0.tar.gz
| Download URL | bstkchat-2.5.0.tar.gz |
|---|---|
| Size | 47.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7c35d29943ed03cab74afde08be4a911dbdebdea79afca26031f7bf491b92bf2
|
|
BLAKE2b-256 checksum How to use checksums |
ff03a35c176381630fcee6f4db287b7b200193e762b0c3e166aea5ad3b1e1835
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|
Release files / bstkchat-2.5.0-py3-none-any.whl
| Download URL | bstkchat-2.5.0-py3-none-any.whl |
|---|---|
| Size | 39.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3447073d21a4e191909baef25c404104d22aaa69ce7be69f64a3957e4f9b2dba
|
|
BLAKE2b-256 checksum How to use checksums |
57b583d972e02548daa76accf2899b54b4a9a1cc0d135786b3478529ea4bc167
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|
Security for bstkchat 2.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.