Skip to main content

Unified Styrene library and headless daemon for RNS/LXMF mesh networking

Project description

styrened

Daemon, library, and TUI for Reticulum mesh networks.

Overview

styrened is the core of the Styrene mesh networking stack. It provides a headless daemon for edge devices, a terminal UI for interactive fleet management, and a Python library for building mesh applications on RNS/LXMF.

Key Features:

  • Mesh daemon — headless operation on edge devices (Raspberry Pi, NixOS, containers)
  • Terminal UI — full-featured TUI for fleet management, chat, device provisioning
  • RPC over LXMF — remote device management (status, exec, reboot, config)
  • Device discovery — automatic mesh topology tracking
  • Auto-reply — automated message responses with cooldown
  • Direct links — point-to-point RNS links for status queries and speedtests
  • Mesh VPN — WireGuard tunnels bootstrapped over LXMF (IPv6 ULA addressing)
  • HTTP API (optional) — REST/WebSocket endpoints for external integration
  • Nix flake — declarative NixOS deployment with OCI container builds

Installation

# Full stack: daemon + TUI (via meta-package)
pip install styrene

# Daemon only (minimal dependencies)
pip install styrened

# Daemon + TUI
pip install styrened[tui]

# All extras
pip install styrened[tui,web,metrics,yubikey]

Nix Flake

nix run github:styrene-lab/styrened

Container

docker pull ghcr.io/styrene-lab/styrened:latest

Usage

# Run daemon
styrened daemon

# Run TUI
styrene

# CLI tools
styrened devices              # List discovered mesh devices
styrened devices -w 10        # Wait 10s for announces
styrened status               # Local daemon health
styrened status <dest>        # Query remote node
styrened send <dest> "hello"  # Send message
styrened exec <dest> uptime   # Remote command execution
styrened doctor               # Installation diagnostics
styrened doctor --setup       # Interactive setup wizard
styrened identity             # Show local identity

Architecture

┌──────────────────────────────────────┐
│  styrened                            │
│  ├── tui/          Terminal UI       │  pip install styrened[tui]
│  ├── services/     Business logic    │
│  ├── protocols/    LXMF routing      │
│  ├── rpc/          Remote mgmt       │
│  ├── models/       Data models       │
│  └── web/          HTTP API          │  pip install styrened[web]
├──────────────────────────────────────┤
│  RNS + LXMF (Reticulum Stack)       │
└──────────────────────────────────────┘

Async-first — all network operations use asyncio. The daemon runs an event loop with periodic tasks for announces, discovery, and mesh maintenance.

Protocol discrimination — LXMF messages are routed to handlers based on fields["protocol"], supporting chat (NomadNet/MeshChat), Styrene wire protocol, and VPN handshake messages.

Configuration

Config file: ~/.styrene/config.yaml

identity:
  display_name: "My Node"

reticulum:
  mode: standalone
  interfaces:
    peers:
      - host: rns.styrene.io
        port: 4242

rpc:
  enabled: true

chat:
  auto_reply_mode: template
  auto_reply_message: "Automated node"

mesh_vpn:
  enabled: false
  gateway: false

Installation Extras

Extra Adds
[tui] Terminal UI (textual, psutil)
[web] HTTP API (fastapi, uvicorn)
[metrics] Prometheus metrics
[yubikey] YubiKey authentication

Development

git clone https://github.com/styrene-lab/styrened
cd styrened
pip install -e ".[tui,dev]"

just test-unit    # ~5s, 2200+ tests
just test         # Full suite
make lint         # ruff
make typecheck    # mypy
make validate     # lint + typecheck + test

Related Projects

  • styrene-rs — Rust RNS/LXMF implementation (interoperable wire protocol)
  • styrene-pypi — PyPI meta-package (pip install styrene)
  • Reticulum — The underlying mesh networking stack

License

MIT

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

styrened-0.14.0.tar.gz (7.2 MB view details)

Uploaded Source

Built Distribution

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

styrened-0.14.0-py3-none-any.whl (587.6 kB view details)

Uploaded Python 3

File details

Details for the file styrened-0.14.0.tar.gz.

File metadata

  • Download URL: styrened-0.14.0.tar.gz
  • Upload date:
  • Size: 7.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for styrened-0.14.0.tar.gz
Algorithm Hash digest
SHA256 21ad659985a27d560b9c9bf952827599e7f2690a2f43f4030bcaf1cfbcc662c4
MD5 0efd5777577df62667aed6802f5b5dfb
BLAKE2b-256 4310834b80721e333f1b137b5c7d2119e7e7610ca8ffe8a7f152ad69bd3974ee

See more details on using hashes here.

File details

Details for the file styrened-0.14.0-py3-none-any.whl.

File metadata

  • Download URL: styrened-0.14.0-py3-none-any.whl
  • Upload date:
  • Size: 587.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for styrened-0.14.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f2c71580481fbf6a259a2bcc512e0bc5aa4987cae151958066bd5604eecf5950
MD5 b70ef3ebd52c6697f2b737bc44100c93
BLAKE2b-256 5eb1fe75f61a228bf63db4b8c79f795948c5dafe826eb15a583a7c603244cfaa

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