| Function |
ColorEnabled |
func ColorEnabled() bool |
ColorEnabled returns true if ANSI color output is enabled. |
100.0% statement coverage. |
| Function |
SetColorEnabled |
func SetColorEnabled(enabled bool) |
SetColorEnabled enables or disables ANSI color output. |
100.0% statement coverage. |
| Type |
AnsiStyle |
type AnsiStyle struct { ... } |
AnsiStyle represents terminal text styling. |
Declaration only; referenced in ansi_test.go, styles_test.go. |
| Function |
NewStyle |
func NewStyle() *AnsiStyle |
NewStyle creates a new empty style. |
100.0% statement coverage. |
| Method |
AnsiStyle.Bold |
func (s *AnsiStyle) Bold() *AnsiStyle |
Bold enables bold text. |
100.0% statement coverage. |
| Method |
AnsiStyle.Dim |
func (s *AnsiStyle) Dim() *AnsiStyle |
Dim enables dim text. |
100.0% statement coverage. |
| Method |
AnsiStyle.Italic |
func (s *AnsiStyle) Italic() *AnsiStyle |
Italic enables italic text. |
0.0% statement coverage. |
| Method |
AnsiStyle.Underline |
func (s *AnsiStyle) Underline() *AnsiStyle |
Underline enables underlined text. |
100.0% statement coverage. |
| Method |
AnsiStyle.Foreground |
func (s *AnsiStyle) Foreground(hex string) *AnsiStyle |
Foreground sets foreground color from hex string. |
100.0% statement coverage. |
| Method |
AnsiStyle.Background |
func (s *AnsiStyle) Background(hex string) *AnsiStyle |
Background sets background color from hex string. |
0.0% statement coverage. |
| Method |
AnsiStyle.Render |
func (s *AnsiStyle) Render(text string) string |
Render applies the style to text. |
72.2% statement coverage. |
| Function |
SemVer |
func SemVer() string |
SemVer returns the full SemVer 2.0.0 version string. |
0.0% statement coverage. |
| Function |
WithAppName |
func WithAppName(name string) |
WithAppName sets the application name used in help text and shell completion. |
100.0% statement coverage. |
| Type |
LocaleSource |
type LocaleSource = i18n.FSSource |
LocaleSource pairs a filesystem with a directory for loading translations. |
Declaration only; no direct test references found. |
| Function |
WithLocales |
func WithLocales(fsys fs.FS, dir string) LocaleSource |
WithLocales returns a locale source for use with MainWithLocales. |
0.0% statement coverage. |
| Type |
CommandSetup |
type CommandSetup func(c *core.Core) |
CommandSetup is a function that registers commands on the CLI after init. |
Declaration only; no direct test references found. |
| Function |
Main |
func Main(commands ...CommandSetup) |
Main initialises and runs the CLI with the framework's built-in translations. |
0.0% statement coverage. |
| Function |
MainWithLocales |
func MainWithLocales(locales []LocaleSource, commands ...CommandSetup) |
MainWithLocales initialises and runs the CLI with additional translation sources. |
0.0% statement coverage. |
| Type |
CheckBuilder |
type CheckBuilder struct { ... } |
CheckBuilder provides fluent API for check results. |
Declaration only; no direct test references found. |
| Function |
Check |
func Check(name string) *CheckBuilder |
Check starts building a check result line. |
100.0% statement coverage. |
| Method |
CheckBuilder.Pass |
func (c *CheckBuilder) Pass() *CheckBuilder |
Pass marks the check as passed. |
100.0% statement coverage. |
| Method |
CheckBuilder.Fail |
func (c *CheckBuilder) Fail() *CheckBuilder |
Fail marks the check as failed. |
100.0% statement coverage. |
| Method |
CheckBuilder.Skip |
func (c *CheckBuilder) Skip() *CheckBuilder |
Skip marks the check as skipped. |
100.0% statement coverage. |
| Method |
CheckBuilder.Warn |
func (c *CheckBuilder) Warn() *CheckBuilder |
Warn marks the check as warning. |
100.0% statement coverage. |
| Method |
CheckBuilder.Duration |
func (c *CheckBuilder) Duration(d string) *CheckBuilder |
Duration adds duration to the check result. |
100.0% statement coverage. |
| Method |
CheckBuilder.Message |
func (c *CheckBuilder) Message(msg string) *CheckBuilder |
Message adds a custom message instead of status. |
100.0% statement coverage. |
| Method |
CheckBuilder.String |
func (c *CheckBuilder) String() string |
String returns the formatted check line. |
90.9% statement coverage. |
| Method |
CheckBuilder.Print |
func (c *CheckBuilder) Print() |
Print outputs the check result. |
0.0% statement coverage. |
| Type |
PositionalArgs |
type PositionalArgs = cobra.PositionalArgs |
PositionalArgs is the cobra positional args type. |
Declaration only; no direct test references found. |
| Type |
Command |
type Command = cobra.Command |
Command is the cobra command type. |
Declaration only; referenced in commands_test.go. |
| Function |
NewCommand |
func NewCommand(use, short, long string, run func(cmd *Command, args []string) error) *Command |
NewCommand creates a new command with a RunE handler. |
0.0% statement coverage. |
| Function |
NewGroup |
func NewGroup(use, short, long string) *Command |
NewGroup creates a new command group (no RunE). |
0.0% statement coverage. |
| Function |
NewRun |
func NewRun(use, short, long string, run func(cmd *Command, args []string)) *Command |
NewRun creates a new command with a simple Run handler (no error return). |
0.0% statement coverage. |
| Function |
StringFlag |
func StringFlag(cmd *Command, ptr *string, name, short, def, usage string) |
StringFlag adds a string flag to a command. |
0.0% statement coverage. |
| Function |
BoolFlag |
func BoolFlag(cmd *Command, ptr *bool, name, short string, def bool, usage string) |
BoolFlag adds a boolean flag to a command. |
0.0% statement coverage. |
| Function |
IntFlag |
func IntFlag(cmd *Command, ptr *int, name, short string, def int, usage string) |
IntFlag adds an integer flag to a command. |
0.0% statement coverage. |
| Function |
Float64Flag |
func Float64Flag(cmd *Command, ptr *float64, name, short string, def float64, usage string) |
Float64Flag adds a float64 flag to a command. |
0.0% statement coverage. |
| Function |
Int64Flag |
func Int64Flag(cmd *Command, ptr *int64, name, short string, def int64, usage string) |
Int64Flag adds an int64 flag to a command. |
0.0% statement coverage. |
| Function |
DurationFlag |
func DurationFlag(cmd *Command, ptr *time.Duration, name, short string, def time.Duration, usage string) |
DurationFlag adds a time.Duration flag to a command. |
0.0% statement coverage. |
| Function |
StringSliceFlag |
func StringSliceFlag(cmd *Command, ptr *[]string, name, short string, def []string, usage string) |
StringSliceFlag adds a string slice flag to a command. |
0.0% statement coverage. |
| Function |
PersistentStringFlag |
func PersistentStringFlag(cmd *Command, ptr *string, name, short, def, usage string) |
PersistentStringFlag adds a persistent string flag (inherited by subcommands). |
0.0% statement coverage. |
| Function |
PersistentBoolFlag |
func PersistentBoolFlag(cmd *Command, ptr *bool, name, short string, def bool, usage string) |
PersistentBoolFlag adds a persistent boolean flag (inherited by subcommands). |
0.0% statement coverage. |
| Function |
WithArgs |
func WithArgs(cmd *Command, args cobra.PositionalArgs) *Command |
WithArgs sets the Args validation function for a command. |
0.0% statement coverage. |
| Function |
WithExample |
func WithExample(cmd *Command, example string) *Command |
WithExample sets the Example field for a command. |
0.0% statement coverage. |
| Function |
ExactArgs |
func ExactArgs(n int) cobra.PositionalArgs |
ExactArgs returns a PositionalArgs that accepts exactly N arguments. |
0.0% statement coverage. |
| Function |
MinimumNArgs |
func MinimumNArgs(n int) cobra.PositionalArgs |
MinimumNArgs returns a PositionalArgs that accepts minimum N arguments. |
0.0% statement coverage. |
| Function |
MaximumNArgs |
func MaximumNArgs(n int) cobra.PositionalArgs |
MaximumNArgs returns a PositionalArgs that accepts maximum N arguments. |
0.0% statement coverage. |
| Function |
RangeArgs |
func RangeArgs(min int, max int) cobra.PositionalArgs |
RangeArgs returns a PositionalArgs that accepts between min and max arguments. |
0.0% statement coverage. |
| Function |
NoArgs |
func NoArgs() cobra.PositionalArgs |
NoArgs returns a PositionalArgs that accepts no arguments. |
0.0% statement coverage. |
| Function |
ArbitraryArgs |
func ArbitraryArgs() cobra.PositionalArgs |
ArbitraryArgs returns a PositionalArgs that accepts any arguments. |
0.0% statement coverage. |
| Function |
WithCommands |
func WithCommands(name string, register func(root *Command), localeFS ...fs.FS) CommandSetup |
WithCommands returns a CommandSetup that registers a command group. |
0.0% statement coverage. |
| Type |
CommandRegistration |
type CommandRegistration func(root *cobra.Command) |
CommandRegistration is a function that adds commands to the CLI root. |
Declaration only; no direct test references found. |
| Function |
RegisterCommands |
func RegisterCommands(fn CommandRegistration, localeFS ...fs.FS) |
RegisterCommands registers a function that adds commands to the CLI. |
100.0% statement coverage. |
| Function |
RegisteredLocales |
func RegisteredLocales() []fs.FS |
RegisteredLocales returns all locale filesystems registered by command packages. |
0.0% statement coverage. |
| Function |
RegisteredCommands |
func RegisteredCommands() iter.Seq[CommandRegistration] |
RegisteredCommands returns an iterator over the registered command functions. |
0.0% statement coverage. |
| Type |
Mode |
type Mode int |
Mode represents the CLI execution mode. |
Declaration only; referenced in daemon_test.go. |
| Method |
Mode.String |
func (m Mode) String() string |
String returns the string representation of the Mode. |
100.0% statement coverage. |
| Function |
DetectMode |
func DetectMode() Mode |
DetectMode determines the execution mode based on environment. |
40.0% statement coverage. |
| Function |
IsTTY |
func IsTTY() bool |
IsTTY returns true if stdout is a terminal. |
0.0% statement coverage. |
| Function |
IsStdinTTY |
func IsStdinTTY() bool |
IsStdinTTY returns true if stdin is a terminal. |
0.0% statement coverage. |
| Function |
IsStderrTTY |
func IsStderrTTY() bool |
IsStderrTTY returns true if stderr is a terminal. |
0.0% statement coverage. |
| Function |
Err |
func Err(format string, args ...any) error |
Err creates a new error from a format string. |
0.0% statement coverage. |
| Function |
Wrap |
func Wrap(err error, msg string) error |
Wrap wraps an error with a message. |
0.0% statement coverage. |
| Function |
WrapVerb |
func WrapVerb(err error, verb, subject string) error |
WrapVerb wraps an error using i18n grammar for "Failed to verb subject". |
0.0% statement coverage. |
| Function |
WrapAction |
func WrapAction(err error, verb string) error |
WrapAction wraps an error using i18n grammar for "Failed to verb". |
0.0% statement coverage. |
| Function |
Is |
func Is(err, target error) bool |
Is reports whether any error in err's tree matches target. |
0.0% statement coverage. |
| Function |
As |
func As(err error, target any) bool |
As finds the first error in err's tree that matches target. |
0.0% statement coverage. |
| Function |
Join |
func Join(errs ...error) error |
Join returns an error that wraps the given errors. |
0.0% statement coverage. |
| Type |
ExitError |
type ExitError struct { Code int; Err error } |
ExitError represents an error that should cause the CLI to exit with a specific code. |
Declaration only; no direct test references found. |
| Method |
ExitError.Error |
func (e *ExitError) Error() string |
Error returns the wrapped error text for CLI display. |
0.0% statement coverage. |
| Method |
ExitError.Unwrap |
func (e *ExitError) Unwrap() error |
Unwrap exposes the underlying error for error-chain inspection. |
0.0% statement coverage. |
| Function |
Exit |
func Exit(code int, err error) error |
Exit creates a new ExitError with the given code and error. |
0.0% statement coverage. |
| Function |
Fatal |
func Fatal(err error) |
Fatal prints an error message to stderr, logs it, and exits with code 1. |
0.0% statement coverage. |
| Function |
Fatalf |
func Fatalf(format string, args ...any) |
Fatalf prints a formatted error message to stderr, logs it, and exits with code 1. |
0.0% statement coverage. |
| Function |
FatalWrap |
func FatalWrap(err error, msg string) |
FatalWrap prints a wrapped error message to stderr, logs it, and exits with code 1. |
0.0% statement coverage. |
| Function |
FatalWrapVerb |
func FatalWrapVerb(err error, verb, subject string) |
FatalWrapVerb prints a wrapped error using i18n grammar to stderr, logs it, and exits with code 1. |
0.0% statement coverage. |
| Interface |
Model |
type Model interface { View(width, height int) string } |
Model is the interface for components that slot into Frame regions. |
Declaration only; referenced in frame_test.go. |
| Interface method |
Model.View |
View(width, height int) string |
Model is the interface for components that slot into Frame regions. |
Interface contract only; selector usage found in frame_test.go. |
| Type |
ModelFunc |
type ModelFunc func(width, height int) string |
ModelFunc is a convenience adapter for using a function as a Model. |
Declaration only; referenced in frame_test.go. |
| Method |
ModelFunc.View |
func (f ModelFunc) View(width, height int) string |
View implements Model. |
100.0% statement coverage. |
| Type |
Frame |
type Frame struct { ... } |
Frame is a live compositional AppShell for TUI. |
Declaration only; no direct test references found. |
| Function |
NewFrame |
func NewFrame(variant string) *Frame |
NewFrame creates a new Frame with the given HLCRF variant string. |
100.0% statement coverage. |
| Method |
Frame.Header |
func (f *Frame) Header(m Model) *Frame |
Header sets the Header region model. |
100.0% statement coverage. |
| Method |
Frame.Left |
func (f *Frame) Left(m Model) *Frame |
Left sets the Left sidebar region model. |
100.0% statement coverage. |
| Method |
Frame.Content |
func (f *Frame) Content(m Model) *Frame |
Content sets the Content region model. |
100.0% statement coverage. |
| Method |
Frame.Right |
func (f *Frame) Right(m Model) *Frame |
Right sets the Right sidebar region model. |
100.0% statement coverage. |
| Method |
Frame.Footer |
func (f *Frame) Footer(m Model) *Frame |
Footer sets the Footer region model. |
100.0% statement coverage. |
| Method |
Frame.Navigate |
func (f *Frame) Navigate(m Model) |
Navigate replaces the Content region with a new model, pushing the current one onto the history stack for Back(). |
100.0% statement coverage. |
| Method |
Frame.Back |
func (f *Frame) Back() bool |
Back pops the content history stack, restoring the previous Content model. |
100.0% statement coverage. |
| Method |
Frame.Stop |
func (f *Frame) Stop() |
Stop signals the Frame to exit its Run loop. |
60.0% statement coverage. |
| Method |
Frame.Send |
func (f *Frame) Send(msg tea.Msg) |
Send injects a message into the Frame's tea.Program. |
50.0% statement coverage. |
| Method |
Frame.WithKeyMap |
func (f *Frame) WithKeyMap(km KeyMap) *Frame |
WithKeyMap sets custom key bindings for Frame navigation. |
100.0% statement coverage. |
| Method |
Frame.Focused |
func (f *Frame) Focused() Region |
Focused returns the currently focused region. |
100.0% statement coverage. |
| Method |
Frame.Focus |
func (f *Frame) Focus(r Region) |
Focus sets focus to a specific region. |
100.0% statement coverage. |
| Method |
Frame.Init |
func (f *Frame) Init() tea.Cmd |
Init implements tea.Model. |
87.5% statement coverage. |
| Method |
Frame.Update |
func (f *Frame) Update(msg tea.Msg) (tea.Model, tea.Cmd) |
Update implements tea.Model. |
100.0% statement coverage. |
| Method |
Frame.View |
func (f *Frame) View() string |
View implements tea.Model. |
100.0% statement coverage. |
| Method |
Frame.Run |
func (f *Frame) Run() |
Run renders the frame and blocks. |
75.0% statement coverage. |
| Method |
Frame.RunFor |
func (f *Frame) RunFor(d time.Duration) |
RunFor runs the frame for a fixed duration, then stops. |
100.0% statement coverage. |
| Method |
Frame.String |
func (f *Frame) String() string |
String renders the frame as a static string (no ANSI, no live updates). |
100.0% statement coverage. |
| Function |
StatusLine |
func StatusLine(title string, pairs ...string) Model |
StatusLine creates a header/footer bar with a title and key:value pairs. |
100.0% statement coverage. |
| Function |
KeyHints |
func KeyHints(hints ...string) Model |
KeyHints creates a footer showing keyboard shortcuts. |
100.0% statement coverage. |
| Function |
Breadcrumb |
func Breadcrumb(parts ...string) Model |
Breadcrumb creates a navigation breadcrumb bar. |
100.0% statement coverage. |
| Function |
StaticModel |
func StaticModel(text string) Model |
StaticModel wraps a static string as a Model, for use in Frame regions. |
100.0% statement coverage. |
| Interface |
FrameModel |
type FrameModel interface { Model; Init() tea.Cmd; Update(tea.Msg) (FrameModel, tea.Cmd) } |
FrameModel extends Model with bubbletea lifecycle methods. |
Declaration only; referenced in frame_test.go. |
| Interface method |
FrameModel.Init |
Init() tea.Cmd |
FrameModel extends Model with bubbletea lifecycle methods. |
Interface contract only; selector usage found in frame_test.go. |
| Interface method |
FrameModel.Update |
Update(tea.Msg) (FrameModel, tea.Cmd) |
FrameModel extends Model with bubbletea lifecycle methods. |
Interface contract only; selector usage found in frame_test.go, tracker_test.go. |
| Type |
KeyMap |
type KeyMap struct { FocusNext tea.KeyType; FocusPrev tea.KeyType; FocusUp tea.KeyType; FocusDown tea.KeyType; FocusLeft tea.KeyType; FocusRight tea.KeyType; Back tea.KeyType; Quit tea.KeyType } |
KeyMap defines key bindings for Frame navigation. |
Declaration only; no direct test references found. |
| Function |
DefaultKeyMap |
func DefaultKeyMap() KeyMap |
DefaultKeyMap returns the standard Frame key bindings. |
100.0% statement coverage. |
| Type |
GlyphTheme |
type GlyphTheme int |
GlyphTheme defines which symbols to use. |
Declaration only; no direct test references found. |
| Function |
UseUnicode |
func UseUnicode() |
UseUnicode switches the glyph theme to Unicode. |
100.0% statement coverage. |
| Function |
UseEmoji |
func UseEmoji() |
UseEmoji switches the glyph theme to Emoji. |
0.0% statement coverage. |
| Function |
UseASCII |
func UseASCII() |
UseASCII switches the glyph theme to ASCII and disables colors. |
100.0% statement coverage. |
| Function |
Glyph |
func Glyph(code string) string |
Glyph converts a shortcode like ":check:" into the current theme's symbol. |
66.7% statement coverage. |
| Function |
T |
func T(key string, args ...map[string]any) string |
T translates a key using the CLI's i18n service. |
0.0% statement coverage. |
| Type |
Region |
type Region rune |
Region represents one of the 5 HLCRF regions. |
Declaration only; referenced in frame_test.go. |
| Type |
Composite |
type Composite struct { ... } |
Composite represents an HLCRF layout node. |
Declaration only; no direct test references found. |
| Method |
Composite.Regions |
func (c *Composite) Regions() iter.Seq[Region] |
Regions returns an iterator over the regions in the composite. |
0.0% statement coverage. |
| Method |
Composite.Slots |
func (c *Composite) Slots() iter.Seq2[Region, *Slot] |
Slots returns an iterator over the slots in the composite. |
0.0% statement coverage. |
| Type |
Slot |
type Slot struct { ... } |
Slot holds content for a region. |
Declaration only; no direct test references found. |
| Interface |
Renderable |
type Renderable interface { Render() string } |
Renderable is anything that can be rendered to terminal. |
Declaration only; no direct test references found. |
| Interface method |
Renderable.Render |
Render() string |
Renderable is anything that can be rendered to terminal. |
Interface contract only; selector usage found in ansi_test.go. |
| Type |
StringBlock |
type StringBlock string |
StringBlock is a simple string that implements Renderable. |
Declaration only; no direct test references found. |
| Method |
StringBlock.Render |
func (s StringBlock) Render() string |
Render returns the string content. |
0.0% statement coverage. |
| Function |
Layout |
func Layout(variant string) *Composite |
Layout creates a new layout from a variant string. |
100.0% statement coverage. |
| Function |
ParseVariant |
func ParseVariant(variant string) (*Composite, error) |
ParseVariant parses a variant string like "H[LC]C[HCF]F". |
90.5% statement coverage. |
| Method |
Composite.H |
func (c *Composite) H(items ...any) *Composite |
H adds content to Header region. |
0.0% statement coverage. |
| Method |
Composite.L |
func (c *Composite) L(items ...any) *Composite |
L adds content to Left region. |
0.0% statement coverage. |
| Method |
Composite.C |
func (c *Composite) C(items ...any) *Composite |
C adds content to Content region. |
0.0% statement coverage. |
| Method |
Composite.R |
func (c *Composite) R(items ...any) *Composite |
R adds content to Right region. |
0.0% statement coverage. |
| Method |
Composite.F |
func (c *Composite) F(items ...any) *Composite |
F adds content to Footer region. |
0.0% statement coverage. |
| Type |
LogLevel |
type LogLevel = log.Level |
LogLevel aliases for convenience. |
Declaration only; no direct test references found. |
| Function |
LogDebug |
func LogDebug(msg string, keyvals ...any) |
LogDebug logs a debug message if the default logger is available. |
0.0% statement coverage. |
| Function |
LogInfo |
func LogInfo(msg string, keyvals ...any) |
LogInfo logs an info message. |
0.0% statement coverage. |
| Function |
LogWarn |
func LogWarn(msg string, keyvals ...any) |
LogWarn logs a warning message. |
100.0% statement coverage. |
| Function |
LogError |
func LogError(msg string, keyvals ...any) |
LogError logs an error message. |
100.0% statement coverage. |
| Function |
Blank |
func Blank() |
Blank prints an empty line. |
0.0% statement coverage. |
| Function |
Echo |
func Echo(key string, args ...any) |
Echo translates a key via i18n.T and prints with newline. |
0.0% statement coverage. |
| Function |
Print |
func Print(format string, args ...any) |
Print outputs formatted text (no newline). |
0.0% statement coverage. |
| Function |
Println |
func Println(format string, args ...any) |
Println outputs formatted text with newline. |
0.0% statement coverage. |
| Function |
Text |
func Text(args ...any) |
Text prints arguments like fmt.Println, but handling glyphs. |
0.0% statement coverage. |
| Function |
Success |
func Success(msg string) |
Success prints a success message with checkmark (green). |
100.0% statement coverage. |
| Function |
Successf |
func Successf(format string, args ...any) |
Successf prints a formatted success message. |
0.0% statement coverage. |
| Function |
Error |
func Error(msg string) |
Error prints an error message with cross (red) to stderr and logs it. |
100.0% statement coverage. |
| Function |
Errorf |
func Errorf(format string, args ...any) |
Errorf prints a formatted error message to stderr and logs it. |
0.0% statement coverage. |
| Function |
ErrorWrap |
func ErrorWrap(err error, msg string) |
ErrorWrap prints a wrapped error message to stderr and logs it. |
0.0% statement coverage. |
| Function |
ErrorWrapVerb |
func ErrorWrapVerb(err error, verb, subject string) |
ErrorWrapVerb prints a wrapped error using i18n grammar to stderr and logs it. |
0.0% statement coverage. |
| Function |
ErrorWrapAction |
func ErrorWrapAction(err error, verb string) |
ErrorWrapAction prints a wrapped error using i18n grammar to stderr and logs it. |
0.0% statement coverage. |
| Function |
Warn |
func Warn(msg string) |
Warn prints a warning message with warning symbol (amber) to stderr and logs it. |
100.0% statement coverage. |
| Function |
Warnf |
func Warnf(format string, args ...any) |
Warnf prints a formatted warning message to stderr and logs it. |
0.0% statement coverage. |
| Function |
Info |
func Info(msg string) |
Info prints an info message with info symbol (blue). |
100.0% statement coverage. |
| Function |
Infof |
func Infof(format string, args ...any) |
Infof prints a formatted info message. |
0.0% statement coverage. |
| Function |
Dim |
func Dim(msg string) |
Dim prints dimmed text. |
0.0% statement coverage. |
| Function |
Progress |
func Progress(verb string, current, total int, item ...string) |
Progress prints a progress indicator that overwrites the current line. |
0.0% statement coverage. |
| Function |
ProgressDone |
func ProgressDone() |
ProgressDone clears the progress line. |
0.0% statement coverage. |
| Function |
Label |
func Label(word, value string) |
Label prints a "Label: value" line. |
0.0% statement coverage. |
| Function |
Scanln |
func Scanln(a ...any) (int, error) |
Scanln reads from stdin. |
0.0% statement coverage. |
| Function |
Task |
func Task(label, message string) |
Task prints a task header: "[label] message" |
100.0% statement coverage. |
| Function |
Section |
func Section(name string) |
Section prints a section header: "── SECTION ──" |
100.0% statement coverage. |
| Function |
Hint |
func Hint(label, message string) |
Hint prints a labelled hint: "label: message" |
100.0% statement coverage. |
| Function |
Severity |
func Severity(level, message string) |
Severity prints a severity-styled message. |
0.0% statement coverage. |
| Function |
Result |
func Result(passed bool, message string) |
Result prints a result line: "✓ message" or "✗ message" |
100.0% statement coverage. |
| Function |
SetStdin |
func SetStdin(r io.Reader) |
SetStdin overrides the default stdin reader for testing. |
100.0% statement coverage. |
| Function |
Prompt |
func Prompt(label, defaultVal string) (string, error) |
Prompt asks for text input with a default value. |
90.9% statement coverage. |
| Function |
Select |
func Select(label string, options []string) (string, error) |
Select presents numbered options and returns the selected value. |
91.7% statement coverage. |
| Function |
MultiSelect |
func MultiSelect(label string, options []string) ([]string, error) |
MultiSelect presents checkboxes (space-separated numbers). |
86.7% statement coverage. |
| Type |
RenderStyle |
type RenderStyle int |
RenderStyle controls how layouts are rendered. |
Declaration only; no direct test references found. |
| Function |
UseRenderFlat |
func UseRenderFlat() |
UseRenderFlat sets the render style to flat (no borders). |
0.0% statement coverage. |
| Function |
UseRenderSimple |
func UseRenderSimple() |
UseRenderSimple sets the render style to simple (--- separators). |
0.0% statement coverage. |
| Function |
UseRenderBoxed |
func UseRenderBoxed() |
UseRenderBoxed sets the render style to boxed (Unicode box drawing). |
0.0% statement coverage. |
| Method |
Composite.Render |
func (c *Composite) Render() |
Render outputs the layout to terminal. |
0.0% statement coverage. |
| Method |
Composite.String |
func (c *Composite) String() string |
String returns the rendered layout. |
0.0% statement coverage. |
| Type |
Options |
type Options struct { AppName string; Version string; Services []core.Service; I18nSources []LocaleSource; OnReload func() error } |
Options configures the CLI runtime. |
Declaration only; referenced in commands_test.go. |
| Function |
Init |
func Init(opts Options) error |
Init initialises the global CLI runtime. |
70.8% statement coverage. |
| Function |
Core |
func Core() *core.Core |
Core returns the CLI's framework Core instance. |
0.0% statement coverage. |
| Function |
RootCmd |
func RootCmd() *cobra.Command |
RootCmd returns the CLI's root cobra command. |
100.0% statement coverage. |
| Function |
Execute |
func Execute() error |
Execute runs the CLI root command. |
100.0% statement coverage. |
| Function |
Context |
func Context() context.Context |
Context returns the CLI's root context. |
0.0% statement coverage. |
| Function |
Shutdown |
func Shutdown() |
Shutdown gracefully shuts down the CLI. |
75.0% statement coverage. |
| Type |
StreamOption |
type StreamOption func(*Stream) |
StreamOption configures a Stream. |
Declaration only; no direct test references found. |
| Function |
WithWordWrap |
func WithWordWrap(cols int) StreamOption |
WithWordWrap sets the word-wrap column width. |
100.0% statement coverage. |
| Function |
WithStreamOutput |
func WithStreamOutput(w io.Writer) StreamOption |
WithStreamOutput sets the output writer (default: os.Stdout). |
100.0% statement coverage. |
| Type |
Stream |
type Stream struct { ... } |
Stream renders growing text as tokens arrive, with optional word-wrap. |
Declaration only; no direct test references found. |
| Function |
NewStream |
func NewStream(opts ...StreamOption) *Stream |
NewStream creates a streaming text renderer. |
100.0% statement coverage. |
| Method |
Stream.Write |
func (s *Stream) Write(text string) |
Write appends text to the stream. |
100.0% statement coverage. |
| Method |
Stream.WriteFrom |
func (s *Stream) WriteFrom(r io.Reader) error |
WriteFrom reads from r and streams all content until EOF. |
88.9% statement coverage. |
| Method |
Stream.Done |
func (s *Stream) Done() |
Done signals that no more text will arrive. |
100.0% statement coverage. |
| Method |
Stream.Wait |
func (s *Stream) Wait() |
Wait blocks until Done is called. |
100.0% statement coverage. |
| Method |
Stream.Column |
func (s *Stream) Column() int |
Column returns the current output column position for wrapping tests. |
100.0% statement coverage. |
| Method |
Stream.Captured |
func (s *Stream) Captured() string |
Captured returns the stream output as a string when using a bytes.Buffer. |
0.0% statement coverage. |
| Function |
Sprintf |
func Sprintf(format string, args ...any) string |
Sprintf formats a string (fmt.Sprintf wrapper). |
0.0% statement coverage. |
| Function |
Sprint |
func Sprint(args ...any) string |
Sprint formats using default formats (fmt.Sprint wrapper). |
0.0% statement coverage. |
| Function |
Styled |
func Styled(style *AnsiStyle, text string) string |
Styled returns text with a style applied. |
0.0% statement coverage. |
| Function |
Styledf |
func Styledf(style *AnsiStyle, format string, args ...any) string |
Styledf returns formatted text with a style applied. |
0.0% statement coverage. |
| Function |
SuccessStr |
func SuccessStr(msg string) string |
SuccessStr returns success-styled string. |
0.0% statement coverage. |
| Function |
ErrorStr |
func ErrorStr(msg string) string |
ErrorStr returns error-styled string. |
0.0% statement coverage. |
| Function |
WarnStr |
func WarnStr(msg string) string |
WarnStr returns warning-styled string. |
0.0% statement coverage. |
| Function |
InfoStr |
func InfoStr(msg string) string |
InfoStr returns info-styled string. |
0.0% statement coverage. |
| Function |
DimStr |
func DimStr(msg string) string |
DimStr returns dim-styled string. |
0.0% statement coverage. |
| Function |
Truncate |
func Truncate(s string, max int) string |
Truncate shortens a string to max length with ellipsis. |
100.0% statement coverage. |
| Function |
Pad |
func Pad(s string, width int) string |
Pad right-pads a string to width. |
100.0% statement coverage. |
| Function |
FormatAge |
func FormatAge(t time.Time) string |
FormatAge formats a time as human-readable age (e.g., "2h ago", "3d ago"). |
0.0% statement coverage. |
| Type |
BorderStyle |
type BorderStyle int |
BorderStyle selects the box-drawing character set for table borders. |
Declaration only; no direct test references found. |
| Type |
CellStyleFn |
type CellStyleFn func(value string) *AnsiStyle |
CellStyleFn returns a style based on the cell's raw value. |
Declaration only; no direct test references found. |
| Type |
Table |
type Table struct { Headers []string; Rows [][]string; Style TableStyle; ... } |
Table renders tabular data with aligned columns. |
Declaration only; no direct test references found. |
| Type |
TableStyle |
type TableStyle struct { HeaderStyle *AnsiStyle; CellStyle *AnsiStyle; Separator string } |
TableStyle configures the appearance of table output. |
Declaration only; no direct test references found. |
| Function |
DefaultTableStyle |
func DefaultTableStyle() TableStyle |
DefaultTableStyle returns sensible defaults. |
100.0% statement coverage. |
| Function |
NewTable |
func NewTable(headers ...string) *Table |
NewTable creates a table with headers. |
100.0% statement coverage. |
| Method |
Table.AddRow |
func (t *Table) AddRow(cells ...string) *Table |
AddRow adds a row to the table. |
100.0% statement coverage. |
| Method |
Table.WithBorders |
func (t *Table) WithBorders(style BorderStyle) *Table |
WithBorders enables box-drawing borders on the table. |
100.0% statement coverage. |
| Method |
Table.WithCellStyle |
func (t *Table) WithCellStyle(col int, fn CellStyleFn) *Table |
WithCellStyle sets a per-column style function. |
100.0% statement coverage. |
| Method |
Table.WithMaxWidth |
func (t *Table) WithMaxWidth(w int) *Table |
WithMaxWidth sets the maximum table width, truncating columns to fit. |
100.0% statement coverage. |
| Method |
Table.String |
func (t *Table) String() string |
String renders the table. |
100.0% statement coverage. |
| Method |
Table.Render |
func (t *Table) Render() |
Render prints the table to stdout. |
0.0% statement coverage. |
| Type |
TrackedTask |
type TrackedTask struct { ... } |
TrackedTask represents a single task in a TaskTracker. |
Declaration only; referenced in tracker_test.go. |
| Method |
TrackedTask.Update |
func (t *TrackedTask) Update(status string) |
Update sets the task status message and marks it as running. |
100.0% statement coverage. |
| Method |
TrackedTask.Done |
func (t *TrackedTask) Done(message string) |
Done marks the task as successfully completed with a final message. |
100.0% statement coverage. |
| Method |
TrackedTask.Fail |
func (t *TrackedTask) Fail(message string) |
Fail marks the task as failed with an error message. |
100.0% statement coverage. |
| Type |
TaskTracker |
type TaskTracker struct { ... } |
TaskTracker displays multiple concurrent tasks with individual spinners. |
Declaration only; no direct test references found. |
| Method |
TaskTracker.Tasks |
func (tr *TaskTracker) Tasks() iter.Seq[*TrackedTask] |
Tasks returns an iterator over the tasks in the tracker. |
0.0% statement coverage. |
| Method |
TaskTracker.Snapshots |
func (tr *TaskTracker) Snapshots() iter.Seq2[string, string] |
Snapshots returns an iterator over snapshots of tasks in the tracker. |
0.0% statement coverage. |
| Function |
NewTaskTracker |
func NewTaskTracker() *TaskTracker |
NewTaskTracker creates a new parallel task tracker. |
100.0% statement coverage. |
| Method |
TaskTracker.Add |
func (tr *TaskTracker) Add(name string) *TrackedTask |
Add registers a task and returns it for goroutine use. |
100.0% statement coverage. |
| Method |
TaskTracker.Wait |
func (tr *TaskTracker) Wait() |
Wait renders the task display and blocks until all tasks complete. |
75.0% statement coverage. |
| Method |
TaskTracker.Summary |
func (tr *TaskTracker) Summary() string |
Summary returns a one-line summary of task results. |
100.0% statement coverage. |
| Method |
TaskTracker.String |
func (tr *TaskTracker) String() string |
String returns the current state of all tasks as plain text (no ANSI). |
100.0% statement coverage. |
| Type |
TreeNode |
type TreeNode struct { ... } |
TreeNode represents a node in a displayable tree structure. |
Declaration only; no direct test references found. |
| Function |
NewTree |
func NewTree(label string) *TreeNode |
NewTree creates a new tree with the given root label. |
100.0% statement coverage. |
| Method |
TreeNode.Add |
func (n *TreeNode) Add(label string) *TreeNode |
Add appends a child node and returns the child for chaining. |
100.0% statement coverage. |
| Method |
TreeNode.AddStyled |
func (n *TreeNode) AddStyled(label string, style *AnsiStyle) *TreeNode |
AddStyled appends a styled child node and returns the child for chaining. |
100.0% statement coverage. |
| Method |
TreeNode.AddTree |
func (n *TreeNode) AddTree(child *TreeNode) *TreeNode |
AddTree appends an existing tree as a child and returns the parent for chaining. |
100.0% statement coverage. |
| Method |
TreeNode.WithStyle |
func (n *TreeNode) WithStyle(style *AnsiStyle) *TreeNode |
WithStyle sets the style on this node and returns it for chaining. |
100.0% statement coverage. |
| Method |
TreeNode.Children |
func (n *TreeNode) Children() iter.Seq[*TreeNode] |
Children returns an iterator over the node's children. |
0.0% statement coverage. |
| Method |
TreeNode.String |
func (n *TreeNode) String() string |
String renders the tree with box-drawing characters. |
100.0% statement coverage. |
| Method |
TreeNode.Render |
func (n *TreeNode) Render() |
Render prints the tree to stdout. |
0.0% statement coverage. |
| Function |
GhAuthenticated |
func GhAuthenticated() bool |
GhAuthenticated checks if the GitHub CLI is authenticated. |
0.0% statement coverage. |
| Type |
ConfirmOption |
type ConfirmOption func(*confirmConfig) |
ConfirmOption configures Confirm behaviour. |
Declaration only; no direct test references found. |
| Function |
DefaultYes |
func DefaultYes() ConfirmOption |
DefaultYes sets the default response to "yes" (pressing Enter confirms). |
0.0% statement coverage. |
| Function |
Required |
func Required() ConfirmOption |
Required prevents empty responses; user must explicitly type y/n. |
0.0% statement coverage. |
| Function |
Timeout |
func Timeout(d time.Duration) ConfirmOption |
Timeout sets a timeout after which the default response is auto-selected. |
0.0% statement coverage. |
| Function |
Confirm |
func Confirm(prompt string, opts ...ConfirmOption) bool |
Confirm prompts the user for yes/no confirmation. |
0.0% statement coverage. |
| Function |
ConfirmAction |
func ConfirmAction(verb, subject string, opts ...ConfirmOption) bool |
ConfirmAction prompts for confirmation of an action using grammar composition. |
0.0% statement coverage. |
| Function |
ConfirmDangerousAction |
func ConfirmDangerousAction(verb, subject string) bool |
ConfirmDangerousAction prompts for double confirmation of a dangerous action. |
0.0% statement coverage. |
| Type |
QuestionOption |
type QuestionOption func(*questionConfig) |
QuestionOption configures Question behaviour. |
Declaration only; no direct test references found. |
| Function |
WithDefault |
func WithDefault(value string) QuestionOption |
WithDefault sets the default value shown in brackets. |
0.0% statement coverage. |
| Function |
WithValidator |
func WithValidator(fn func(string) error) QuestionOption |
WithValidator adds a validation function for the response. |
0.0% statement coverage. |
| Function |
RequiredInput |
func RequiredInput() QuestionOption |
RequiredInput prevents empty responses. |
0.0% statement coverage. |
| Function |
Question |
func Question(prompt string, opts ...QuestionOption) string |
Question prompts the user for text input. |
0.0% statement coverage. |
| Function |
QuestionAction |
func QuestionAction(verb, subject string, opts ...QuestionOption) string |
QuestionAction prompts for text input using grammar composition. |
0.0% statement coverage. |
| Type |
ChooseOption |
type ChooseOption[T any] func(*chooseConfig[T]) |
ChooseOption configures Choose behaviour. |
Declaration only; no direct test references found. |
| Function |
WithDisplay |
func WithDisplay[T any](fn func(T) string) ChooseOption[T] |
WithDisplay sets a custom display function for items. |
0.0% statement coverage. |
| Function |
WithDefaultIndex |
func WithDefaultIndex[T any](idx int) ChooseOption[T] |
WithDefaultIndex sets the default selection index (0-based). |
0.0% statement coverage. |
| Function |
Filter |
func Filter[T any]() ChooseOption[T] |
Filter enables type-to-filter functionality. |
0.0% statement coverage. |
| Function |
Multi |
func Multi[T any]() ChooseOption[T] |
Multi allows multiple selections. |
0.0% statement coverage. |
| Function |
Display |
func Display[T any](fn func(T) string) ChooseOption[T] |
Display sets a custom display function for items. |
0.0% statement coverage. |
| Function |
Choose |
func Choose[T any](prompt string, items []T, opts ...ChooseOption[T]) T |
Choose prompts the user to select from a list of items. |
0.0% statement coverage. |
| Function |
ChooseAction |
func ChooseAction[T any](verb, subject string, items []T, opts ...ChooseOption[T]) T |
ChooseAction prompts for selection using grammar composition. |
0.0% statement coverage. |
| Function |
ChooseMulti |
func ChooseMulti[T any](prompt string, items []T, opts ...ChooseOption[T]) []T |
ChooseMulti prompts the user to select multiple items from a list. |
0.0% statement coverage. |
| Function |
ChooseMultiAction |
func ChooseMultiAction[T any](verb, subject string, items []T, opts ...ChooseOption[T]) []T |
ChooseMultiAction prompts for multiple selections using grammar composition. |
0.0% statement coverage. |
| Function |
GitClone |
func GitClone(ctx context.Context, org, repo, path string) error |
GitClone clones a GitHub repository to the specified path. |
0.0% statement coverage. |