Beep
Beep is a local-first, terminal-native social network prototype built around cryptographic identity, signed immutable objects, peer-to-peer replication, and recoverable account ownership.
It is not a hosted platform. Beep is a Python CLI, Textual shell, local object store, and lightweight node runtime that together form an experimental decentralized social protocol.
Highlights
- Deterministic Ed25519 signing identities and X25519 encryption identities
- Immutable signed objects for posts, profiles, follows, chats, rooms, presence, and recovery metadata
- Local-first storage under the user's home directory
- Direct peer sync and relay-assisted discovery
- Encrypted direct messages and room messages
- Scrypt-backed local password storage and encrypted root seed files
- Identity Root Object (IRO) recovery using encrypted backup files or mnemonic seed recovery
- Classic command shell plus an optional Textual terminal UI
- Storage retention, pinning, inspection, and pruning commands
Project Status
Beep is alpha software. The current codebase is suitable for local development, protocol experimentation, and testing peer-to-peer workflows. Object schemas, network behavior, and retention policy are implemented in code, but the protocol is still evolving and should not be treated as a stable production standard.
Requirements
- Python 3.11 or newer
cryptographyrequests- Optional server runtime:
fastapi,uvicorn - Optional Textual UI:
textual - Optional packaging tools:
build,twine
Installation
Recommended install from PyPI:
pipx install beep-cli
Or install with pip:
python -m pip install beep-cli
For local development from this repository:
python -m venv venv
python -m pip install --upgrade pip
python -m pip install -e ".[server,ui,dev]"
For a minimal editable install:
python -m pip install -e .
Quick Start
Launch the classic persistent command shell:
beep
Or run it directly from the repository:
python cli.py
Inside the shell, commands begin with beep:
beep register -u alice -p pass123
beep login -u alice -p pass123
beep post "hello world"
beep fyp global
beep clear
Launch the Textual interactive shell:
beep shell
Direct one-shot commands are intentionally not the primary interface. If extra
arguments are passed to the installed beep entry point, the app starts the
persistent command shell and explains how to continue there.
Core Concepts
Identity
Human usernames are aliases. The protocol identity is the user's signing public key. Beep publishes short handles in the form:
username#handle
Fresh identities are deterministic by default:
- Signing:
seed-ed25519-v1 - Encryption:
seed-x25519-v1 - Legacy compatibility: optional
rsa-legacy-v1
RSA material is retained only for imported or recovered legacy history that still needs it. New live encrypted communication uses deterministic X25519.
Objects
Beep stores data as signed immutable objects with this common shape:
typeauthorcontenttimestampmetaidsignature
The implemented object families include:
postcommentsharequoteprofilekey_revocationtombstonepresenceirofollowchatdmroomroom_eventroom_message
Incoming objects are verified before storage. Invalid or untrusted objects are rejected by the local store and sync layer.
Identity Root Object
The Identity Root Object (IRO) is a signed, recoverable index owned by a user's public key. It tracks the owner's important object IDs and recovery references:
owner_pubkeyusernameobject_idspost_idschat_idsroom_idspeer_refs
IRO metadata supports multiple encrypted envelopes:
meta.encrypted: live deterministic owner access withx25519-aesgcm-v1meta.recovery_encrypted: seed recovery withseed-recovery-aes-gcm-v1meta.legacy_encrypted: optional RSA compatibility withrsa-oaep-v1
Mnemonic recovery uses the seed recovery envelope. Legacy RSA fields are carried only when the recovered identity actually has legacy state.
Storage
Beep stores local state under:
~/.beep/
Important locations include:
~/.beep/session.json
~/.beep/beep_users.json
~/.beep/beep_storage/
~/.beep/beep_storage/objects/
~/.beep/beep_storage/pins.json
The object retention policy protects local identity objects, authored content, followed-user objects, local chat and room history, recovery-critical objects, and explicit pins. Disposable replicated objects can be inspected or pruned with the storage commands.
Local password hashes use scrypt-v1 with per-user salts. Root seed files are
encrypted after password unlock, and signing keys are derived from the seed
rather than kept as separate plaintext private-key files. JSON state is written
with file locks, atomic replacement, and companion .bak recovery files.
Command Reference
Identity and Recovery
beep register -u <username> -p <password>
beep login -u <username> -p <password>
beep logout
beep connect
beep connect <username|username#handle>
beep backup create --file <path>
beep backup create --mnemonic
beep backup import --file <path>
beep restore --file <path>
beep restore --mnemonic "<phrase>" -p <password>
beep restore recover
Mnemonic backups now use the v2 24-word format backed by the BIP39 English 2048-word list. Legacy 56-word Beep v1 phrases remain restorable.
Feed, Posts, and Profiles
beep fyp global
beep fyp followed
beep fyp --live
beep next
beep hold
beep resume
beep post "content"
beep comment <object_id> "reply"
beep share <post_id>
beep quote <post_id> "text"
beep delete <post_id>
beep view <object_id>
beep profile
beep profile <username|username#handle>
beep profile --followers
beep profile --following
beep profile --posts
beep profile --shared
beep profile --rotate-key
beep follow <username|username#handle>
beep unfollow <username|username#handle>
Direct Messages
beep chat
beep chat <username|username#handle>
beep chat <username|username#handle> --live
beep chat <username|username#handle> "message" --cipher <profile>
beep say "message"
beep say "message" --cipher <profile>
beep read [--all | <number>]
beep exit
say sends to the active chat when the shell is in chat mode.
Optional Private Meaning Layer profiles can encode message text before encryption and decode it after decryption. See docs/private-meaning-layer.md.
beep cipher create ops
beep cipher set ops "meet tonight" X91
beep cipher export ops
beep cipher import ops.beepcipher
beep cipher rotate ops
beep cipher revoke ops
Rooms
beep room
beep room <name> [--private] [--ephemeral <ttl>]
beep join <name>
beep join <name> --live
beep invite <username>
beep say "message"
beep late [--all | <number>]
beep leave
beep dissolve
Ephemeral room TTLs accept values such as:
15s
1m
1h
2d
Room moderation commands:
beep mute <username>
beep unmute <username>
beep kick <username>
beep mod <username>
beep unmod <username>
Network, Peers, and Relays
beep network
beep network setup
beep network setup --relay <url>
beep network setup --peer <url>
beep network check
beep network check --live
beep peer add <url>
beep peer remove <url>
beep peer list
beep relay add <url>
beep relay remove <url>
beep relay list
beep relay policy
beep sync
beep config show
beep config effective
beep config path
beep config validate
beep config init
beep node status
beep node enable
beep node disable
beep node run [--port <port>]
Relay policy can be tuned from the shell:
beep relay policy set enabled on
beep relay policy set strategy prefer-direct
beep relay policy set strategy direct-only
beep relay policy set strategy relay-first
beep relay policy set presence-ttl 86400
beep relay policy set presence-refresh 900
beep relay policy set public-endpoint https://relay.example.net
beep relay policy set public-endpoint clear
See docs/relay-setup.md for a practical relay deployment guide.
Optional TOML configuration is supported through beep.toml,
~/.config/beep/config.toml, or ~/.beep/config.toml. See
docs/configuration.md.
Storage Retention
beep storage status
beep storage status --reason <reason>
beep storage inspect <object_id>
beep storage prune
beep storage prune --apply
storage prune performs a dry run by default. Use --apply to delete objects
that are not retained by the local policy.
Node API
The node runtime is a FastAPI application used for local sync, discovery, and object exchange. Run it manually with:
python -m network.node --host 0.0.0.0 --port 8000
Beep runs in client mode by default. Capable devices are prompted before node
mode is enabled. Mobile or low-capacity environments can stay client-only, and
users can still override the recommendation with beep node enable.
Hosting can be controlled with:
beep node enable
beep node disable
beep node status
On slower mobile environments such as Termux, node startup can take longer than
desktop startup. If beep node enable cannot start the background node, check
the log path shown by beep node status.
The node exposes endpoints for:
- Listing object IDs
- Fetching objects by ID
- Receiving objects from peers
- Inventory exchange
- Querying objects by author or type
- Recent object listing
- Identity resolution by username or handle
Incoming object POSTs are bounded by request-size, per-client rate limits,
author/IP quotas, retention limits, and optional denylists. Tune these with
beep relay policy set max-object-bytes, max-posts-per-minute,
max-objects-per-author, max-objects-per-ip, and retention-limit.
Private room objects are not auto-pushed to general peers or relays. This reduces accidental metadata leakage, but production private rooms still need encrypted metadata or access-aware sync.
Architecture
app.py Command loop, dispatch, live mode, session refresh
cli.py Installed entry point
commands/ User-facing command dispatchers
core/ Object model, schemas, hashing, signing, verification
crypto/ Seed, mnemonic, key, and signing helpers
models/ Lightweight domain models
network/ Node runtime, peer management, sync, discovery, reachability
node/ Runtime support helpers
storage/ Local persistence, profiles, objects, chats, rooms, recovery
ui/ Textual application and screens
utils/ Parsing, prompting, paging, and error helpers
tests/ Unit and end-to-end coverage
docs/ Operational documentation
Documentation
Development
Run the test suite with:
python -m unittest discover -s tests
Build distributions with:
python -m build
Validate release artifacts with:
python -m twine check dist/*
The project is packaged as beep-cli and exposes the console script:
beep = cli:main
Publishing
GitHub Actions trusted publishing is configured in:
.github/workflows/publish-pypi.yml
See Publishing Beep To PyPI for the release checklist.
Manual upload is a fallback only:
python -m twine upload dist/*
Security Notes
Beep uses cryptographic signatures and encrypted envelopes, but it is still an alpha project. Do not use it for high-risk communications or irreplaceable data. The code currently prioritizes local experimentation, protocol clarity, and compatibility with prior object history.
Important current rules:
- New identities are deterministic-only.
- New encrypted live communication uses X25519 envelopes.
- RSA is compatibility state, not a live dependency.
- Objects must verify before they are stored or replicated.
- Recovery-critical objects should remain pinned or otherwise retained.
License
Beep is licensed under the Apache License 2.0. See LICENSE.
Metadata
Release files for beep-cli 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| beep_cli-0.1.1.tar.gz | 149.0 kB | With provenance | Details for beep_cli-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| beep_cli-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for beep_cli-0.1.1-py3-none-any.whl |
Total release size: 310.7 kB
Release files / beep_cli-0.1.1.tar.gz
| Download URL | beep_cli-0.1.1.tar.gz |
|---|---|
| Size | 149.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
23fbf3d57e787d0305d97574ab449c59c58af0ce71a5a825a00e1c2e8467656c
|
|
BLAKE2b-256 checksum How to use checksums |
1876bdd973ef7132b9edb0f5ca3c3c62f2d26027d2ac1583baa6b4cee7446b75
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 7, 2026.
Transparency logRelease files / beep_cli-0.1.1-py3-none-any.whl
| Download URL | beep_cli-0.1.1-py3-none-any.whl |
|---|---|
| Size | 161.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
049a11a3c8929b4e6f8cc2746fef1b4ec185bf85a1c031658507c9f321bc7dc9
|
|
BLAKE2b-256 checksum How to use checksums |
f4abe30cfd2d0b5909cc9998a0bea4eb074bef8dbb609709ce75ba5df9e9088a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 7, 2026.
Transparency logSecurity for beep-cli 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for beep_cli-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 7, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.