Skip to main content

Terminal messaging platform — chat, share files, play games, all from your CLI

Project description

⚡ trmsg

Terminal messaging. Chat. Share files. Play games. All from your CLI.

pip install trmsg

Features

Feature Command
💬 Real-time chat trmsg chat
📁 File sharing (200MB) /sendfile photo.jpg
👥 Friends & DMs /add username
🤖 AI Assistant (Gemini) /ai what is python?
💣 Self-destruct messages /burn 30 secret message
🎮 TicTacToe /game ttt opponent
♟️ Chess /game chess opponent
🧠 Quiz Battle /game quiz
🏆 Leaderboard /leaderboard
📊 Polls /poll "Q?" A | B | C
😀 Reactions /react 5 👍
↩️ Reply to messages /reply 5 good point!
🔔 Keyword alerts /alert homework
🌙 Do Not Disturb /dnd 11pm-7am
🎨 Themes /theme matrix
🔗 Invite links /invite create
📋 Message search /search-msg keyword
💻 Code sharing /code python print("hi")
📣 Announcements /announce Important update!
👑 Roles Owner / Admin / VIP / Member

Quick Start

# Install
pip install trmsg

# Connect to a server
trmsg config

# Register
trmsg register

# Chat!
trmsg chat

Self-Host Server

pip install "trmsg[server]"

# Setup
echo "SECRET_KEY=$(python3 -c 'import secrets; print(secrets.token_hex(32))')" > .env
echo "DATABASE_URL=sqlite+aiosqlite:///./trmsg.db" >> .env
echo "GEMINI_API_KEY=your-key-here" >> .env  # optional AI
mkdir uploads

# Start
trmsg-server

Friends connect: trmsg config → enter your IP → trmsg registertrmsg chat


AI Commands

/ai what is async/await?
/ai summarize                    # summarize last 50 messages
/ai translate Japanese hello     # translate text
/ai explain def foo(): pass      # explain code
/ai roast janak                  # friendly roast 😈

Powered by Gemini 1.5 Flash (free). Add GEMINI_API_KEY to server .env.


Game Commands

/game ttt rohan        # TicTacToe vs rohan
/game chess priya      # Chess vs priya
/game quiz             # Quiz battle (room plays together)

/move <id> 5           # TTT: pick cell 1-9
/move <id> e2e4        # Chess: algebraic notation
/answer B              # Quiz: answer A/B/C/D

/leaderboard           # Overall rankings
/leaderboard ttt       # Game-specific rankings
/mystats               # Your personal stats

All CLI Commands

trmsg register       trmsg login         trmsg logout
trmsg chat           trmsg chat <user>   (DM someone)
trmsg friends        trmsg users         trmsg rooms
trmsg add <user>     trmsg whois <user>  trmsg stats
trmsg leaderboard    trmsg profile       trmsg config

Themes

/theme cyberpunk    # neon green (default)
/theme matrix       # matrix falling code style
/theme ocean        # cool blue tones
/theme sunset       # warm red/yellow
/theme hacker       # deep green hacker
/theme minimal      # clean white

Installing on Restricted Computers (College / No Admin)

If you get permission denied or websockets not found errors on a college or shared computer, use one of these methods. No admin rights needed.


✅ Method 1 — Virtual Environment (Recommended)

Works on any computer. Zero admin rights needed.

# Create a virtual environment in your home folder
python3 -m venv ~/trmsg-env

# Activate it
source ~/trmsg-env/bin/activate        # Linux / Mac / Android
# OR on Windows:
# ~/trmsg-env/Scripts/activate

# Install freely — no permission errors
pip install websockets==12.0
pip install trmsg

# Use trmsg
trmsg config
trmsg register
trmsg chat

Every time you open a new terminal, activate first:

source ~/trmsg-env/bin/activate

Method 2 — User Install (--user flag)

If venv doesn't work, install to your personal folder:

# Install with --user flag (no admin needed)
python3 -m pip install --user websockets==12.0
python3 -m pip install --user trmsg

If trmsg command is not found after install:

# Add user bin to PATH
export PATH="$HOME/.local/bin:$PATH"

# Make it permanent
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

Method 3 — Install Dependencies Manually

If you get missing package errors, install each one manually:

python3 -m pip install --user --upgrade pip
python3 -m pip install --user websockets==12.0
python3 -m pip install --user httpx==0.27.0
python3 -m pip install --user rich==13.7.0
python3 -m pip install --user click==8.1.7
python3 -m pip install --user python-jose==3.3.0
python3 -m pip install --user pydantic==2.6.0
python3 -m pip install --user trmsg

Common Errors & Fixes

Error Fix
Permission denied Add --user flag or use venv
trmsg: command not found Run export PATH="$HOME/.local/bin:$PATH"
No module named websockets pip install --user websockets==12.0
pip: command not found Use python3 -m pip instead of pip
Python version too old Need Python 3.10+. Check: python3 --version
externally-managed-environment Use venv (Method 1) — this is a system Python restriction

Quick Check — Is Everything Installed?

python3 -c "import websockets, httpx, rich, click; print('✓ All good!')"

Deploy to Render (Free)

  1. Push to GitHub
  2. Render → New Web Service → connect repo
  3. Build: pip install ".[server]"
  4. Start: trmsg-server
  5. Env vars: SECRET_KEY, DATABASE_URL, GEMINI_API_KEY

Share URL → friends install trmsg → connect → chat! 🎉


Built with FastAPI · SQLAlchemy · WebSockets · Rich · Click · Gemini AI

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

trmsg-1.0.2.tar.gz (47.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

trmsg-1.0.2-py3-none-any.whl (49.1 kB view details)

Uploaded Python 3

File details

Details for the file trmsg-1.0.2.tar.gz.

File metadata

  • Download URL: trmsg-1.0.2.tar.gz
  • Upload date:
  • Size: 47.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for trmsg-1.0.2.tar.gz
Algorithm Hash digest
SHA256 ad7b42ea46b5dfd197e862d1592422d7d10ea4395f254d9c42afda71a0de8550
MD5 05d2f502068c67a2d688606e5099780f
BLAKE2b-256 9cd67003a275381709af88828e36ba8d31b4dcded89147f28b6301cb62f83e7e

See more details on using hashes here.

File details

Details for the file trmsg-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: trmsg-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 49.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for trmsg-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f475a16adaa5c9ce95abddcdcab80f65bcd21430684a2db6a1c89a410cb9f841
MD5 503d85863e575f337f8d47d7013a681a
BLAKE2b-256 0b179be87ee9ab0c834e3845017a72f4ceb2b134fde5a19d886e74756a5e3c69

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page