Metadata-Version: 2.4
Name: port69
Version: 1.0.0
Summary: Terminal chat platform — talk to friends, share files, all from your CLI
Author: Port69 Contributors
License: MIT License
        
        Copyright (c) 2025 Port69 Contributors
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/yourusername/port69
Project-URL: Repository, https://github.com/yourusername/port69
Project-URL: Bug Tracker, https://github.com/yourusername/port69/issues
Keywords: chat,terminal,cli,messaging,websocket,real-time,communication,file-sharing,friends
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Communications :: Chat
Classifier: Topic :: Terminals
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click>=8.1.7
Requires-Dist: rich>=13.7.0
Requires-Dist: websockets>=12.0
Requires-Dist: httpx>=0.27.0
Requires-Dist: python-jose>=3.3.0
Requires-Dist: pydantic>=2.6.0
Provides-Extra: server
Requires-Dist: fastapi>=0.110.0; extra == "server"
Requires-Dist: uvicorn[standard]>=0.29.0; extra == "server"
Requires-Dist: sqlalchemy[asyncio]>=2.0.28; extra == "server"
Requires-Dist: aiosqlite>=0.20.0; extra == "server"
Requires-Dist: bcrypt>=4.1.2; extra == "server"
Requires-Dist: python-multipart>=0.0.9; extra == "server"
Requires-Dist: pydantic-settings>=2.2.1; extra == "server"
Requires-Dist: python-jose>=3.3.0; extra == "server"
Provides-Extra: dev
Requires-Dist: pytest>=8.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
Requires-Dist: httpx>=0.27.0; extra == "dev"
Requires-Dist: build>=1.0.0; extra == "dev"
Requires-Dist: twine>=5.0.0; extra == "dev"
Dynamic: license-file

# ⚡ Port69

**Terminal chat platform. Talk to friends. Share files. No browser needed.**

```
pip install port69
```

---

## What is Port69?

Port69 is an open-source CLI chat app — like WhatsApp or Discord, but fully in your terminal. Chat in rooms, send DMs, share files, react to messages, create polls, and more.

```
┌─────────────────────────────────────────────┬────────────────┐
│  ⚡ Port69 v1.0            #general   ● janak│ Friends        │
├─────────────────────────────────────────────│ ● rohan        │
│                                             │ ● priya        │
│  J  janak  14:02                           │                │
│     Hey everyone! 👋                       │ Rooms          │
│     👍2  ❤️1                               │ 💬 #general    │
│                                             │ 🎮 #gaming     │
│  R  rohan  14:03                           │ 💻 #code       │
│     ↩ janak: Hey everyone!                 │                │
│     Sup! Just joined                        │ Online         │
│                                             │ ● alex         │
│  📊 Poll: Best language?                   │ ● sam          │
│     1. Python  2. Go  3. Rust              │                │
│     👍 12 votes                            │                │
├─────────────────────────────────────────────┴────────────────┤
│  /help · /join · /msg · /add · /sendfile · /poll  Ctrl+C quit│
└──────────────────────────────────────────────────────────────┘
#general ❯ 
```

---

## Quick Start (User)

**1. Install**
```bash
pip install port69
```

**2. Connect to a server**
```bash
port69 config
# Enter server URL when asked:  https://your-friends-server.com
```

**3. Register**
```bash
port69 register
```

**4. Chat!**
```bash
port69 chat
```

---

## Self-Host Your Own Server

So your friends can connect to **you**:

```bash
# Install server dependencies
pip install "port69[server]"

# Create config
echo "SECRET_KEY=$(python3 -c 'import secrets; print(secrets.token_hex(32))')" > .env
echo "DATABASE_URL=sqlite+aiosqlite:///./port69.db" >> .env

mkdir uploads

# Start server
port69-server
```

Server runs on `http://0.0.0.0:8000`

**Friends connect to you:**
```bash
port69 config
# Server URL: http://YOUR_IP:8000
port69 register
port69 chat
```

---

## All Commands

### In Terminal
```bash
port69 register          # Create account
port69 login             # Login
port69 chat              # Open chat (main room)
port69 chat <username>   # Open DM with someone
port69 friends           # Your friends list
port69 users             # Who's online
port69 rooms             # Public rooms
port69 stats             # Server statistics
port69 whois <username>  # View someone's profile
port69 add <username>    # Send friend request
port69 profile           # Edit your profile
port69 config            # Change server / settings
```

### Inside Chat
```
Messages
  /reply <id> <text>       Reply to a message
  /edit  <id> <text>       Edit your message
  /delete <id>             Delete your message
  /react <id> 👍           React with emoji
  /me <action>             /me waves hello

Navigation
  /join <room>             Join a room
  /leave                   Leave current room
  /create <name> [desc]    Create a new room
  /rooms                   List all public rooms
  /msg <user> <text>       Send a direct message

Files
  /sendfile <path>         Send a file to current room
  /sendfile <path> <user>  Send a file to a specific person
  /download <id>           Download a file

Friends
  /add <user>              Send friend request
  /accept <user>           Accept a request
  /reject <user>           Reject a request
  /friends                 Show friends
  /requests                Pending requests

Polls
  /poll "Question?" A | B | C    Create a poll
  /vote <poll_id> <number>        Vote in a poll

Status
  /status away Grabbing coffee    Set custom status
  /away  /busy  /back             Quick status shortcuts

Other
  /users                   Who's online
  /whois <user>            User profile
  /search <name>           Find users
  /stats                   Server stats
  /clear                   Clear chat
  /help                    Show all commands
  /quit                    Exit
```

---

## Markdown in Chat

```
**bold**        *italic*        `code`
~~strikethrough~~
@username       #roomname
https://links   automatically become clickable
```

---

## Features

- 💬 **Real-time messaging** — WebSocket powered, instant delivery
- 📁 **File sharing** — Send any file type up to 200MB
- 👥 **Friends system** — Add friends, accept/reject requests
- 📊 **Polls** — Create polls with live vote counts
- 🔔 **Notifications** — Offline message delivery when you reconnect
- 😀 **Reactions** — React to any message with any emoji
- ↩️ **Reply threads** — Reply to specific messages with quote preview
- ✏️ **Edit & delete** — Edit or delete your own messages
- 🟢 **Presence** — Online/Away/Busy/Invisible status
- 🌐 **Multi-room** — Create and join multiple rooms
- 🔍 **User search** — Find anyone on the server
- 🎨 **Rich UI** — Colors, avatars, markdown rendering

---

## Deploy to the Cloud (Render — Free)

1. Push your code to GitHub
2. Go to [render.com](https://render.com) → New Web Service
3. Connect your repo
4. Set:
   - **Build command:** `pip install ".[server]"`
   - **Start command:** `port69-server`
   - **Environment variables:** `SECRET_KEY`, `DATABASE_URL`
5. Deploy!

Share your Render URL with friends — they install port69 and connect to you.

---

## Docker

```bash
docker compose up -d
```

---

## License

MIT — free to use, modify, and distribute.

---

*Built with FastAPI · SQLAlchemy · WebSockets · Rich · Click*
