# Terminal Chat
A simple yet powerful terminal-based chat application written in Python with TCP sockets.

v1.0 — Open Source

# Chat from your Terminal

A simple yet powerful terminal-based chat application written in Python. Realtime messaging via TCP sockets, straight from your command line.

Live Demo
Documentation
bash
$ curl -s https://ben.de-roo.org/install/script.sh | bash
or
Download ZIP from git.de-roo.org
terminal-chat — python3
$ python3 client.py
Terminal Chat
========================================
Welcome to The Terminal Chat
========================================
1. Login
2. New account
> 1
Username: max
Password: ********
--- Available chats: ---
1. General
2. Create new chat
> 1
General
>
// features

## Everything you need

Terminal Chat is built with a focus on simplicity and functionality. No unnecessary complexity, just chatting from your terminal.

### Login & Signup

Full authentication system with username and password. Default test account included.

### Terminal Interface

Colorful terminal interface with intuitive navigation. Works on any terminal that supports ANSI colors.

### Realtime Messaging

Messages are delivered instantly via TCP sockets. No delay, no polling. True realtime communication.

### Multiple Chats

Create multiple chat channels and easily switch between them. Each channel has its own message history.

### User Management

Add users to chats with a simple command. Manage who is in which channel.

### Open Source

Fully open source and free to use. View the code, contribute, or fork the project for your own use.

// compatibility

## Platform support

Built primarily for Linux terminals, with growing support for other platforms.

### Linux

FULLY SUPPORTED

First-class support. All features work out of the box including ANSI colors, readline, and autofill.

Full ANSI color support
Readline & autofill
Tested & verified

### Windows

PARTIAL

Works with modifications. The readline module and autofill function need to be adjusted for Windows compatibility.

Core chat functionality
Readline needs pyreadline3
Autofill needs adjustment

### macOS

UNTESTED

Should work since macOS has a Unix-based terminal, but it hasn't been tested yet. Community feedback is welcome!

Likely compatible (Unix-based)
Needs community testing
Open an issue to report results
// documentation

## Get started quickly

Everything you need to install, configure, and use Terminal Chat.

### Installation (for Linux)

Install Terminal Chat with a single command. The script downloads and configures everything automatically.

Windows installation and setup
# Automatic installation
$ curl -s https://ben.de-roo.org/install/script.sh | bash
# Or manually
$ git clone https://git.de-roo.org/ben/pychat.git
$ cd terminal-chat
$ pip install -r requirements.txt

### Getting Started

Start the server first, then the client. Log in with the default test account or create a new one.

# Start the server
$ python3 server.py
# Start the client (another terminal window)
$ python3 client.py
# Default test account
user: test pass: test

### Available Commands

Use these commands while chatting to perform additional actions.

Command | Description
--- | ---
/add <username> | Add a user to the current chat
/break | Leave the current chat and return to chat selection
/quit | Close the program completely and disconnect
obviously more commands and features comming on the way!

// architecture

## How it works

Terminal Chat uses a classic client-server model with TCP sockets for reliable, bidirectional communication.

Client Python script that connects to the server. Handles input/output and displays messages with ANSI colors.
↓ TCP Socket ↓
Server Runs centrally and manages all connections, authentication, chat channels, and message routing.
↓ Threading ↓
Storage User and chat data are stored server-side. Each client gets its own thread for non-blocking I/O.
# Simplified overview
client.py → Connects to server via socket
→ Login / Signup prompt
→ Chat selection menu
→ Send & receive messages
server.py → Listens on TCP port
→ New thread per client
→ Authentication handling
→ Message broadcast to channel
// contribute

## Make it yours

Terminal Chat is open source and built to be extended. Whether you want to add new features, build mods, or fix bugs — you're welcome to join.

01

### Build mods

Add new commands, custom themes, message encryption, file sharing, or anything else you can think of. The codebase is simple and easy to extend.

02

### Improve the core

Help fix bugs, improve Windows/macOS compatibility, optimize performance, or refactor the codebase. Every PR matters.

03

### Share ideas

Open an issue to suggest features, report bugs, or discuss improvements. Even if you don't code, your input helps shape the project.

04

### Fork & experiment

Fork the repo and go wild. Build your own version, add a GUI, make it work with Discord bots — the code is yours to play with.

Ready to contribute? Start here:

# Clone and start hacking
$ git clone https://git.de-roo.org/ben/pychat.git
$ cd pychat
$ python3 server.py & python3 client.py

No complex setup. No build tools. Just Python.

// changelog

## Updates & News

Latest releases, patches, and project news.

Loading updates...