ui

package
v0.80.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const CatchPhrase = "Every release deserves a héraut."

CatchPhrase is the tagline displayed under the logo.

Variables

This section is empty.

Functions

func Accent added in v0.23.0

func Accent() forgeui.Accent

Accent is heraut's brand — Heraldic: gold title/program/flags, azure commands — over forge's shared palette (forge ADR-0010).

func Err added in v0.8.0

func Err(w io.Writer, msg string) string

Err returns "✗ <msg>" styled red when w supports color, plain otherwise.

func Header(w io.Writer, title string)

Header writes a bold section title to w, surrounded by blank lines.

func HelpLong

func HelpLong() string

HelpLong returns the ASCII art + tagline, gold-accented, for use as cobra root.Long.

func HuhTheme added in v0.23.0

func HuhTheme() huh.ThemeFunc

HuhTheme is heraut's branded interactive-form theme.

func Info added in v0.8.0

func Info(w io.Writer, msg string) string

Info returns " <msg>" dimmed when w supports color, plain otherwise.

func IsTTY added in v0.44.0

func IsTTY(w io.Writer) bool

IsTTY reports whether w is an interactive terminal.

func Success added in v0.8.0

func Success(w io.Writer, msg string) string

Success returns "✓ <msg>" styled green when w supports color, plain otherwise.

func VersionTemplate

func VersionTemplate() string

VersionTemplate returns a cobra text/template string for --version output. cobra fills {{.Name}} and {{.Version}} at runtime.

func Warn added in v0.8.0

func Warn(w io.Writer, msg string) string

Warn returns "! <msg>" styled yellow when w supports color, plain otherwise.

func WarnLines added in v0.69.0

func WarnLines(w io.Writer, msg string)

WarnLines writes msg to w as a warning: the first line through Warn, every following line verbatim (already indented by the caller).

Types

type StepFn added in v0.11.0

type StepFn func(name string, fn func() (result string, subs []string, err error)) error

StepFn is the type of a function that wraps one named pipeline step. The pipeline calls it per step; app wires it to a forge ui.Spinner (see app.spinnerReporter). When the reporter is nil, the pipeline calls fn directly.

  • result: shown as "✓ N/M name — result" when non-empty; omitted otherwise
  • subs: zero or more sub-result labels printed as indented lines beneath
  • err: step failure; rendered "✗ N/M name — err"

Jump to

Keyboard shortcuts

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