Expand description
bee-tui — internal library exposing the modules the binary
composes. Living as both a [lib] and a [[bin]] lets integration
tests in tests/ exercise the cockpit’s components against
fixtures, without launching the full TUI loop.
Public exports are stable for tests only — there is no ABI
commitment for downstream library users. Use the bee-tui
command-line binary, not this lib.
Modules§
- action
- alerts
- Webhook health-gate alerts. When a gate transitions to
Fail(or back toPassafter being broken), bee-tui POSTs a small JSON object to the operator-configured webhook URL. Slack and Discord-compatible — both accept the same{"text": "..."}shape on their incoming-webhook URLs. - api
- Thin wrapper around
bee::Clientthat binds it to a configuredNodeConfig. The cockpit talks to Bee through oneApiClientper active profile. - app
- bee_log
- Parser for Bee’s logfmt-with-quoted-keys log format. Each Bee log line looks like:
- bee_
log_ tailer - Background task that follows the supervised Bee process’s log
file, parses each new line, and ships entries down an mpsc to
the cockpit’s
crate::components::log_pane::LogPane. - bee_
log_ writer - Size-bounded rotating writer for the supervised Bee process’s captured stdout + stderr.
- bee_
supervisor - Spawn + manage a child Bee node from inside bee-tui.
- cli
- components
- config
- config_
doctor :config-doctor— read the operator’sbee.yaml, walk a curated list of deprecation / recommendation rules, and produce a report.- durability
:durability-check <ref>— the operator-facing answer to the single most-feared question: “is my data still alive?”- economics_
oracle - External cost-context oracles: xBZZ → USD price and Gnosis-chain basefee + tip. Both are read-only fetches off services Bee itself doesn’t expose. Live behind opt-in commands so a flaky external service can never block the cockpit.
- errors
- feed_
probe :feed-probe <owner> <topic>— single-shot lookup of the latest feed update for a(owner, topic)pair. The cockpit verb prints a one-line summary;--once feed-probeemits structured JSON for CI snapshot-checks of feed liveness.- feed_
timeline - Feed history walker — the data model behind the S14 Feed
Timeline screen and the
:feed-timelineverb. Builds on v1.5’scrate::feed_probe: probe gives us the latest index, then the walker fetches each prior index’s SOC chunk in parallel (bounded concurrency) and surfaces aVec<TimelineEntry>. - log_
capture - In-memory ring buffer of HTTP-traffic log events, fed by a custom
tracing-subscriberlayer that filters to thebee::httptarget. - logging
- manifest_
walker - Async walker for Mantaray manifests.
- metrics
- Prometheus exposition-format renderer for the gauges bee-tui
already computes. Pure: takes references to the live snapshots
and produces the
/metricsbody as aString. - metrics_
server - Tiny single-route HTTP/1.1 server for
/metrics. - once
bee-tui --once <verb> [args…]— single-shot CI mode.- pprof_
bundle - Async pprof + trace bundling for
:diagnose --pprof[=N]. - stamp_
preview - Pure math + formatting for the four
:*-previewcommand-bar verbs (:topup-preview,:dilute-preview,:extend-preview,:buy-preview). - state
- Persisted runtime state — the operator-tweaked, app-written
file that’s distinct from
config.toml(operator-edited, app-read-only). - theme
- Centralized colour palette. Set once at startup from
crate::config::UiConfig::theme; read by screens viaactive. - tui
- uploads
- Directory walker for
:upload-collection. Recursively reads a local directory and produces theVec<CollectionEntry>thatbee.file().upload_collection_entries(...)consumes. - utility_
verbs - Pure-local utility verbs.
- version_
check :check-version— long-running Bee operators silently drift behind upstream. This module hits GitHub’sreleases/latestforethersphere/beeand pairs the answer with the running Bee version (read from/health) so operators see “running 2.7.2 / latest 2.8.0 (released 2026-04-15)” at a glance.- watch
- k9s-style watch / informer layer.
Macros§
- trace_
dbg - Similar to the
std::dbg!macro, but generatestracingevents rather than printing to stdout.