Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:0xSteph Pentest ai LiveView TUI

From Leeroopedia
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

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)

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment