v0.4.1-beta · Open Source · GPLv3

ChatCLI

A self-hosted, cross-platform desktop chat app. Real-time messaging, group chats, and VoIP calls — all in one open-source client.

Download ↓ View on GitHub
Screenshot coming soon
0.4.1
Current beta version
11000+
Lines of code
7+
Technologies used
GPLv3
Open-source license

What ChatCLI does

A full-featured messaging client built around real-time WebSocket communication, running entirely on your own infrastructure.

💬
Real-time messaging

Instant WebSocket-based delivery with typing indicators, live online presence, and full message history retrieval.

👥
Group chats

Create multi-user rooms, invite participants, and manage group membership — all from within the client.

📞
VoIP calling (beta)

In-app voice calls powered by LiveKit. Peer-to-peer audio with signalling handled through the WebSocket server.

🔍
Search & archiving

Search through your conversations to jump back into any chat instantly. Archive inactive chats to keep your list clean.

🔐
Secure authentication

Token-based auth with email verification, persistent login across sessions, password reset by email, and rate-limited endpoints.

⚙️
Account management

Update your username or email, resend verification, and delete or deactivate your account — all directly from the client.

Tech stack
Electron Python 3.12 Flask FastAPI MariaDB WebSocket LiveKit Node.js electron-builder

Get started

Download the client for your platform, or self-host the backend on your own server.

1
Download the installer

Go to the GitHub releases page and download the build for your platform.

releases
# Windows
ChatCLI Setup 0.4.1-beta.exe   # installer (recommended)
ChatCLI-0.4.1-beta-win-portable.zip

# Linux
chatcli_0.4.1-beta_amd64.deb   # Debian / Ubuntu
chatcli_0.4.1-beta_linux_portable.zip
2
Install and launch

Run the installer (Windows) or install the package (Linux). No additional dependencies required.

bash
# Linux .deb
sudo dpkg -i chatcli_0.4.1-beta_amd64.deb
3
Connect to chat.puam.be

Register an account or log in. The client connects to the hosted server at chat.puam.be by default — no configuration needed.

1
Prerequisites

Make sure the following are installed before continuing.

bash
python3 --version   # >= 3.12.0
mariadb  --version   # >= 10.6
git      --version

# Install MariaDB if needed (Debian / Ubuntu)
sudo apt install mariadb-server
sudo systemctl start mariadb
2
Clone the repository
bash
git clone https://github.com/FrostMantis/ChatCLI.git
cd ChatCLI/src/backend
3
Install Python dependencies
bash
pip3 install -r requirements.txt
4
Initialize the database

Creates the database, tables, and app user. Also generates a .env with safe defaults on first run.

bash
python3 install_update_server.py
5
Configure .env

Edit the generated .env and set your public URL, email credentials, and LiveKit keys.

.env
PUB_URL=your.domain.com
EMAIL_USER=your@email.com
EMAIL_PASSWORD=app_password
LIVEKIT_URL=ws://your-livekit-host:7880
LIVEKIT_KEY=your_key
LIVEKIT_SECRET=your_secret
6
Start the servers

run_server.py launches both the HTTP API (port 5123) and WebSocket server (port 8765) in one command. Press Ctrl+C to stop both.

bash
python3 run_server.py
1
Prerequisites

Download and install the following before continuing.

powershell
python  --version   # >= 3.12.0  — python.org
mariadb --version   # >= 10.6    — mariadb.org
git     --version   # git-scm.com
2
Clone the repository
powershell
git clone https://github.com/FrostMantis/ChatCLI.git
cd ChatCLI\src\backend
3
Install Python dependencies
powershell
pip install -r requirements.txt
4
Initialize the database

Creates the database, tables, and app user. Also generates a .env with safe defaults on first run.

powershell
python install_update_server.py
5
Configure .env

Edit the generated .env and set your public URL, email credentials, and LiveKit keys.

.env
PUB_URL=your.domain.com
EMAIL_USER=your@email.com
EMAIL_PASSWORD=app_password
LIVEKIT_URL=ws://your-livekit-host:7880
LIVEKIT_KEY=your_key
LIVEKIT_SECRET=your_secret
6
Start the servers

