tui

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package tui provides the shared BubbleTea TUI widget used by every OctalWeb CLI for the `up` and `down` commands. Styles live here so callers can reference them for post-TUI output.

Index

Constants

This section is empty.

Variables

View Source
var (
	StyleBrand         = lipgloss.NewStyle().Foreground(styles.Purple).Bold(true)
	StyleStep          = lipgloss.NewStyle().Foreground(styles.Mint)
	StyleMuted         = lipgloss.NewStyle().Foreground(styles.Muted)
	StyleError         = lipgloss.NewStyle().Foreground(styles.Error)
	StyleSuccess       = lipgloss.NewStyle().Foreground(styles.Mint)
	StyleSpinner       = lipgloss.NewStyle().Foreground(styles.Purple)
	StyleLog           = lipgloss.NewStyle().Foreground(styles.Fg)
	StyleStatusRunning = lipgloss.NewStyle().Foreground(styles.Mint)
	StyleTabActive     = lipgloss.NewStyle().Foreground(styles.Mint).Bold(true)
	StyleTab           = lipgloss.NewStyle().Foreground(styles.Muted)
	StyleWarn          = lipgloss.NewStyle().Foreground(styles.Warn)
)

Exported styles - available to callers for post-TUI output.

Functions

This section is empty.

Types

type Finder

type Finder interface {
	Find() (string, error)
}

Finder is satisfied by any type that can locate a project / module root. Both the Foreman's RootFinder and every Brigadier's ModuleFinder satisfy it.

type Model

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

Model is the BubbleTea model shared by every OctalWeb CLI's up / down command. It shows a spinner during pre-flight checks, then streams Tilt output into a bounded, scrollable viewport with a key-hint bar below it.

func NewDownModel

func NewDownModel(brand string, f Finder, argv []string) Model

NewDownModel constructs the TUI model for the `down` command.

func NewModel

func NewModel(brand string, f Finder, argv []string) Model

NewModel constructs the TUI model for the `up` command.

func (Model) FinalErr

func (m Model) FinalErr() error

FinalErr returns the tilt process exit error. Returns nil when the stop was user-initiated (Ctrl+C) - that is not an error.

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) LegacyMode

func (m Model) LegacyMode() bool

LegacyMode reports whether the user pressed 't' to switch to tilt's legacy terminal mode.

func (Model) Root

func (m Model) Root() string

Root returns the located project / module root (available after Tilt started).

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