Skip to main content

A Python implementation of the BitChat decentralized, peer-to-peer, encrypted chat application over BLE.

Project description

BitChat Python

A Python implementation of the BitChat decentralized, peer-to-peer, encrypted chat application over BLE.

This project is a fork of bitchat-python. This fork contains improvements that possibly not yet merged to original project.

This project is a rewrite of the original Rust-based bitchat-terminal.

Table of contents

Installation

With pip

pip install pybitchat

With uv package and project manager

uv tool install pybitchat

With pipx standalone python apps panager

pipx install pybitchat

Usage

Simple start

Installed with pip, uv tool, pipx

bitchat-python

With uvx command

[!NOTE] This will only work once the project is published to the PyPI index.

uvx bitchat-python

CLI startup options

  -h, --help     show this help message and exit
  -d, --debug    enable BASIC debug (connection info)
  -v, --verbose  enable FULL debug (verbose output)
  -u, --usage    show usage info
  -V, --version  show program`s version number and exit
  --log [LOG]    log file path. If no path is provided, logs to 'bitchat.log'. If --log is omitted, no logging occurs.

BitChat Commands

This section details the various commands available within BitChat.

General Commands

* `/help`               : Show this help menu
* `/h`                  : Alias for /help
* `/me`                 : Get your Nickname and peer_id
* `/name <name>`        : Change your nickname
* `/status`             : Show connection info
* `/clear`              : Clear the screen
* `/exit`               : Quit BitChat


Navigation Commands

* `1-9`                 : Quick switch to conversation
* `/list`               : Show all conversations
* `/switch`             : Interactive conversation switcher
* `/public`             : Go to public chat


Messaging Commands

(Type normally to send in current mode)

* `/dm <name>`          : Start private conversation
* `/dm <name> <msg>`    : Send quick private message
* `/reply`              : Reply to last private message


Channel Commands

* `/j #channel`               : Join or create a channel
* `/j #channel <password>`    : Join with password
* `/leave`                    : Leave current channel
* `/pass <pwd>`               : Set channel password (owner only)
* `/transfer @user`           : Transfer ownership (owner only)


Discovery Commands

* `/channels`                 : List all discovered channels
* `/online`                   : Show who`s online
* `/w`                        : Alias for `/online`


Privacy & Security Commands

* `/block @user`       : Block a user
* `/block`             : List blocked users
* `/unblock @user`     : Unblock a user

Clone, Develop and Build

[!TIP]
uv package and project manager usage recommended for this step

Clone and setup editable environment using uv

git clone https://github.com/o-murphy/pybitchat.git
cd bitchat-python
uv sync --dev
.venv/bin/activate

Type checking with

uv run mypy 

Linting and Formatting

Lint

uv run ruff check

Format

uv run ruff format

Build sdist and wheel

uv build

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

pybitchat-0.1.0.tar.gz (30.1 kB view details)

Uploaded Source

Built Distribution

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

pybitchat-0.1.0-py3-none-any.whl (30.9 kB view details)

Uploaded Python 3

File details

Details for the file pybitchat-0.1.0.tar.gz.

File metadata

  • Download URL: pybitchat-0.1.0.tar.gz
  • Upload date:
  • Size: 30.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.8.0

File hashes

Hashes for pybitchat-0.1.0.tar.gz
Algorithm Hash digest
SHA256 67962474a4a1b90e3ca952a2a7dade7c695e341ffc41933ba75d4f1d60fb5016
MD5 9f2a654e5e0017272083b641110a7b6f
BLAKE2b-256 68e3969596e623c259ecc411a7dd7a793724ebb43910879c7c5adfee53e1a9c0

See more details on using hashes here.

File details

Details for the file pybitchat-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pybitchat-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 30.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.8.0

File hashes

Hashes for pybitchat-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0b34353aade14bb907733349222bed837ff422f53c45d00cd19790256f152b4c
MD5 f3c406ef22dd4c3811359cb86c31e840
BLAKE2b-256 0b060d6c75116a783948450690156a88023d83b5f86b03ccc69815d65c36d6d2

See more details on using hashes here.

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