ui

package
v0.0.0-...-deb4ee6 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bold

func Bold(msg string)

func Dim

func Dim(msg string)

func Error

func Error(msg string)

func Fatal

func Fatal(err error)

Fatal prints an error and exits with code 1.

func GreenText

func GreenText(s string) string

GreenText / RedText return coloured strings (no newline) for inline use.

func Info

func Info(msg string)

func IsTerminal

func IsTerminal() bool

IsTerminal reports whether stdout is connected to an interactive terminal. Returns false in CI pipelines, MCP mode (stdin/stdout = JSON-RPC pipe), or when output is redirected/piped.

func JSON

func JSON(v any) error

JSON prints v as indented JSON to stdout.

func PrefixWriter

func PrefixWriter(w io.Writer, prefix string) io.Writer

PrefixWriter returns an io.Writer that prepends prefix to every output line. Safe to use with docker build / docker pull output (handles \r progress lines).

func PrintBanner

func PrintBanner(version string)

PrintBanner affiche le banner pilot.

func RedText

func RedText(s string) string

func Spinner

func Spinner(label string, fn func() error) error

Spinner runs fn in the background while showing an animated spinner on stderr. In MCP mode (stdout = JSON-RPC pipe), the spinner is suppressed — fn still runs. It prints a success or error message when fn returns.

func Success

func Success(msg string)

func Warn

func Warn(msg string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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