Documentation
¶
Overview ¶
Package styles provides centralized style and color definitions for terminal output. It uses lipgloss.AdaptiveColor to automatically adapt colors based on the terminal background, ensuring good readability in both light and dark terminal themes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ColorError is used for error messages and critical issues ColorError = lipgloss.AdaptiveColor{ Light: "#D73737", Dark: "#FF5555", } // ColorWarning is used for warning messages and cautionary information ColorWarning = lipgloss.AdaptiveColor{ Light: "#E67E22", Dark: "#FFB86C", } // ColorSuccess is used for success messages and confirmations ColorSuccess = lipgloss.AdaptiveColor{ Light: "#27AE60", Dark: "#50FA7B", } // ColorInfo is used for informational messages ColorInfo = lipgloss.AdaptiveColor{ Light: "#2980B9", Dark: "#8BE9FD", } // ColorPurple is used for file paths, commands, and highlights ColorPurple = lipgloss.AdaptiveColor{ Light: "#8E44AD", Dark: "#BD93F9", } // ColorYellow is used for progress messages and attention-grabbing content ColorYellow = lipgloss.AdaptiveColor{ Light: "#B7950B", Dark: "#F1FA8C", } // ColorComment is used for secondary/muted information like line numbers ColorComment = lipgloss.AdaptiveColor{ Light: "#6C7A89", Dark: "#6272A4", } // ColorForeground is used for primary text content ColorForeground = lipgloss.AdaptiveColor{ Light: "#2C3E50", Dark: "#F8F8F2", } // ColorBackground is used for highlighted backgrounds ColorBackground = lipgloss.AdaptiveColor{ Light: "#ECF0F1", Dark: "#282A36", } // ColorBorder is used for table borders and dividers ColorBorder = lipgloss.AdaptiveColor{ Light: "#BDC3C7", Dark: "#44475A", } )
Adaptive colors that work well in both light and dark terminal themes. Light variants use darker, more saturated colors for visibility on light backgrounds. Dark variants use brighter colors (Dracula theme inspired) for dark backgrounds.
var ( // RoundedBorder is used for error boxes, emphasis boxes, and informational panels. // It provides a softer, more polished appearance with rounded corners. RoundedBorder = lipgloss.RoundedBorder() // NormalBorder is used for standard tables and section dividers. // It provides clean, simple borders suitable for data presentation. NormalBorder = lipgloss.NormalBorder() // ThickBorder is used for high-emphasis boxes and critical information. // It draws more attention with heavier visual weight. ThickBorder = lipgloss.ThickBorder() )
Border definitions for consistent styling across CLI output. These provide a centralized set of border styles that adapt based on context.
var Command = lipgloss.NewStyle(). Bold(true). Foreground(ColorPurple)
Command style for command execution messages - bold purple
var ContextLine = lipgloss.NewStyle(). Foreground(ColorForeground)
ContextLine style for source code context lines
var Count = lipgloss.NewStyle(). Bold(true). Foreground(ColorInfo)
Count style for count/numeric status messages - bold cyan
var Error = lipgloss.NewStyle(). Bold(true). Foreground(ColorError)
Error style for error messages - bold red
var ErrorBox = lipgloss.NewStyle(). Border(RoundedBorder). BorderForeground(ColorError). Padding(1). Margin(1)
ErrorBox style for error boxes with rounded borders
var FilePath = lipgloss.NewStyle(). Bold(true). Foreground(ColorPurple)
FilePath style for file paths and locations - bold purple
var Header = lipgloss.NewStyle(). Bold(true). Foreground(ColorSuccess). MarginBottom(1)
Header style for section headers with margin - bold green
var Highlight = lipgloss.NewStyle(). Background(ColorError). Foreground(ColorBackground)
Highlight style for error highlighting - inverted colors
var Info = lipgloss.NewStyle(). Bold(true). Foreground(ColorInfo)
Info style for informational messages - bold cyan
var LineNumber = lipgloss.NewStyle(). Foreground(ColorComment)
LineNumber style for line numbers in error context - muted
var ListHeader = lipgloss.NewStyle(). Bold(true). Underline(true). Foreground(ColorSuccess)
ListHeader style for section headers in lists - bold underline green
var ListItem = lipgloss.NewStyle(). Foreground(ColorForeground)
ListItem style for items in lists
var Location = lipgloss.NewStyle(). Bold(true). Foreground(ColorWarning)
Location style for directory/file location messages - bold orange
var Progress = lipgloss.NewStyle(). Foreground(ColorYellow)
Progress style for progress/activity messages - yellow
var Prompt = lipgloss.NewStyle(). Bold(true). Foreground(ColorSuccess)
Prompt style for user prompt messages - bold green
var ServerName = lipgloss.NewStyle(). Bold(true). Foreground(ColorPurple)
ServerName style for MCP server names - bold purple
var ServerType = lipgloss.NewStyle(). Foreground(ColorInfo)
ServerType style for MCP server type information - cyan
var Success = lipgloss.NewStyle(). Bold(true). Foreground(ColorSuccess)
Success style for success messages - bold green
var TableBorder = lipgloss.NewStyle(). Foreground(ColorBorder)
TableBorder style for table borders
var TableCell = lipgloss.NewStyle(). Foreground(ColorForeground)
TableCell style for regular table cells
var TableHeader = lipgloss.NewStyle(). Bold(true). Foreground(ColorComment)
TableHeader style for table headers - bold muted
var TableTitle = lipgloss.NewStyle(). Bold(true). Foreground(ColorSuccess)
TableTitle style for table titles - bold green
var TableTotal = lipgloss.NewStyle(). Bold(true). Foreground(ColorSuccess)
TableTotal style for total/summary rows - bold green
var Verbose = lipgloss.NewStyle(). Italic(true). Foreground(ColorComment)
Verbose style for verbose debugging output - italic muted
var Warning = lipgloss.NewStyle(). Bold(true). Foreground(ColorWarning)
Warning style for warning messages - bold orange
Functions ¶
This section is empty.
Types ¶
This section is empty.