ui

package
v0.9.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Out io.Writer = os.Stdout
	Err io.Writer = os.Stderr
)
View Source
var AgentMode bool

AgentMode switches all output to structured JSON (set via --agent-safe or CLAUDE_CODE=1). When true: human-readable text and ANSI colors are suppressed; every status message is emitted as {"ok":true,"data":"..."} on Out or {"ok":false,"error":"..."} on Err.

Functions

func Fail

func Fail(msg string)
func Header(msg string)

func Info

func Info(msg string)

func JSONError

func JSONError(msg string)

JSONError writes a structured error to Err as {"ok":false,"error":"..."}.

func JSONResult

func JSONResult(payload interface{})

JSONResult writes structured data to Out as {"ok":true,"data":<payload>}. Use this in commands that need to emit machine-readable output in agent mode.

func NotImplemented

func NotImplemented(name string)

func OK

func OK(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