Implementation:0xSteph Pentest ai LiveView TUI
| Knowledge Sources | |
|---|---|
| Domains | CLI, TUI, Live_Dashboard |
| Last Updated | 2026-10-23 00:00 GMT |
Overview
Concrete tool for live event-bus-driven terminal dashboard rendering of engagement phases and findings as they happen, provided by the pentest-ai CLI module.
Description
The LiveView class is a Rich live dashboard driven by the engine event bus (engine.events). It renders the engagement as it happens: the current phase, findings filling in, and each finding's verdict flipping from candidate to VERIFIED the moment an oracle earns it. Reads only from the event bus, never from orchestrator internals. This is the screen-recordable moment — the proof appearing live.
Usage
Import this class when you need to show a live engagement view in the terminal. Used by ptai start --live to stream real-time engagement progress.
Code Reference
Source Location
- Repository: 0xSteph_Pentest_ai
- File: cli/tui.py
- Lines: 1-106
Signature
class LiveView:
def __init__(self, target: str): ...
def on_event(self, event: ev.Event) -> None: ...
def render(self) -> Group: ...
Import
from cli.tui import LiveView
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| target | str | Yes | Target URL for display in header |
| event | ev.Event | Yes | Engine event bus events (PhaseStarted, CandidateFound, VerdictChanged, etc.) |
Outputs
| Name | Type | Description |
|---|---|---|
| render() | Rich Group | Panel with phase, findings table, verdict badges |
Usage Examples
Live Engagement View
import asyncio
from cli.tui import LiveView
from engine import events as ev
from rich.live import Live
view = LiveView(target="https://example.com")
# Subscribe to event bus
ev.subscribe(view.on_event)
with Live(view.render(), refresh_per_second=4) as live:
while not view.done:
live.update(view.render())
await asyncio.sleep(0.25)