Skip to main content

termhub

Chat texte en réseau local, dans le terminal. Python 3.8+, aucune dépendance.

Installation

pipx install git+https://github.com/nanaelie/termhub.git   # recommandé
# ou
pip install git+https://github.com/nanaelie/termhub.git

Sans installer : python termhub.py (le fichier est autonome). Mise à jour : pipx upgrade termhub — désinstallation : pipx uninstall termhub.

Utilisation

termhub                 # cherche un salon ; s'il n'y en a pas, en démarre un
termhub start --max 20  # démarre un salon (vous êtes l'hôte/admin)
termhub start --password --name "Salle 1"   # salon protégé par mot de passe
termhub start --headless                    # serveur seul, sans chat
termhub stop            # arrête le serveur local
termhub scan            # liste les salons du réseau
termhub join --host 192.168.1.10 --nick amina   # connexion directe par IP

Le premier qui lance termhub démarre le serveur, les suivants le trouvent automatiquement (diffusion UDP sur le port 5599, chat sur le port TCP 5598).

Commandes dans le chat

Commande Effet
/help aide
/list qui est connecté
/nick <nom> changer de pseudo
/w <nom> <msg> message privé
/me <action> action (* nom action)
/q quitter
/kick <nom>, /ban <nom>, /say <annonce>, /stop hôte uniquement

Sécurité

  • Texte uniquement : le protocole ne transporte que des messages ; rien n'est jamais exécuté, aucun fichier n'est échangé.
  • Nettoyage : tous les caractères de contrôle (séquences ANSI, retours à la ligne, bidi) sont supprimés côté serveur et côté client.
  • Limites : 500 caractères/message, ligne max 2 Ko, anti-flood (rafale de 5, puis 1 msg/s ; déconnexion après 10 refus), 3 connexions max par IP, --max connexions au total, délai de 10 s pour se présenter, déconnexion après 5 min d'inactivité.
  • Réseau local seulement : les IP publiques sont refusées (sauf --allow-public, déconseillé).
  • Mot de passe optionnel : preuve HMAC-SHA256 avec défi aléatoire, le mot de passe ne circule jamais en clair ; 5 échecs = bannissement de l'IP.
  • Pseudos : 2-16 caractères A-Za-z0-9_-, uniques, noms réservés (admin, server…) interdits, donc pas d'usurpation.
  • Droits d'hôte : seul un processus local connaissant le jeton secret (fichier ~/.termhub_admin, droits 600) est admin. Aucun client distant ne peut le devenir.
  • Les adresses IP ne sont visibles que de l'hôte (/list).

Limites connues

  • Les messages ne sont pas chiffrés (comme sur n'importe quel chat LAN sans TLS) : ne pas y mettre de secrets.
  • Si l'hôte quitte, le salon s'arrête. Pour un salon permanent : start --headless sur une machine dédiée.
  • Certains WiFi bloquent la communication entre appareils (« isolation des clients ») : à désactiver sur la box/borne.
  • Le pare-feu de l'hôte doit autoriser TCP 5598 et UDP 5599.

Metadata

Release files for termhub 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for termhub 0.1.0
File Size Uploaded Provenance Actions
termhub-0.1.0.tar.gz 11.3 kB With provenance Details for termhub-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for termhub 0.1.0
File Interpreter ABI Platform Actions
termhub-0.1.0-py3-none-any.whl Python 3 none any Details for termhub-0.1.0-py3-none-any.whl

Total release size: 23.1 kB

Release files / termhub-0.1.0.tar.gz

Download URL termhub-0.1.0.tar.gz
Size 11.3 kB
Tags Source
SHA-256 checksum
How to use checksums
77cfebe1b2c7e9dded9847d55b3eddc736684079e8069a8fe41234f4c6e03a27
BLAKE2b-256 checksum
How to use checksums
9557b3b7392f1108e90802dafe6194a46ec26f8d5020c3b88b4d242c3f0f2c0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Release files / termhub-0.1.0-py3-none-any.whl

Download URL termhub-0.1.0-py3-none-any.whl
Size 11.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
863e48c0dd22e9042ed852ad151e9eefd79eebfd8112ba52d998a17534d20543
BLAKE2b-256 checksum
How to use checksums
7fc3dc607e8b0ebbf2b23a17fde1893119ed7aafcc1168ab1603861fd374bf7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Security for termhub 0.1.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for termhub-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page