A terminal-based chat application with mulitplayer games and an on-device AI assistant
Project description
Pardesi Chat 🤖🎮
Welcome to Pardesi Chat, a project by Arsalan Pardesi.
This is a feature-rich, terminal-based chat application built with Python. It allows users on the same local network to connect and chat in real-time. More than just a chat app, it's a multi-game platform and a powerful AI assistant, all running locally in your terminal. The application intelligently detects if a server is running on the network; the first user to launch automatically becomes the host.
✨ Features
-
Real-time LAN Chat: Instantly communicate with other users on your local network.
-
Automatic Server Discovery: No need to configure IP addresses. The first person to start is the host, everyone else joins automatically.
-
Private Messaging: Send direct messages to specific users with the /whisper command.
-
Integrated Games:
- Hangman: Challenge the room with a word and see who can guess it first!
- Stick Figure Fighter: A turn-based, 1v1 fighting game with standard and special moves, rendered in ASCII art.
-
On-Device AI Assistant:
- Ask coding, general knowledge, or complex questions.
- Provide a URL to an image and ask the AI to describe or analyze it.
- Provide a URL to a news article or document and ask the AI to summarize it.
📥 Installation & Usage (for Users)
This application is packaged and available on PyPI. The recommended way to install it is using pip.
Install the Package
Open your terminal and run the following command:
pip install pardesichat
Run the Application Once installed, you can start the chat from any terminal window by simply typing:
pardesi-chat
The first person to run the command on a network will become the server host. All subsequent users running the same command will join the chat. To exit, type exit and press Enter.
🤖 One-Time AI Setup (For the Server Host)
These steps are only for the user who will host the chat and wants to enable the AI features. Client users do not need to do this.
Install Ollama
Download and install the Ollama application for your operating system from the official website: https://ollama.com. The pull command below will download it for you.
Start the Ollama Service Before starting the chat server, you must have the Ollama service running.
Open a separate, dedicated terminal window and run:
ollama serve
Keep this terminal window running in the background.
Pull the Required AI Models This application uses two different models: one for text/code and another for vision. Open another new terminal and pull both models. This is a one-time download.
For Text, Code, and Summarization:
ollama pull gemma3n:e4b
For Image Analysis:
ollama pull qwen2.5vl:3b
👨💻 Development Setup (For Contributors)
If you wish to contribute to the project or run it from the source code, follow these steps.
Clone the Repository
Bash
git clone https://github.com/arsalanpardesi/pardesichat.git
cd pardesichat
Create and Activate a Virtual Environment (optional)
Install Dependencies Install all required packages from the toml file
Run from Source
python pardesichat.py
📖 Command Reference
General Chat
Public Message: Just type your message and press Enter.
Private Message: /whisper @username your message ...
Games
Start Hangman: /hangman <word> (e.g., /hangman python)
Guess a Letter: /guess <letter> (e.g., /guess e)
Start a Fight: /fight @username
Accept a Fight: /accept
Fight Moves: /punch, /kick, /block, /special
AI Assistant (/ai)
General Question:
/ai What are the key differences between Python lists and tuples?
Analyze an Image:
/ai https://i.imgur.com/some_image.jpg
Summarize an Article:
/ai https://www.bbc.com/news/some-article-url
License note
The base application is offered under the MIT license but please refer to the licenses for Gemma and Qwen.
Gemma is provided under and subject to the Gemma Terms of Use found at ai.google.dev/gemma/terms"
Qwen is subject to the following license agreement: registry.ollama.ai/library/qwen2.5vl:latest/blobs/832dd9e00a68
Please also refer to the license requirements for all the libraries used before you deploy the application.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pardesichat-1.0.0.tar.gz.
File metadata
- Download URL: pardesichat-1.0.0.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b65a8caa793a3278159f8e697a158f1d0ea80634724c1d8857162b20f1cb1397
|
|
| MD5 |
a27c1962fc608dfe52f48d8a9f98b671
|
|
| BLAKE2b-256 |
bfbba892489a9b0f0bc293e49abe58e103c5a38acbb12eae6cb8a09ec0078017
|
File details
Details for the file pardesichat-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pardesichat-1.0.0-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
907309516fdaec0831ba4a1f61aad6a0e91a163f6b1eb118131b63eb85b40bce
|
|
| MD5 |
0f709ffac4e9d9bbe5b6b772e28c73a1
|
|
| BLAKE2b-256 |
7859292ef5eeedbce63636b839a456034564f4340162ea7f07c32baf0db04702
|