ui

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package ui holds mcpify's terminal styling: ANSI colors that switch off when output is not a terminal, plus the wordmark. Keeping it here means the preview commands print plainly into pipes and CI while interactive use stays legible, and the stdio MCP transport on stdout is never polluted with color.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsTTY added in v0.3.0

func IsTTY(f *os.File) bool

IsTTY reports whether f is an interactive terminal (a character device), used to tell a human at a terminal from a pipe a client spawned.

Types

type Style

type Style struct {
	// contains filtered or unexported fields
}

Style carries whether ANSI styling is on for a given writer.

func For

func For(f *os.File) Style

For returns the Style appropriate for f: styling is off when f is not a terminal, when NO_COLOR is set, or for dumb terminals.

func (Style) Accent

func (s Style) Accent(str string) string

func (Style) Banner

func (s Style) Banner() string

Banner returns the mcpify wordmark, accent-colored when styling is on.

func (Style) Bold

func (s Style) Bold(str string) string

func (Style) Dim

func (s Style) Dim(str string) string

func (Style) Green

func (s Style) Green(str string) string

func (Style) Red

func (s Style) Red(str string) string

Jump to

Keyboard shortcuts

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