tui

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 7, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package tui is bumper's optional interactive terminal UI — the "hazard console". It is opt-in (`bumper tui` / `bumper list --tui`); the default CLI output stays plain and pipeable. The deterministic core never imports this.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunFindings

func RunFindings(fs []engine.Finding, set *rules.Set, llm, target string) error

RunFindings launches the hazard console for a scanned plan. target is the plan name shown in the navbar.

func RunRules

func RunRules(rs []*rules.Rule) error

RunRules launches the hazard console as a rule-set browser.

Types

type InitResult

type InitResult struct {
	Applied bool
	Lines   []string
}

InitResult is what RunInit reports back so the CLI can leave a persistent record after the alt-screen is torn down.

func RunInit

func RunInit(env setup.Env) (InitResult, error)

RunInit launches the interactive init wizard, seeded with the given default scopes. It applies the chosen configuration itself; the returned InitResult lets the caller leave a persistent record after the alt-screen is torn down.

type Model

type Model struct {
	// contains filtered or unexported fields
}

Model is the hazard-console state.

func NewFindings

func NewFindings(fs []engine.Finding, set *rules.Set, llm, target string) Model

NewFindings builds the board for a scanned plan. set is used to look up each finding's rule provenance (source/AVD); target is the plan name for the navbar.

func NewRules

func NewRules(rs []*rules.Rule) Model

NewRules builds the board for the rule set (`list --tui`).

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Model) View

func (m Model) View() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL