Components

Styrene has four operator-facing components and a shared crate ecosystem.

nex

Machine lifecycle tool. Manages packages, operator identity, and provisioning. Published on crates.io as nex-pkg.

StatusProduction
Binarynex
Sitenex.styrene.io

Capabilities

  • Package managementnex install, nex remove, nex adopt, nex migrate over nix-darwin, NixOS, and Homebrew
  • Identitynex identity init/show/ssh/git/link — create and manage StyreneIdentity
  • Provisioningnex init, nex forge, nex polymerize, nex profile, nex build-image
  • Healthnex doctor, nex self-update

See nex + styrene for how it fits with the runtime tools.

styrene CLI

Unified binary for mesh operations. Combines the daemon, TUI, and one-shot CLI in a single tool with feature flags.

StatusAlpha
Binarystyrene
Featuresdaemon (default), cli (default), tui (optional)

Commands

CommandPurpose
styrene daemonRun mesh daemon in foreground
styrene statusShow mesh status
styrene peersList discovered peers
styrene sendSend LXMF message
styrene messagesShow conversation history
styrene identityShow daemon identity
styrene announceTrigger mesh announce
styrene configShow daemon configuration

See Styrene CLI for full documentation.

styrened

Unified daemon, shared library, and TUI for the Styrene mesh. The TUI is bundled as a subpackage (styrened.tui), installed via the [tui] extra.

StatusAlpha
DependenciesRNS, LXMF, PyYAML, SQLAlchemy, msgpack
TUI FrameworkTextual 8.0
Tests~3,844+ (unit, TUI, mesh, bare-metal)
ThemeImperial CRT (green phosphor terminal)

Installation

pipx install styrene                    # Recommended (daemon + TUI, isolated env)
pip install styrened                    # Daemon + library only (no TUI, for edge devices)
nix run github:styrene-lab/styrened     # Nix flake

Entry Points

CommandPurpose
styreneLaunch TUI (styrene --upgrade to self-update)
styrenedDaemon CLI (headless)

As Daemon (runs on edge devices)

  • RPCServer — fleet management commands
  • AutoReplyHandler — responds to NomadNet/MeshChat users
  • LXMFService — messaging with optional propagation node mode
  • Device Discovery + NodeStore — persistent mesh topology
  • TerminalService — remote shell via PTY over RNS Link
  • IPC Control Server — Unix socket for local CLI/TUI
  • HTTP API — optional REST endpoints

As TUI (operator interface)

The TUI (styrened.tui) is a Textual-based terminal application using the Imperial CRT theme.

Screens:

  • Dashboard — Fleet overview with mesh device table, activity feed
  • Chat — Encrypted LXMF conversations with delivery tracking
  • Device Detail — Mesh node info, actions (Message, Add Contact, Copy Hash)
  • Settings — Tabbed: Identity, Network, Fleet, System
  • Exploration — Non-Styrene RNS announces
  • Upgrade — In-app self-update with live progress
  • First-Run Wizard — Initial setup and daemon connection

Network Settings (7 panels):

  • STYRENE COMMUNITY HUB — Single toggle (default ON), controls both transport peer and LXMF propagation destination
  • TRANSPORT — Mode, transport toggle, announce interval
  • PEERS — Dynamic add/remove of RNS transport peers
  • PROPAGATION — LXMF propagation destination hash (auto-synced with community hub toggle, accepts custom 32-char hex)
  • LOCAL DISCOVERY — AutoInterface toggle
  • SERVER — Server interface (IP/port)
  • BATMAN-ADV MESH — mesh_id, channel, gateway_mode

As Library

  • RPC client/server implementations
  • Wire protocol v2 encoding/decoding
  • Message models and data structures
  • Service lifecycle management (LXMFService, ConfigService, NodeStore)
  • Device discovery and conversation services

Community Hub Integration

New installs default to the Styrene Community Hub (rns.styrene.io:4242):

  • RNS transport peer for announce relay
  • LXMF propagation destination for store-and-forward messaging
  • COMMUNITY_HUB_PROPAGATION_HASH constant in models/config.py
  • OPERATOR profile defaults set this as lxmf.propagation_destination

Theme: Imperial CRT

