Help us shape the future of Go! Take the 2026 Go Developer Survey

tui

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HintLine

func HintLine(label, command string) string

HintLine formats a "Next: command" style hint.

func MountPanel

func MountPanel(files []string, sources []string, stats string, hints []string) string

MountPanel renders a styled summary of a mount operation.

func ResultPanel

func ResultPanel(title string, lines []string, hints []string) string

ResultPanel renders a generic styled result panel.

Types

type MultiSelectItem

type MultiSelectItem struct {
	Key         string // Internal key (e.g., "claude")
	Label       string // Display label (e.g., "Claude Code")
	Description string // Optional description
	Selected    bool   // Initial selection state
}

MultiSelectItem represents a toggleable item.

type MultiSelectResult

type MultiSelectResult struct {
	Selected []string
	Aborted  bool
}

MultiSelectResult holds the selected keys.

func RunMultiSelect

func RunMultiSelect(title string, items []MultiSelectItem) (MultiSelectResult, error)

RunMultiSelect shows an interactive multi-select and returns the selected keys.

type PickerItem

type PickerItem struct {
	Name        string
	Description string
	Detail      string // e.g., "extends: base, 5 files"
}

PickerItem represents a selectable item in the profile picker.

type PickerResult

type PickerResult struct {
	Selected string
	Aborted  bool
}

PickerResult holds the outcome of the picker interaction.

func RunPicker

func RunPicker(items []PickerItem, prompt string) (PickerResult, error)

RunPicker shows an interactive fuzzy profile picker and returns the selection.

type Step

type Step struct {
	Kind        StepKind
	Key         string // Result key (e.g., "source_name")
	Title       string
	Description string
	Options     []PickerItem // For StepSelect
	Placeholder string       // For StepInput
	Default     string       // For StepInput or StepConfirm ("y"/"n")
}

Step defines a single step in a wizard flow.

type StepKind

type StepKind int

StepKind identifies the type of wizard step.

const (
	StepSelect  StepKind = iota // Choose from a list
	StepInput                   // Free-text input
	StepConfirm                 // Yes/No
)

type WizardResult

type WizardResult struct {
	Values  map[string]string
	Aborted bool
}

WizardResult holds the collected values from all steps.

func RunWizard

func RunWizard(steps []Step) (WizardResult, error)

RunWizard runs a multi-step wizard and returns the collected results.

Jump to

Keyboard shortcuts

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