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.3.tar.gz (47.4 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.3-py3-none-any.whl (49.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for trmsg-1.0.3.tar.gz
Algorithm Hash digest
SHA256 74fd9b5f38158a75ac4510870d094e616fa57b81cf652543b066c5c3cb55606b
MD5 af53acbd3c8cb60d216d28b7e36e214c
BLAKE2b-256 edd4f52291706e3a2c51e565728e906c7fda58630cb917a6445f0b3c453abb9a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: trmsg-1.0.3-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.13

File hashes

Hashes for trmsg-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 99b42885e3aaa00929e80bc1492a977ec5ca24d09608b7a7791afb3a2ba0ba83
MD5 6e18eaab7b71dfbd22411b1d09a7343f
BLAKE2b-256 462fd05fa8d6a43550f4026335ae9366f210d570fedaec773420f27212e6305c

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