Foked this from @emilycodestar and i think its really something everybody needs, esp at school, no internet access needed you just need to be in the same network now, n yes its fully functional. This is the updated version i ran some advancements to suite my needs and im finding it really helpful.
CMD Chat is a modern, feature-rich console communication platform with multiple rooms, beautiful UI, and enterprise-grade security. Building on the original concept while adding significant improvements for usability and functionality.
Privacy: Fully anonymous chat with end-to-end encryption, impossible to intercept or hand over. All data exists only in RAM and is wiped after the session ends. Message persistence with optional encrypted history.
- Create and join different chat rooms (general, random, tech)
- Switch between rooms seamlessly with
/join <room> - Room-specific user lists and message history
- Public and private room support
- 4 Color Themes: Dark, Light, Colorful, and Neon
- Rich terminal formatting with panels, tables, and markdown
- Real-time user indicators and connection status
- Emoji support with keyboard shortcuts (
:)βπ) - Timestamp display and user @mentions
- Upgraded Cryptography: RSA 2048-bit (upgraded from 512)
- Modern Encryption: AES-128 with PBKDF2 key derivation
- Rate Limiting: Anti-spam protection (10 messages/minute)
- Better Error Handling: Robust reconnection with exponential backoff
- Performance Optimized: Smooth 60fps rendering, efficient memory usage
/help- Interactive help with examples/rooms- List available rooms with user counts/join <room>- Switch to a different room/users- Show who's in the current room/theme <name>- Change color theme/nick <name>- Change your username/status- Connection and performance statistics/clear- Clear the screen/history- View message history
- End-to-End Encryption: RSA 2048-bit + AES-128 symmetric encryption
- Memory-Only Storage: Data wiped on session end
- No Logging: Zero persistent logs or traces
- Perfect Forward Secrecy: Each session uses fresh keys
- Rate Limiting: Anti-spam and DoS protection
- Input Sanitization: XSS and injection protection
- Python 3.8 or higher
- pip package manager
-
Clone the repository:
git clone https://github.com/Knighty7-ciper/cmd-chat cd cmd-chat-main -
Install dependencies:
# Linux/macOS python -m venv venv && source venv/bin/activate && pip install -r requirements.txt # Windows (PowerShell) python -m venv venv; .\venv\Scripts\activate; pip install -r requirements.txt
# Basic server with password protection python cmd_chat.py serve 0.0.0.0 8000 --password mysecret # Server with custom rooms python cmd_chat.py serve 0.0.0.0 8000 --password mysecret --rooms general random tech dev # Development server (no password, debug logging) python cmd_chat.py serve localhost 8000 --dev# Basic connection python cmd_chat.py connect localhost 8000 alice mysecret # With custom theme and initial room python cmd_chat.py connect localhost 8000 bob mysecret --theme colorful --room tech # No colors (plain text mode) python cmd_chat.py connect localhost 8000 charlie mysecret --no-colors/rooms # List all available rooms /join random # Switch to 'random' room /users # See who's in current room /status # View connection stats /theme dark # Switch to dark theme /theme colorful # Switch to colorful theme /nick newname # Change username /clear # Clear screen - Emoji Shortcuts: Type
:),:D,<3for instant emoji - Actions:
/me wavesfor action messages - History:
/historyto see recent messages - System Commands: Automatic join/leave notifications
| Command | Description |
|---|---|
python cmd_chat.py serve <ip> <port> | Start server |
--password <pass> | Set admin password |
--rooms <list> | Custom default rooms |
--no-history | Disable message history |
| Command | Description | Aliases |
|---|---|---|
/help | Show help menu | /h, /? |
/rooms | List available rooms | /r, /room |
/join <room> | Switch to room | /j, /go |
/users | Show room users | /u, /who |
/theme <name> | Change theme | /colors, /style |
/nick <name> | Change username | /name, /username |
/status | Show connection status | /s |
/clear | Clear screen | /cls |
/history | View message history | /hist, /log |
/quit | Leave chat | /q, /exit, /leave |
dark- Classic dark theme (default)light- Clean light themecolorful- Vibrant color schemeneon- Bright neon cyberpunk style
- Message Rate Limit: 10 messages per minute per user
- Max Message Length: 1000 characters
- History Retention: Configurable (default: 10,000 messages)
- Connection Timeout: 10 seconds
- Reconnect Attempts: 5 with exponential backoff
- Encryption: RSA 2048-bit + AES-128
- Key Derivation: PBKDF2 with 100,000 iterations
- Memory Wipe: Automatic on session end
- Input Sanitization: Enabled by default
- Sanic Web Framework: High-performance async web server
- WebSocket Management: Real-time bidirectional communication
- Room Management: Multiple room support with user tracking
- Cryptography Service: RSA key exchange + AES encryption
- Message History: Optional persistent encrypted storage
- Rich Terminal UI: Beautiful formatting with colors and panels
- WebSocket Client: Robust connection management
- Command Parser: Interactive command system
- Theme Engine: Multiple color schemes
- Message Renderer: Real-time message display
cmd_chat/ βββ __init__.py # Main entry point βββ server/ β βββ server.py # Server with room support β βββ models.py # Data models β βββ services.py # Legacy services (deprecated) βββ client/ βββ client.py # Client application βββ config.py # UI and feature configuration βββ core/ βββ crypto.py # Cryptography service βββ rich_renderer.py # Rich terminal renderer βββ default_renderer.py # Basic renderer export CHAT_HOST=0.0.0.0 # Server host export CHAT_PORT=8000 # Server port export JWT_SECRET=your-secret # JWT secret (production)Connection Refused
- Ensure server is running:
python cmd_chat.py serve localhost 8000 --password pass - Check firewall settings
- Verify IP and port are correct
Authentication Failed
- Double-check password matches server configuration
- Ensure password parameter is provided
Themes Not Working
- Install rich library:
pip install rich - Try
--no-colorsfor plain text mode
Performance Issues
- Reduce message history: Use
--no-historyon server - Limit concurrent users per room
- Check network connectivity
Enable debug logging:
python cmd_chat.py serve localhost 8000 --password pass --dev