ui

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package ui centralises terminal styling helpers used by the CLI.

Two modes:

  • fancy: lipgloss colors + emoji. For human terminals.
  • plain: no ANSI, ASCII tokens (e.g. "OK"). For pipes, AI agents, CI logs, or when --plain / NO_COLOR is set.

Index

Constants

This section is empty.

Variables

View Source
var Plain bool

Plain forces ASCII-only, color-free output. Set from the --plain flag.

Functions

func Arrow

func Arrow(plain bool) string

Arrow returns a bullet-style arrow for list items.

func Dim

func Dim(plain bool, s string) string

Dim renders secondary text in a muted color.

func Err

func Err(plain bool) string

Err returns the error marker.

func Header(plain bool, s string) string

Header styles column headers (bold + dim in fancy mode).

func Info

func Info(plain bool) string

Info returns the info marker.

func IsPlain

func IsPlain(w io.Writer) bool

IsPlain reports whether w should receive plain (AI-friendly) output. Order: explicit flag, NO_COLOR env, non-TTY writer.

func OK

func OK(plain bool) string

OK returns the success marker (fancy "✓" colored green, plain "OK").

func StatusBadge

func StatusBadge(plain bool, label string) string

StatusBadge returns a colored, emoji-prefixed status string for the labels produced by data.StatusLabel. In plain mode the label is returned verbatim.

func Title

func Title(plain bool, s string) string

Title styles top-level headers (bold + accent color in fancy mode).

func Warn

func Warn(plain bool) string

Warn returns the warning marker.

Types

This section is empty.

Jump to

Keyboard shortcuts

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