styles

package
v0.32.1 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2025 License: MIT Imports: 1 Imported by: 0

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

View Source
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.

View Source
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.

View Source
var Command = lipgloss.NewStyle().
	Bold(true).
	Foreground(ColorPurple)

Command style for command execution messages - bold purple

View Source
var ContextLine = lipgloss.NewStyle().
	Foreground(ColorForeground)

ContextLine style for source code context lines

View Source
var Count = lipgloss.NewStyle().
	Bold(true).
	Foreground(ColorInfo)

Count style for count/numeric status messages - bold cyan

View Source
var Error = lipgloss.NewStyle().
	Bold(true).
	Foreground(ColorError)

Error style for error messages - bold red

View Source
var ErrorBox = lipgloss.NewStyle().
	Border(RoundedBorder).
	BorderForeground(ColorError).
	Padding(1).
	Margin(1)

ErrorBox style for error boxes with rounded borders

View Source
var FilePath = lipgloss.NewStyle().
	Bold(true).
	Foreground(ColorPurple)

FilePath style for file paths and locations - bold purple

View Source
var Header = lipgloss.NewStyle().
	Bold(true).
	Foreground(ColorSuccess).
	MarginBottom(1)

Header style for section headers with margin - bold green

View Source
var Highlight = lipgloss.NewStyle().
	Background(ColorError).
	Foreground(ColorBackground)

Highlight style for error highlighting - inverted colors

View Source
var Info = lipgloss.NewStyle().
	Bold(true).
	Foreground(ColorInfo)

Info style for informational messages - bold cyan

View Source
var LineNumber = lipgloss.NewStyle().
	Foreground(ColorComment)

LineNumber style for line numbers in error context - muted

View Source
var ListHeader = lipgloss.NewStyle().
	Bold(true).
	Underline(true).
	Foreground(ColorSuccess)

ListHeader style for section headers in lists - bold underline green

View Source
var ListItem = lipgloss.NewStyle().
	Foreground(ColorForeground)

ListItem style for items in lists

View Source
var Location = lipgloss.NewStyle().
	Bold(true).
	Foreground(ColorWarning)

Location style for directory/file location messages - bold orange

View Source
var Progress = lipgloss.NewStyle().
	Foreground(ColorYellow)

Progress style for progress/activity messages - yellow

View Source
var Prompt = lipgloss.NewStyle().
	Bold(true).
	Foreground(ColorSuccess)

Prompt style for user prompt messages - bold green

View Source
var ServerName = lipgloss.NewStyle().
	Bold(true).
	Foreground(ColorPurple)

ServerName style for MCP server names - bold purple

View Source
var ServerType = lipgloss.NewStyle().
	Foreground(ColorInfo)

ServerType style for MCP server type information - cyan

View Source
var Success = lipgloss.NewStyle().
	Bold(true).
	Foreground(ColorSuccess)

Success style for success messages - bold green

View Source
var TableBorder = lipgloss.NewStyle().
	Foreground(ColorBorder)

TableBorder style for table borders

View Source
var TableCell = lipgloss.NewStyle().
	Foreground(ColorForeground)

TableCell style for regular table cells

View Source
var TableHeader = lipgloss.NewStyle().
	Bold(true).
	Foreground(ColorComment)

TableHeader style for table headers - bold muted

View Source
var TableTitle = lipgloss.NewStyle().
	Bold(true).
	Foreground(ColorSuccess)

TableTitle style for table titles - bold green

View Source
var TableTotal = lipgloss.NewStyle().
	Bold(true).
	Foreground(ColorSuccess)

TableTotal style for total/summary rows - bold green

View Source
var Verbose = lipgloss.NewStyle().
	Italic(true).
	Foreground(ColorComment)

Verbose style for verbose debugging output - italic muted

View Source
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.

Jump to

Keyboard shortcuts

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