Skip to main content

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

  1. Fork the repository.
  2. Clone your fork: git clone https://github.com/dearabhin/bitchat-cli.git
  3. 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

bitchat_cli-0.2.1.tar.gz (33.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bitchat_cli-0.2.1-py3-none-any.whl (34.8 kB view details)

Uploaded Python 3

File details

Details for the file bitchat_cli-0.2.1.tar.gz.

File metadata

  • Download URL: bitchat_cli-0.2.1.tar.gz
  • Upload date:
  • Size: 33.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for bitchat_cli-0.2.1.tar.gz
Algorithm Hash digest
SHA256 f5d8ae180341f99119c846ff90cfcd97895933be93f858629be38e5dbc872cdc
MD5 e9d2ce96323de485b16bd041c6d013df
BLAKE2b-256 09d293b4c528960e285a55c946f39ec3a7864d7b09a71b22cafa9355d27cfe07

See more details on using hashes here.

Provenance

The following attestation bundles were made for bitchat_cli-0.2.1.tar.gz:

Publisher: publish.yml on dearabhin/bitchat-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bitchat_cli-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: bitchat_cli-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 34.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for bitchat_cli-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6e83f1e5bb8381729d0aae6e6cb850abfb16e45ea5c0b48f670d77b017b934cf
MD5 1f541d146727bac5877e26cb587501eb
BLAKE2b-256 3c29ce1edd6bec807f35a6eb47f20785a82213c11f2e43f5e9fe5961dcdc238d

See more details on using hashes here.

Provenance

The following attestation bundles were made for bitchat_cli-0.2.1-py3-none-any.whl:

Publisher: publish.yml on dearabhin/bitchat-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page