ui

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StyleSet

type StyleSet struct {
	Success lipgloss.Style
	Warn    lipgloss.Style
	Error   lipgloss.Style
	Info    lipgloss.Style
	Panel   lipgloss.Style
	Title   lipgloss.Style
}

StyleSet holds the base styles used across Nimbus CLI commands.

type UI

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

UI provides styled output helpers for CLI commands.

func NewUI

func NewUI(in io.Reader, out, errOut io.Writer) *UI

NewUI constructs a UI with sensible defaults for styling.

func (*UI) AskConfirm

func (ui *UI) AskConfirm(label string, def bool) (bool, error)

AskConfirm prompts for a yes/no confirmation.

func (*UI) AskInput

func (ui *UI) AskInput(label, def string) (string, error)

AskInput prompts for a single line of text input.

func (*UI) AskMultiSelect

func (ui *UI) AskMultiSelect(label string, options []string, defaults []string) ([]string, error)

AskMultiSelect prompts for a multi-selection (checkbox list).

func (*UI) AskPassword

func (ui *UI) AskPassword(label string) (string, error)

AskPassword prompts for a password (input hidden).

func (*UI) AskSelect

func (ui *UI) AskSelect(label string, options []string, def string) (string, error)

AskSelect prompts for a single selection from a list.

func (*UI) Errorf

func (ui *UI) Errorf(format string, args ...any)

func (*UI) Infof

func (ui *UI) Infof(format string, args ...any)

func (*UI) Panel

func (ui *UI) Panel(title, body string)

Panel renders a titled panel using the panel and title styles.

func (*UI) Successf

func (ui *UI) Successf(format string, args ...any)

func (*UI) Warnf

func (ui *UI) Warnf(format string, args ...any)

Jump to

Keyboard shortcuts

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