ui

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Styles for diff display
	AddedStyle     = lipgloss.NewStyle().Foreground(lipgloss.Color("#04B575"))
	RemovedStyle   = lipgloss.NewStyle().Foreground(lipgloss.Color("#FF5555"))
	UnchangedStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#ABABAB"))
	HeaderStyle    = lipgloss.NewStyle().Bold(true).Foreground(lipgloss.Color("#7D56F4"))
	SourceStyle    = lipgloss.NewStyle().Bold(true).Foreground(lipgloss.Color("#04B575"))
)
View Source
var Logger *log.Logger

Functions

func ConfirmAction

func ConfirmAction() (string, error)

func ConfirmCreateDir

func ConfirmCreateDir(path string) (bool, error)

func ConfirmPrune

func ConfirmPrune(repos []string) (bool, error)

func ConfirmSync

func ConfirmSync(toClone int, toRemove int) (bool, error)

func CopyToClipboard

func CopyToClipboard(text string) bool

CopyToClipboard copies text to the system clipboard. It tries the clipboard package first, then falls back to OSC 52 escape sequences.

func Debug

func Debug(msg string, args ...interface{})

func Error

func Error(msg string, args ...interface{})

func Info

func Info(msg string, args ...interface{})

func IsTTY

func IsTTY() bool

IsTTY returns whether we're running in an interactive terminal

func PrintDiff

func PrintDiff(sourceName string, entries []DiffEntry)

func PrintSummary

func PrintSummary(cloned, pruned, skipped int)

func PrintUnifiedDiff

func PrintUnifiedDiff(diffs []SourceDiff)

PrintUnifiedDiff prints a unified diff-style output comparing local vs config

func SetDebug

func SetDebug(enabled bool)

func Warn

func Warn(msg string, args ...interface{})

Types

type DiffEntry

type DiffEntry struct {
	Name   string
	Status DiffStatus
}

type DiffStatus

type DiffStatus int
const (
	StatusAdded DiffStatus = iota
	StatusRemoved
	StatusUnchanged
)

type Progress

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

Progress tracks cloning progress with an animated spinner

func NewProgress

func NewProgress(total int, message string) *Progress

NewProgress creates a new progress tracker

func (*Progress) Finish

func (p *Progress) Finish()

Finish stops the progress animation

func (*Progress) Increment

func (p *Progress) Increment()

Increment marks one more item as completed

type SourceDiff

type SourceDiff struct {
	Name    string
	Entries []DiffEntry
}

SourceDiff represents the diff for a single source

Jump to

Keyboard shortcuts

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