← Back
← Back to Projects
· 4 min read

Protocol Alpha

Open SourceTypeScriptCLI
View on GitHub

Protocol Alpha

A robust protocol enabling developers to instantly map complex terminal outputs to interactive visual graphs. Protocol Alpha sits between your CLI tools and your eyes, transforming structured log streams into navigable, filterable visualizations rendered directly in the terminal.

protocol-alpha
[INFO] Connection established on port 443
[INFO] TLS handshake complete — cipher: AES-256
[WARN] Latency spike detected: 142ms
[INFO] Packet routed via node alpha-7
[INFO] Certificate verified — SHA-256
[DEBUG] Buffer flush: 2.4KB released
[INFO] Heartbeat ACK received
[WARN] Retry queue depth: 3
throughput

The terminal view above shows the live log ingestion panel alongside a throughput sparkline — color-coded entries (INFO, WARN, DEBUG) stream in while the chart tracks aggregate performance.

Problem

Modern backend systems produce enormous volumes of structured logs — JSON lines, trace spans, metric series. Developers typically pipe these through jq, grep, and awk chains that work but destroy the relationships between events. When debugging a distributed request, you’re mentally reconstructing a graph from a flat text stream.

Solution

Protocol Alpha intercepts structured output (JSON lines, CSV, or custom delimited formats) and renders it as an interactive TUI (terminal user interface). Traces become flame graphs. Time-series metrics become sparklines. Hierarchical data becomes collapsible trees. All without leaving the terminal.

Parser Pipeline

The input parser is pluggable — it auto-detects JSON lines, but you can register custom parsers for proprietary formats. Each parser emits a normalized event stream that the rendering engine consumes.

stdin → Format Detection → Parser → Normalized Events → Layout Engine → TUI Render

Layout Engine

The layout engine maps event types to visual primitives:

  • Trace spans → horizontal flame graph bars
  • Counters/gauges → rolling sparkline strips
  • Hierarchical data → collapsible tree nodes
  • Key-value pairs → aligned table columns with diff highlighting

Users can switch between layouts on the fly with keyboard shortcuts, and pin specific streams to persistent panels.

Key Features

  • Auto-detection of JSON lines, CSV, and custom delimited formats
  • Interactive flame graphs for distributed trace visualization
  • Rolling sparklines for time-series metrics in the terminal
  • Keyboard-driven navigation with Vim-style bindings
  • Pipe-friendly — works as a drop-in replacement for less or jq
  • Plugin system for custom parsers and renderers

Stack

LayerTechnology
RuntimeNode.js
LanguageTypeScript
TUIInk (React for CLI)
ParsingCustom streaming parser
Distributionnpm package