ui

package
v0.0.0-...-21d5d2c Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

type Session struct {
	In  io.Reader
	Out io.Writer
	Err io.Writer
	// contains filtered or unexported fields
}

func NewSession

func NewSession(in io.Reader, out, err io.Writer) Session

func (Session) Badge

func (s Session) Badge(text string, tone Tone) string

func (Session) Banner

func (s Session) Banner(title, subtitle string) string

Banner renders a branded header with the tool name and optional tagline.

╭─────────────────────────────────────╮
│  ◆ Subspace                         │
│  Scaffold complete                  │
╰─────────────────────────────────────╯

func (Session) ColorEnabled

func (s Session) ColorEnabled() bool

func (Session) Command

func (s Session) Command(cmd string) string

func (Session) Divider

func (s Session) Divider() string

Divider renders a subtle horizontal rule.

func (Session) Errorln

func (s Session) Errorln(text string)

func (Session) InfoBox

func (s Session) InfoBox(rows [][2]string) string

InfoBox renders key-value pairs inside a bordered box.

╭──────────────────────────────────╮
│  Workspace    text-the-internet  │
│  State        RUNNING            │
│  Editor       VSCode (Browser)   │
╰──────────────────────────────────╯

func (Session) InfoBoxWithTitle

func (s Session) InfoBoxWithTitle(title string, rows [][2]string) string

InfoBoxWithTitle renders a titled info box.

╭ Workspace info ──────────────────╮
│  Name     text-the-internet      │
│  State    RUNNING                │
╰──────────────────────────────────╯

func (Session) Interactive

func (s Session) Interactive() bool

func (Session) KeyValue

func (s Session) KeyValue(rows [][2]string) string

func (Session) Label

func (s Session) Label(label string) string

func (Session) Muted

func (s Session) Muted(text string) string

func (Session) Println

func (s Session) Println(text string)

func (Session) PromptSelect

func (s Session) PromptSelect(label string, options []string, defaultValue string) (string, error)

func (Session) Section

func (s Session) Section(title string) string

func (Session) Status

func (s Session) Status(text string, tone Tone) string

func (Session) StatusBadge

func (s Session) StatusBadge(text string, tone Tone) string

StatusBadge renders a pill-style status indicator like [RUNNING] in color.

func (Session) Step

func (s Session) Step(text string) string

Step renders a completed step indicator: ✓ Connecting to repository

func (Session) StepWarn

func (s Session) StepWarn(text string) string

StepWarn renders a warning step: ! Something to note

func (Session) Table

func (s Session) Table(headers []string, rows [][]string) string

func (Session) Title

func (s Session) Title(title, subtitle string) string

Title renders a prominent heading with optional subtitle below.

type Tone

type Tone string
const (
	ToneAccent  Tone = "accent"
	ToneSuccess Tone = "success"
	ToneWarning Tone = "warning"
	ToneMuted   Tone = "muted"
	ToneError   Tone = "error"
)

Jump to

Keyboard shortcuts

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