tui

package
v2.5.4 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package tui adapts the CLI command catalog and renderers into an interactive full-screen terminal interface. It owns terminal input, layout, and view state; command handlers and daemon contracts remain authoritative for validation, safety gates, and runtime behavior.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsInteractive

func IsInteractive(in, out *os.File) bool

IsInteractive reports whether stdin and stdout both point at terminal devices. Zero-arg `canary` only enters the TUI in this case.

func Run

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

Run starts the interactive terminal cockpit and blocks until the user exits or ctx is cancelled.

Types

type Options

type Options struct {
	Stdin      *os.File
	Stdout     *os.File
	Stderr     *os.File
	Version    string
	SocketPath string
}

Options carries the process dependencies wired by the Canary command entry point. The TUI owns terminal UX; command behavior and live data sources stay in cli/live.

type Size

type Size struct {
	Rows int
	Cols int
}

Size is the terminal viewport in character cells.

Jump to

Keyboard shortcuts

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