Skip to main content

Secure terminal-based chat application with image sharing for real-time communication

Project description

gupsup

A secure terminal-based chat application with image sharing for real-time communication โ€” right from your terminal.

PyPI Downloads PyPI version Python version

Learn more and explore detailed info at gupsup-cli

Looking for the server? See gupsup-server

โšก Quick Start

pip install gupsup
gupsup

PyPI

That's it! Start chatting instantly.

Features

  • Zero-friction setup - Just run gupsup and start chatting instantly
  • End-to-end encryption - AES-256-GCM encryption with PBKDF2 key derivation
  • Image sharing - Send and receive images (PNG, JPG, GIF, BMP, WebP) up to 2MB
  • Secure channels - Create private rooms with shareable 6-character codes
  • Auto-reconnection - Handles network issues gracefully with smart retry logic
  • Cross-platform - Works seamlessly on Windows, macOS, Linux
  • No account required - Completely anonymous, no sign-up needed
  • Smart image handling - Automatic format detection, metadata preservation

Usage

# Install once
pip install gupsup

# Run anywhere
gupsup

Example Session

gupsup - Secure Communication Channel
Channel code (or 'new' to create): new
Channel created: a4b2c1
Share code 'a4b2c1' with others to join
Username: qwerty

Establishing connection...
๐ŸŸข Connected to channel: a4b2c1
Commands:
  - Type messages to send
  - '/image <path>' to send image
  - '/save [filename]' to save last received image
  - 'quit' to exit

qwerty: Hello world!
mrrobot: Hey there!
qwerty: /image photo.jpg
Processing image...
Image sent: photo.jpg
alice sent an image:
   โ””โ”€ File: vacation.png
   โ””โ”€ Type: image/png
   โ””โ”€ Size: 245.3KB
   โ””โ”€ Use '/save vacation.png' to save this image
qwerty: /save my_vacation.png
Image saved to: e:\downloads\my_vacation.png
qwerty: quit
Terminating session.

How It Works

  1. Create or join a secure channel with a 6-character code
  2. Share the code with people you want to chat with
  3. Chat securely - messages are only sent to your channel
  4. No persistence - messages disappear when you disconnect

Security & Privacy

  • Military-grade encryption - AES-256-GCM with authenticated encryption
  • Secure key derivation - PBKDF2 with 100,000 iterations and SHA-256
  • Channel isolation - Each channel has its own unique encryption key
  • Zero server knowledge - Server cannot decrypt messages or images
  • Ephemeral messaging - No message storage, everything is real-time only
  • Complete anonymity - No accounts, no tracking, no data collection
  • Perfect forward secrecy - Unique nonces ensure message security

Encryption Technical Details

  • Algorithm: AES-256-GCM (Galois/Counter Mode)
  • Key Size: 256-bit encryption keys
  • Nonce: 96-bit random nonce per message
  • Authentication: Built-in message authentication
  • Key Derivation: PBKDF2-HMAC-SHA256 with 100k iterations

Development Install

# Clone the repository
git clone https://github.com/iamRahul21/gupsup.git
cd gupsup

# Install in development mode
pip install -e .

# Run the application
gupsup

Server Setup (Optional)

# For hosting your own server
git clone https://github.com/iamRahul21/gupsup-server.git
cd gupsup-server
pip install -r requirements.txt
python main.py

Available Commands

Chat Commands

  • Send message: Simply type your message and press Enter
  • Exit: quit, exit, /quit, or /exit
  • Force quit: Press Ctrl+C

Image Commands

  • Send image: /image <path>
    • Example: /image ~/Pictures/photo.jpg
    • Example: /image C:\Users\Me\Desktop\image.png
  • Save received image: /save [custom_filename]
    • Example: /save (uses original filename)
    • Example: /save my_photo.jpg (custom filename)

Image Support Details

Feature Details
Formats PNG, JPG/JPEG, GIF, BMP, WebP
Size Limit 2MB per image (optimized for reliability)
Encryption Full end-to-end encryption like text messages
Metadata Filename, size, and MIME type preserved
Validation Automatic format detection and size checking

Image Usage Examples

# Send images
/image path/photo.png

# Save received images
/save                    # Save with original name
/save my_image.jpg       # Save with custom name
/save folder/image.png   # Save to specific path

๐Ÿ› ๏ธ Troubleshooting

Connection Issues

Symptoms: Connection timeouts, frequent disconnects

  • First connection may be slow (server waking up)
  • Retry connection - should be faster on subsequent attempts
  • Check your internet connection
  • Verify the server is accessible
Image Problems

Large images failing:

  • Ensure image is under 2MB
  • Use image compression tools if needed
  • Supported formats: PNG, JPG, GIF, BMP, WebP

Can't save images:

  • Check file permissions in save directory
  • Ensure sufficient disk space
  • Try saving to a different location
Encryption Issues

Messages appear garbled:

  • Ensure all users have the same channel code
  • Verify everyone is using the latest version
  • Try creating a new channel

Can't see messages:

  • Confirm you're in the correct channel
  • Check if other users are actually connected
  • Restart the application
Platform-Specific Issues

Windows:

  • Use PowerShell or Command Prompt
  • Ensure Python 3.8+ is installed

macOS/Linux:

  • Use Terminal application
  • May need to install Python development headers
  • Check file path permissions for images

๐Ÿ“ฆ Package Information

Detail Information
Package Name gupsup on PyPI
CLI Command gupsup
Python Version 3.8+ required
Dependencies websockets>=11.0, cryptography>=3.0.0
Size Ultra-lightweight (~50KB)
License MIT License
Latest Version 1.1.0 (with image support)

Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    WebSocket     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    Channel    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Terminal       โ”‚ โ†โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’  โ”‚  FastAPI         โ”‚ โ†โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ†’  โ”‚  Channel        โ”‚
โ”‚  Client         โ”‚  (Encrypted)     โ”‚  Server          โ”‚   Management  โ”‚  Manager        โ”‚
โ”‚  (gupsup)       โ”‚                  โ”‚                  โ”‚               โ”‚                 โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜               โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
        โ†‘                                      โ†‘
   AES-256-GCM                         Relay Only
   Encryption                        (Cannot Decrypt)

How Messages Flow:

  1. Client A encrypts message with channel key
  2. Server receives encrypted message (cannot decrypt)
  3. Server relays encrypted message to Client B
  4. Client B decrypts message with same channel key

Simple. Secure. Terminal-native.

MIT License - use freely, contribute back.

Rahul Deka

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

gupsup-1.1.0.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

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

gupsup-1.1.0-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file gupsup-1.1.0.tar.gz.

File metadata

  • Download URL: gupsup-1.1.0.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for gupsup-1.1.0.tar.gz
Algorithm Hash digest
SHA256 02d0d662f94ac528c6e2d049cb53f9a47e63dc16731bb6bf3c33bb1f1da8e0be
MD5 46b9052db3416afc65fc3c34580702ef
BLAKE2b-256 f8fa0163234dcddac718091626b8d4a53b38a9528e3e19845e70427ae1d72b11

See more details on using hashes here.

File details

Details for the file gupsup-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: gupsup-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for gupsup-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3772227ac9bf3670b9cd17112822db6ad66fef768ca1a74076512e1ef9fe0aba
MD5 5304e706cac99c972fc164d02570f5e2
BLAKE2b-256 15a5710ee844544b29be564a7be2ec0e439f825759dac15346a0f938f2fceeda

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