A Python CLI port of bitchat: serverless peer-to-peer public chat over a Bluetooth LE mesh, wire-compatible with the bitchat app (text + image/voice/file media).
Project description
Bitchat CLI (Python Version)
This is a Python-based, command-line implementation of bitchat, a secure, decentralized, peer-to-peer messaging app that works over Bluetooth mesh networks. This version is designed to be compatible with the original Swift application's protocol.
Original iOS Version by Jack: github.com/jackjackbits/bitchat
Features
- Decentralized Communication: No internet or servers required.
- Peer-to-Peer: Connects directly with other bitchat users via Bluetooth LE.
- Secure: Implements the core cryptographic principles of the original app.
- Cross-Platform: Built with Python and
bleak, with the potential to run on Windows, macOS, and Linux.
Installation
Requires Python 3.8+ and a working Bluetooth LE adapter.
From PyPI (recommended)
pip install bitchat-cli
From source
git clone https://github.com/dearabhin/bitchat-cli.git
cd bitchat-cli
pip install -e .
Usage
Once installed, run it from anywhere:
bitchat-cli # or simply: bitchat
From a source checkout you can also run python -m bitchat_cli.
The application will automatically start scanning for nearby bitchat peers and broadcast your public messages to them.
Commands
/w: List known peers (peer ID → nickname)./name <nickname>: Change your nickname and re-announce./send <path>(alias/file): Send an image, voice note, or file to peers./clear: Clear the screen./help: Show the list of available commands.
Any text that does not start with / is sent as a public (broadcast) message.
How It Works
This application uses the bleak library for Bluetooth Low Energy (BLE) communication, acting as a BLE central that discovers, connects to, and exchanges packets with real bitchat peers in range. It implements bitchat's binary wire protocol — announce/leave/public-message packets, PKCS#7 padding, fragment reassembly, and Ed25519 packet signing — so it can take part in public chat with the official app.
Scope and limitations: Only public/broadcast chat is supported. Private (Noise-encrypted) messaging, multi-hop mesh relaying, and advertising as a BLE peripheral are not implemented — bleak is central-only, so this client works one hop with peers it is connected to and is not itself discoverable when idle.
Protocol self-test
You can verify the wire-protocol implementation without any Bluetooth hardware:
python selftest.py
(Run from a source checkout; it imports the bitchat_cli package and needs only cryptography.)
Contributing to bitchat-cli
We welcome contributions from everyone! Here’s how you can help.
Getting Started
- Fork the repository.
- Clone your fork:
git clone https://github.com/dearabhin/bitchat-cli.git - Install the dependencies:
pip install -r requirements.txt
Submitting Changes
- Create a new branch for your feature or fix.
- Write a clear commit message.
- Open a Pull Request with a detailed description of your changes.
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
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 bitchat_cli-0.2.2.tar.gz.
File metadata
- Download URL: bitchat_cli-0.2.2.tar.gz
- Upload date:
- Size: 33.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6f400bea156b1f457e81424b65c9c0d86c38bed74718f26d2533242b0e656ba
|
|
| MD5 |
017f9d0c8118036bdbcc3c05021dbba0
|
|
| BLAKE2b-256 |
8e2ace4a4a8db37bb199904ecaaa04e9048a230ab4cfa9b15b41f6d1d332e173
|
Provenance
The following attestation bundles were made for bitchat_cli-0.2.2.tar.gz:
Publisher:
publish.yml on dearabhin/bitchat-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bitchat_cli-0.2.2.tar.gz -
Subject digest:
a6f400bea156b1f457e81424b65c9c0d86c38bed74718f26d2533242b0e656ba - Sigstore transparency entry: 1934991025
- Sigstore integration time:
-
Permalink:
dearabhin/bitchat-cli@b370f527fe7459d850377d31713c90ec4100b77b -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/dearabhin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b370f527fe7459d850377d31713c90ec4100b77b -
Trigger Event:
release
-
Statement type:
File details
Details for the file bitchat_cli-0.2.2-py3-none-any.whl.
File metadata
- Download URL: bitchat_cli-0.2.2-py3-none-any.whl
- Upload date:
- Size: 35.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8775c9f919e820fbdd18274d43ee929382402f8763429d80168025eb83d5811c
|
|
| MD5 |
5cfe36273733f328e90880f75ae33b61
|
|
| BLAKE2b-256 |
035a6f5821a90e481ba40d1907749a443641608df06b453a2fd5afbbb8abfbea
|
Provenance
The following attestation bundles were made for bitchat_cli-0.2.2-py3-none-any.whl:
Publisher:
publish.yml on dearabhin/bitchat-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
bitchat_cli-0.2.2-py3-none-any.whl -
Subject digest:
8775c9f919e820fbdd18274d43ee929382402f8763429d80168025eb83d5811c - Sigstore transparency entry: 1934991121
- Sigstore integration time:
-
Permalink:
dearabhin/bitchat-cli@b370f527fe7459d850377d31713c90ec4100b77b -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/dearabhin
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b370f527fe7459d850377d31713c90ec4100b77b -
Trigger Event:
release
-
Statement type: