Skip to content
PardhuVarma Konduru edited this page Jul 16, 2026 · 5 revisions

kb-tui — Terminal User Interface

Language: Rust (ratatui + tonic) · Primary Maintainer: Pardhu Varma — Ratatui Design & Architecture · Collaborators: Rupa — TUI Design & CLI Tooling, Tejaswini — Operator Auth Pipelines & SSH Management

SSH-accessible terminal dashboard for KB operators — designed for headless server environments and zero-overhead incident response where a browser isn't available or desirable.

Features

  • Live process table with zone colors (green/yellow/red — Safe/Suspicious/Borderlands), sortable and filterable
  • Real-time alert feed with severity coloring and evidence detail
  • System telemetry header (events/sec sparkline, active process count)
  • Interactive query console (typed mini-language over the KernelBorderlands gRPC API)
  • Keyboard-driven containment actions with a confirmation modal
  • Graceful offline/demo mode when the control plane is unreachable

Transport & Access

kb-tui does not implement its own SSH server. SSH termination, host keys, and authorized_keys handling live entirely in kbd (see kb-control-plane):

ssh kb@kb-server

kbd validates the connection, allocates a PTY, and spawns the kb-tui binary attached to that session's stdin/stdout. kb-tui itself connects to kbd's gRPC service (KernelBorderlands, defined in kb-control-plane/proto/kb.proto) over the Unix domain socket at /run/kb/kba.sock — the same UDS gRPC gateway used by kb-checker and the Ray agent swarm. Running kb-tui locally (cargo run) talks to kbd over that same UDS directly, no SSH hop required for local dev.

Structure

kb-op/kb-tui/
├── build.rs        tonic-build codegen from kb-control-plane/proto/kb.proto
├── src/
│   ├── main.rs      Entry point, terminal setup/teardown, event loop
│   ├── kb.rs         Generated proto module include
│   ├── grpc.rs       UDS gRPC client + background streaming tasks
│   ├── app.rs        Application state and input handling
│   ├── ui.rs          ratatui rendering (tabs, table, alerts, console, modals)
│   └── demo.rs       Synthetic data generator for offline/demo mode

Run Locally

cd kb-op/kb-tui
cargo run

Run tests

cargo test

See also: Architecture (Layer 4 — Operator Interface), kb-control-plane (gRPC backend), kb-dashboard (the browser-based alternative surface).

Clone this wiki locally