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.0.tar.gz (32.7 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.0-py3-none-any.whl (34.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bitchat_cli-0.2.0.tar.gz
  • Upload date:
  • Size: 32.7 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.0.tar.gz
Algorithm Hash digest
SHA256 fbad6294a03a083fc2a1a40de9b3ae345c24f844c4dfbcb1aafd48a553ec461b
MD5 ae1df88dd0ee7122bd7d78c2a430c533
BLAKE2b-256 10dc6771c565165e8b99ba31d260026a9d6e29a8273ef4a6e3f39ace891b3f9c

See more details on using hashes here.

Provenance

The following attestation bundles were made for bitchat_cli-0.2.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: bitchat_cli-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 34.2 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3a68becd91ed3abad76b5b563da78b777e063a51cef5d7d8010e0cb31dec9edf
MD5 d56d62cc6afea419c512812df50c0042
BLAKE2b-256 d3d621d1b20c22127caf7f27b41c6adfd4ae2ffe8489125ff073ebac5c760836

See more details on using hashes here.

Provenance

The following attestation bundles were made for bitchat_cli-0.2.0-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