SessionCast Markup — Rich UI Widgets in Your Terminal
CLI agents can now render rich UI components in the web viewer by outputting special markup blocks in the terminal.
How It Works
When your CLI agent prints a fenced code block with the sessioncast language tag, the web viewer detects it and renders an interactive widget instead of raw text.
type: card
title: Build Status
status: success
body: All 42 tests passed in 3.2sThe viewer parses the YAML inside the block and renders the appropriate component — cards, tables, charts, buttons, forms, and more.
Supported Widget Types
- card — Info card with title, status badge, and body text
- table — Data table with sortable columns
- chart — Simple bar/line charts for metrics
- button — Clickable action buttons
- form — Input forms with text fields, dropdowns, checkboxes
- progress — Progress bars with percentage
- alert — Warning, error, info, and success alerts
Example: Status Dashboard
type: table
title: Service Health
columns: [Service, Status, Latency]
rows:
- [API, "Healthy", "12ms"]
- [Relay, "Healthy", "3ms"]
- [Auth, "Degraded", "250ms"]For AI Agent Developers
This is designed for AI coding agents that use SessionCast. Instead of dumping plain text to the terminal, your agent can output structured markup that renders as proper UI in the viewer.
Use cases:
- Build results — show test results in a table, not a wall of text
- Progress tracking — render a progress bar for long-running tasks
- Interactive forms — let viewers fill in parameters without typing commands
- Dashboards — display metrics and status at a glance
How the Viewer Detects It
The web viewer scans terminal output for sessioncast blocks using a regex-based detector. When found, it extracts the YAML, validates the schema, and renders the matching React component. Unknown types are silently ignored and displayed as raw text.
Requirements
- Web Viewer — latest version at
app.sessioncast.io - Any CLI agent that can print to stdout