Skip to main content

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

  • 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 scrypt key 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_toolkit with Alt+Enter multi-line editing (or /multiline toggle).
    • Live bottom status bar showing connection state, active #room, E2EE badge, online count, logging state, and live typing... 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.
  • Rich Markdown, DMs & Presence: Send formatted Markdown, encrypted DMs (/msg), audio/mention alerts (/mute to toggle), auto-away status, and /who user 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-store to opt out).
  • Local Logs, History & Search: Saves sanitized transcripts to ~/.bstkchat/logs/<room>.log with /history, /search, /log on|off|ephemeral, and saved preferences in ~/.bstkchat/config.json.

Installation

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

  1. Launch bstkchat:
    bstkchat
    
  2. Enter your Nickname (or press Enter for a random User-XXX name).
  3. Enter a Room ID (e.g., dev-sync-42) or press Enter to use the generated phonetic ID (e.g., quantum-beacon-55).
  4. Enter a Room Password to enable AES-256-GCM E2EE.
  5. 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 scrypt and 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 off if you do not want transcripts saved to disk.

Metadata

Release files for bstkchat 2.4.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bstkchat 2.4.3
File Size Uploaded Provenance Actions
bstkchat-2.4.3.tar.gz 41.6 kB Without provenance Details for bstkchat-2.4.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bstkchat 2.4.3
File Interpreter ABI Platform Actions
bstkchat-2.4.3-py3-none-any.whl Python 3 none any Details for bstkchat-2.4.3-py3-none-any.whl

Total release size: 76.3 kB

Release files / bstkchat-2.4.3.tar.gz

Download URL bstkchat-2.4.3.tar.gz
Size 41.6 kB
Tags Source
SHA-256 checksum
How to use checksums
06ccde016123726028a6ce507b0564a018d11983779ce439a7a5ba09ad5a5162
BLAKE2b-256 checksum
How to use checksums
41987953569364e4675db4c90bf6f0a7a9b2209f0053438deebf2a57ed9bdb3f
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.4.3-py3-none-any.whl

Download URL bstkchat-2.4.3-py3-none-any.whl
Size 34.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
56ca084a52b1e8d016c5ded348ecd0c2f022d5e5957fc5859c7045384c00e28b
BLAKE2b-256 checksum
How to use checksums
c180fc0e73af3f45461fd4b941aa4a8abcc8b498de693e24658667bd36bd25eb
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.4.3

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page