-
Notifications
You must be signed in to change notification settings - Fork 1
output viewer
GitHub Actions Bot edited this page Apr 26, 2026
·
2 revisions
The Output Viewer streams live CLI command output into the Admin UI via Server-Sent Events (SSE). You see the same output you would see in a terminal, in real time, in the browser.
- Admin UI dispatches a CLI command (e.g.,
nself build). - The Admin backend spawns the CLI process and opens an SSE stream from its stdout/stderr.
- The Output Viewer panel subscribes to the SSE stream and renders each line as it arrives.
- When the CLI process exits, the stream closes and the Output Viewer shows exit code + elapsed time.
The panel appears at the bottom of the relevant Admin zone (e.g., Build zone for nself build). It supports:
- ANSI color codes, ɳSelf CLI color-codes its output. The Output Viewer renders colors correctly.
- Line-level buffering, Each line appears as soon as it's flushed, not after the command finishes.
- Search, Filter output lines by keyword.
- Copy, Copy the full output to clipboard.
-
Persist, Output is saved to LokiJS
activity_logcollection for the session so you can scroll back after the command finishes.
All CLI commands that produce streaming output are supported. Commands with interactive prompts (e.g., nself init --wizard) open a dedicated modal with a pseudo-TTY rather than the Output Viewer panel.
The SSE endpoint is exposed by the Admin backend:
GET /api/cli/stream?cmd=<base64-encoded-args>
Content-Type: text/event-stream
Each SSE event is a JSON payload:
{ "line": "...", "stream": "stdout|stderr", "exitCode": null }Final event when command exits:
{ "line": null, "stream": null, "exitCode": 0, "elapsed": 1234 }Version: 1.0.0 | Updated: 2026-09-16 11:21 UTC | GitHub