tui

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package tui provides the terminal user interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultKeyMap

func DefaultKeyMap() keyMap

DefaultKeyMap returns the default key bindings.

func Run

func Run(cfg *config.Config, plat platform.Platform) error

Run starts the TUI.

Types

type Model

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

Model is the main TUI model.

func New

func New(cfg *config.Config, plat platform.Platform, store storage.Store) Model

New creates a new TUI model. New constructs the TUI Model. Callers are responsible for opening the Store (so Close can be deferred in the caller's scope after Program.Run returns) and passing it in. The Model reuses that Store across every refresh, avoiding the sql.Open + migrate churn the old per-refresh pattern incurred.

func (Model) Init

func (m Model) Init() tea.Cmd

Init initializes the TUI.

func (Model) Update

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

Update handles messages.

func (Model) View

func (m Model) View() string

View renders the TUI.

type View

type View int

View represents the current view in the TUI.

const (
	ViewDashboard View = iota
	ViewAgentList
	ViewAgentDetail
	ViewCatalog
	ViewSettings
)

Directories

Path Synopsis
Package styles provides Lip Gloss styles for the TUI.
Package styles provides Lip Gloss styles for the TUI.

Jump to

Keyboard shortcuts

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