┌─ Imperial CRT Phosphor Palette ──────────────────────────┐
│  Bright:  #39ff14  Active elements, highlights, success  │
│  Medium:  #32cd32  Standard text, borders                │
│  Dim:     #228b22  Secondary text, inactive elements     │
│  Dark:    #1a5c1a  Subtle borders, separators            │
│  Background: #0a0a0a                                     │
└──────────────────────────────────────────────────────────┘

NixOS Integration

{
  imports = [ ../common/styrened.nix ];
  styrene.daemon.enable = true;
}

styrene-edge

Infrastructure-as-code and provisioning toolchain for the hardware fleet.

StatusProduction
FormatNix configurations + Python (Forge)

Active Devices

DeviceArchBootMedia
MiniGMK (x86-generic)x86_64UEFI 64USB installer
Q502L (x86-generic)x86_64UEFI 64USB installer
T100TAx86_64UEFI 32USB installer
Raspberry Pi 4aarch64U-BootDirect SD
Raspberry Pi Zero 2Waarch64U-BootDirect SD
RG35XX Haarch64U-BootDirect SD
R36Saarch64U-BootDirect SD

Usage

# Build SD card image for RPi 4 (fetches from Cachix)
nix build ./sbc#packages.aarch64-linux.rpi4-sd

# Launch Forge TUI for USB media preparation
just run

# Run polymerize.sh on target device after booting USB
sudo /iso/styrene/polymerize.sh

Structure

styrene-edge/
├── sbc/
│   ├── flake.nix               # Nix flake for SD card images
│   ├── common/
│   │   ├── base.nix            # styrene.base NixOS module (shared config)
│   │   ├── batman-mesh.nix     # styrene.mesh BATMAN-adv module
│   │   ├── styrened.nix        # styrene.daemon module
│   │   └── cosmic-desktop.nix  # styrene.desktop COSMIC DE module
│   ├── rpi4/configuration.nix
│   ├── rpi-zero2w/configuration.nix
│   ├── x86-generic/
│   │   ├── configuration.nix
│   │   └── polymerize.sh       # NixOS installer for UEFI x86
│   └── t100ta/
│       ├── configuration.nix
│       └── polymerize.sh       # NixOS installer for 32-bit UEFI
├── firmware/                    # Upstream firmware manifests
│   ├── sources.yaml            # Pinned releases (version + sha256)
│   └── fetch.sh                # Download and verify pinned artifacts
├── forge/                      # Styrene Forge (media prep TUI)
│   ├── data/devices.yaml       # Device catalog
│   └── services/
│       ├── media_writer.py     # USB/SD media writer
│       └── bundle_builder.py   # Config bundler
├── installs/                   # Runbook tracking
├── keys/                       # Builder SSH keys (public only in git)
├── mcu/                        # Microcontrollers (RP2040, ESP32, nRF)
└── router/                     # OpenWrt mesh routers

styrene-rs

Rust implementation of the Styrene platform. Canonical home for all styrene-* crates.

StatusAlpha — daemon functional, TUI functional, CLI new
Repostyrene-lab/styrene-rs

Crate Inventory

Apps:

CratePurpose
styreneUnified binary — daemon + TUI + CLI
styrenedDaemon library (depended on by styrene)
styrene-tuiTUI library (depended on by styrene with tui feature)

Core libraries:

CratePurposecrates.io
styrene-identityKey hierarchy, signing, file encryption, discovery, key formatting0.2.0
styrene-rnsRNS protocol core — identity, destinations, links, transports
styrene-lxmfLXMF messaging — router, propagation, stamps
styrene-meshWire protocol envelope (msgpack framing)
styrene-ipcIPC trait definitions and types
styrene-ipc-serverIPC server + wire protocol
styrene-servicesDomain services (conversations, node store)
styrene-rbacRole-based access control
styrene-secretsSecrets management0.1.1

Ecosystem:

CratePurpose
styrene-forgeForge API types (shared by scribe, codex, omegon)
styrene-mqttMQTT 5.0 event fabric
styrene-tunnelPQC tunnel management (stub)
styrene-amcpCasparCG AMCP protocol client

Relationship Diagram

Component relationships

See Also

Graph