Gitty
A zero-dependency, TLS-encrypted terminal messenger powered by GitHub identity.
Quickstart • Why Gitty? • Commands • Self-Hosting • Security • Development
Quickstart
Install or run directly with pipx, uv, or pip:
# Isolated CLI install (recommended)
pipx install gitty-messenger
gitty
# Or run directly with uv
uvx --from gitty-messenger gitty
# Or via pip
pip install gitty-messenger
gitty
Connect to a custom host or port anytime:
gitty chat.jankirschke.de -p 5555
Why Gitty?
| Feature | Details |
|---|---|
| Zero Dependencies | Built 100% on Python's standard library (ssl, socket, sqlite3, threading, urllib, json). Fast install, minimal attack surface. |
| TLS Everywhere | Strict TLS 1.2+ transport encryption with certificate verification enabled by default (--ca-cert supported for private CAs). |
| Verified GitHub Identity | Clients authenticate via GitHub OAuth Device Flow. The server verifies tokens directly against api.github.com/user and never persists tokens. |
| Immutable Permissions | Admin rights (GITTY_ADMIN_ID) and saved friends (SQLite) are bound to immutable numeric GitHub IDs instead of display names. |
| Ephemeral by Design | Create rooms on the fly, check room members, or send timestamped DMs. Rooms and messages live in RAM only. |
| Terminal Safety | Incoming messages are stripped of non-printable control sequences to prevent escape injection, with packets strictly capped at 16 KiB. |
| Matrix-Wave Startup | Smooth in-place terminal reveal animation (Ctrl+C or GITTY_NO_ANIMATION=1 to skip). |
Commands
Chat & Rooms
| Command | Description |
|---|---|
/rooms |
List active chatrooms |
/create <ROOM> |
Create a new chatroom |
/join <ROOM> |
Join an existing chatroom |
/leave |
Leave the current chatroom |
/users |
List users in your current room |
/msg <USER> <TEXT> |
Send a direct message |
Friends (Persisted in SQLite)
| Command | Description |
|---|---|
/friends |
Show saved friends and online status |
/friend add <USER> |
Resolve GitHub user and save to contacts |
/friend remove <USER> |
Remove a contact |
General
| Command | Description |
|---|---|
/help |
Show grouped command reference |
/exit |
Disconnect and quit |
Admin Commands (requires GITTY_ADMIN_ID)
| Command | Description |
|---|---|
/admin online |
List all connected users |
/admin kick <USER> |
Disconnect a user from the server |
/admin broadcast <TEXT> |
Broadcast an announcement to everyone |
Self-Hosting
Option 1: Docker Compose
- Place your TLS certificate and key in
./certs/(fullchain.pemandprivkey.pem). - Look up your numeric GitHub user ID via
https://api.github.com/users/<username>. - Start the server:
export GITTY_ADMIN_ID=12345678
docker compose up -d --build
docker compose logs -f gitty
Option 2: Direct Python / CLI
pip install gitty-messenger
gitty-server --cert certs/fullchain.pem --key certs/privkey.pem --admin-id 12345678
Server Configuration
| Environment Variable | CLI Flag | Default | Description |
|---|---|---|---|
GITTY_CERT |
--cert |
required | Path to TLS certificate chain (fullchain.pem) |
GITTY_KEY |
--key |
required | Path to TLS private key (privkey.pem) |
GITTY_ADMIN_ID |
--admin-id |
required | Numeric GitHub user ID of the server admin |
GITTY_DATABASE |
--database |
gitty.sqlite3 |
SQLite path for persisted friend lists |
| - | --port |
5555 |
Listening TCP port |
Security Model
| Aspect | Behavior |
|---|---|
| Transport | TLS >= 1.2 required; plaintext connections are rejected |
| Authentication | Client sends OAuth token over TLS; server verifies via api.github.com/user and discards it after handshake |
| Token Storage | Client caches own token locally in ~/.gitty/token (0600 on POSIX); server stores zero tokens |
| Authorization | Admin rights and friendships are keyed by immutable GitHub numeric id, not mutable login |
| Message Persistence | None. Rooms and chat messages live in RAM only |
| Input Hardening | 4,000-char line limit, 16 KiB frame limit, 100-peer / 100-room caps, control-char stripping on client output |
Development
git clone https://github.com/Jan-Kirschke/Gitty.git
cd Gitty
python -m unittest discover -s tests -v
Metadata
Release files for gitty-messenger 5.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gitty_messenger-5.0.1.tar.gz | 18.8 kB | Without provenance | Details for gitty_messenger-5.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gitty_messenger-5.0.1-py3-none-any.whl | Python 3 | none | any | Details for gitty_messenger-5.0.1-py3-none-any.whl |
Total release size: 32.5 kB
Release files / gitty_messenger-5.0.1.tar.gz
| Download URL | gitty_messenger-5.0.1.tar.gz |
|---|---|
| Size | 18.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d797cf730953f87143ec44f291598f5a769e5c87fb1b295b4e07c7b492f54daf
|
|
BLAKE2b-256 checksum How to use checksums |
13549974e52018ec45ac38330cf819d7cbc8863c864cd25973b4c8afc67a50e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.13
|
Release files / gitty_messenger-5.0.1-py3-none-any.whl
| Download URL | gitty_messenger-5.0.1-py3-none-any.whl |
|---|---|
| Size | 13.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0fe5ab3e81e55335f1c771217a61411d4313973c665e1810b16b7b7173ff532c
|
|
BLAKE2b-256 checksum How to use checksums |
d2518080569bde173c392724fa0ede0b75b78ff8009d4590f4b123ea4c299d5e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.13
|
Security for gitty-messenger 5.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.