Proof-of-work realtime chat, using only `git` as a transport
Project description
GitChat
Proof-of-work realtime chat, using only
gitas a transport
This is just a joy project, be careful!
Requirements
- Git
- Python >= 3.12
- Github/Gitlab/Gitverse account
Usage
- Install package
# From PyPI
pip install gitchat
# From source
git clone <this repo>
cd gitchat
pip install .
- Create empty git repo using any git hosting and clone it
# You should also register git credentails
gitchat login -u my_login -p my_password -r github.com -c ~/.git-credentials
- Configure peers once (on both sides) and enter chat:
# Configuring repo
gitchat config -r <repo path> -u <username>
# Starting chat
gitchat chat -r <repo path> -u <username> -d <check interval in secs>
- Add handler (to process messages)
# handler.py (example)
import os
def handler(message):
if message["data"].startswith("%sh"):
cmd = message["data"][4:]
print(f"[*] Executing '{cmd}' ...")
os.system(cmd)
# In shell
gitchat chat -u <username> -r <repo path> --handler handler.py
your py file must have function
handlerthat accepts message
- Enable encryption
# Use the same password on both sides!
gitchat chat -u <username> -r <repo path> -p "strong password"
TODO
Managerfor configuration (to make it available via code)MessageProtocolto define message structure- Enable
file sharingmechanism
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gitchat-0.0.5.tar.gz
(7.3 kB
view details)
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 gitchat-0.0.5.tar.gz.
File metadata
- Download URL: gitchat-0.0.5.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd38a3a3ee73066f0c96cd60194b9d22a287c90f2980d4e4a50b9d427c3ebb8e
|
|
| MD5 |
6d7e5b4b0cee185fda52c99b9486cb4b
|
|
| BLAKE2b-256 |
e0f5ced55693ea9112b5462965a4242db752da6170e2dda0e4bb442f6c02b5b7
|
File details
Details for the file gitchat-0.0.5-py3-none-any.whl.
File metadata
- Download URL: gitchat-0.0.5-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75a8935f2215e69be2e121ff0bb4d875e08cf9ddd9bda0a8a34477fc23161e6f
|
|
| MD5 |
a5a60ffa0d6f42d7f2326ea32337dcb8
|
|
| BLAKE2b-256 |
fa6f1efb93e26cd74c2ac293d70a972ffaf50b422dfa9fb4746448562d74c6f9
|