run_server.py opens two CMD windows — one for the HTTP API (port 5123) and one for the WebSocket server (port 8765).

powershell
python run_server.py

Technical reference

Architecture overview, API reference, and environment configuration for ChatCLI.

Repository layout

The project is split into two independent parts under src/.

  • src/backend/ — Python server (Flask API + FastAPI WebSocket)
  • src/backend/app/routes/ — HTTP route blueprints
  • src/backend/app/services/ — business logic layer
  • src/backend/app/websockets/ — FastAPI WebSocket server (port 8765)
  • src/backend/app/database/ — MariaDB connection helpers
  • src/client/ChatCLI/ — Electron client
  • src/client/ChatCLI/src/renderer/ — UI pages, scripts, styles
  • src/client/ChatCLI/src/main/ — Electron main process

Base

RouteMethodDescription
/GETLanding page
/verify-connectionGET POSTCheck server reachability
/subscribePOSTRegister email for notifications

User — /user

RouteMethodDescription
/user/registerPOSTCreate account, send verification email
/user/verify-emailPOSTConfirm email with code
/user/resend-verificationPOSTResend verification email
/user/loginPOSTAuthenticate, receive session token
/user/refresh-tokenGETRotate refresh token
/user/reset-password-requestPOSTTrigger password reset email
/user/reset-passwordGET POSTComplete password reset

Chat — /chat

RouteMethodDescription
/chat/fetch-chatsPOSTList user's chats
/chat/create-chatPOSTStart a new 1:1 conversation
/chat/create-groupPOSTCreate a group chat
/chat/add-membersPOSTAdd participants to a group
/chat/remove-membersPOSTRemove participants from a group
/chat/messagesPOSTRetrieve message history
/chat/archivePOSTArchive a chat
/chat/unarchivePOSTRestore an archived chat
/chat/fetch-archivedPOSTList archived chats

All chat endpoints require a session_token field in the request body. Responses are JSON; errors return an error field.

Endpoint

wss://ws.chat.puam.be/ws  ·  local: ws://localhost:8765/ws

Authentication

Send immediately after connecting:

  • {"type": "auth", "token": "<session_token>"}

Client actions

ActionRequired fieldsDescription
join_chatchatIDSubscribe to a chat room
leave_chatchatIDUnsubscribe from a chat room
post_msgchatID, textSend a message

Server events

  • New messages are broadcast to all joined participants in the chat
  • Online presence and typing indicators are pushed as events

Backend .env keys

KeyDescription
FLASK_ENVdev (debug mode) or prod (Waitress)
THREADSWaitress worker threads (production only)
DB_HOST / DB_PORTMariaDB connection (default: localhost:3306)
DB_NAMEDatabase name (default: chatcli)
DB_USER / DB_PASSWORDApp DB credentials (auto-generated by installer)
FLASK_SECRET_KEYSession signing key (auto-generated by installer)
EMAIL_USER / EMAIL_PASSWORDSMTP credentials for verification emails
PUB_URLPublicly reachable hostname of the server
LIVEKIT_KEY / LIVEKIT_SECRETLiveKit API credentials for VoIP
LIVEKIT_URLWebSocket URL of your LiveKit instance
IGNORE_EMAIL_VERIFSet true to skip email verification (dev only)

Client can't connect to the server

Check that both main.py (port 5123) and app/websockets/main.py (port 8765) are running. Also verify PUB_URL in .env matches your server's hostname.

mariadb.OperationalError on startup

MariaDB is not running or the credentials in .env don't match. Re-run install_update_server.py with root access enabled (ROOT_ACCESS=true).

Emails not being sent

Set IGNORE_EMAIL_VERIF=true to bypass email verification during development. For production, use an app-specific password with your email provider.

VoIP calls not connecting

VoIP is a beta feature. Ensure your LiveKit server is reachable at the URL set in LIVEKIT_URL and that LIVEKIT_KEY / LIVEKIT_SECRET are correct.

The project

ChatCLI is an independent open-source project — a fully self-hosted, cross-platform messaging client built from scratch.

FM
FrostMantis
Developer · Designer
License
GNU General Public License v3.0
Years
2024 – 2026
Hosted at
chat.puam.be