ui

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package ui provides progress display for repository analysis.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsTTY

func IsTTY() bool

IsTTY returns true if stderr is a terminal.

func NewTUIModel

func NewTUIModel(total int) model

NewTUIModel creates a new bubbletea model for the progress TUI.

func PickProjects added in v0.2.0

func PickProjects(projects []provider.Project) ([]string, error)

func RunTUI

func RunTUI(total int) *tea.Program

RunTUI creates and returns a bubbletea program for the progress TUI. The program outputs to stderr so JSON output on stdout stays clean.

Types

type DoneMsg

type DoneMsg struct{}

DoneMsg is sent to the bubbletea program when all repositories are analyzed.

type PlainProgress

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

PlainProgress prints progress messages to a callback function. Used when stderr is not a TTY (e.g., piped output).

func NewPlainProgress

func NewPlainProgress(print func(string)) *PlainProgress

NewPlainProgress creates a new PlainProgress with the given print callback.

func (*PlainProgress) Done

func (p *PlainProgress) Done(total int)

Done prints a completion message.

func (*PlainProgress) Update

func (p *PlainProgress) Update(completed, total int, repoName string)

Update prints a progress message for a completed repository.

type ProgressMsg

type ProgressMsg struct {
	Completed int
	Total     int
	RepoName  string
}

ProgressMsg is sent to the bubbletea program when a repository is analyzed.

Jump to

Keyboard shortcuts

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