tui

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package tui provides terminal UI components for ssmx.

Index

Constants

This section is empty.

Variables

View Source
var (
	StyleOnline   = lipgloss.NewStyle().Foreground(colourOnline).Bold(true)
	StyleOffline  = lipgloss.NewStyle().Foreground(colourOffline).Bold(true)
	StyleUnknown  = lipgloss.NewStyle().Foreground(colourUnknown)
	StyleHeader   = lipgloss.NewStyle().Bold(true).Underline(true).Foreground(lipgloss.Color("#ffffff"))
	StyleSelected = lipgloss.NewStyle().Background(colourSelected).Foreground(lipgloss.Color("#ffffff"))
	StyleDim      = lipgloss.NewStyle().Foreground(lipgloss.Color("#626262"))
	StyleBold     = lipgloss.NewStyle().Bold(true)
	StyleSuccess  = lipgloss.NewStyle().Foreground(colourOnline)
	StyleError    = lipgloss.NewStyle().Foreground(colourOffline)
	StyleWarning  = lipgloss.NewStyle().Foreground(lipgloss.Color("#ffaf00"))
)

Style variables for TUI rendering.

Functions

func RunPicker

func RunPicker(instances []awsclient.Instance) (*awsclient.Instance, error)

RunPicker runs the bubbletea instance picker and returns the chosen instance, or nil if the user cancelled.

func SSMStatusGlyph

func SSMStatusGlyph(status string) string

SSMStatusGlyph returns a single character indicator for SSM status.

func SSMStatusStyle

func SSMStatusStyle(status string) lipgloss.Style

SSMStatusStyle returns the appropriate lipgloss style for an SSM status string.

Types

type PickerModel

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

PickerModel is the bubbletea model for the interactive instance picker.

func NewPickerModel

func NewPickerModel(instances []awsclient.Instance) PickerModel

NewPickerModel creates a PickerModel populated with the given instances.

func (PickerModel) Init

func (m PickerModel) Init() tea.Cmd

Init implements bubbletea.Model.

func (PickerModel) Update

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

Update implements bubbletea.Model.

func (PickerModel) View

func (m PickerModel) View() string

View implements bubbletea.Model.

type PickerResult

type PickerResult struct {
	Instance *awsclient.Instance
}

PickerResult is returned when the user selects an instance or cancels.

Jump to

Keyboard shortcuts

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