tui

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: MIT Imports: 28 Imported by: 0

Documentation

Overview

Package tui provides the terminal UI for hrd, built on Bubble Tea. It manages repo list display, command input, output streaming, group filtering, and persistent state (history, selections) across sessions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, opts Options) error

Run starts the Bubble Tea event loop and blocks until the user quits.

Types

type HistoryEntry added in v0.9.0

type HistoryEntry struct {
	Prefix  string `json:"p"`
	Command string `json:"c"`
}

HistoryEntry is a single typed command in execution history.

type Options

type Options struct {
	ConfigPath string
	Group      string
	Repos      []string
	StatePath  string
}

Options configures the TUI entry point.

type PersistentState

type PersistentState struct {
	Version          int              `json:"version"`
	History          []HistoryEntry   `json:"history"`
	SelectionHistory []SelectionEntry `json:"selectionHistory"`
	LastRepos        []string         `json:"lastRepos"`
	LastGroup        string           `json:"lastGroup"`
}

PersistentState holds TUI session state saved between runs.

type SelectionEntry added in v0.10.0

type SelectionEntry struct {
	Timestamp time.Time `json:"t,omitzero"`
	Repos     []string  `json:"r"`
}

SelectionEntry records a set of selected repos at a point in time.

Jump to

Keyboard shortcuts

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