tui

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2026 License: BSD-3-Clause Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HostConnectivityTitle

func HostConnectivityTitle(h *scfg.HostBlock) string

HostConnectivityTitle is the preferred heading for a host (User @ HostName), falling back to Host patterns when those directives are missing.

func InitProgram

func InitProgram(cfg *scfg.Config, path string, opts Options) *tea.Program

InitProgram returns a prepared tea.Program.

func IsConnectivityKey

func IsConnectivityKey(key string) bool

IsConnectivityKey reports whether key is part of the connectivity-focused tab.

Types

type Model

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

Model is the root Bubble Tea model for sshui.

func New

func New(cfg *scfg.Config, path string, opts Options) *Model

New builds a TUI model for the given config path and parsed config.

func (*Model) Init

func (m *Model) Init() tea.Cmd

func (*Model) Update

func (m *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Model) View

func (m Model) View() string

type Options

type Options struct {
	Version       string
	Theme         string
	Editor        string
	ReadOnly      bool   // true: merged Include browse (see help); false: single-file editable
	MirrorPath    string // optional: after save, copy bytes here (expanded abs path)
	AppConfigPath string // absolute path to sshui config.toml (not SSH config)

	SSHHostsPath       string         // absolute path to the sshui ssh_hosts file
	MainSSHConfigPath  string         // absolute path to the user's main ssh_config (for export wizard)
	MainConfig         *scfg.Config   // parsed main ssh_config snapshot (bridge-stripped); nil if same as ssh_hosts or unreadable
	OverlayPath        string         // absolute path to password_hosts.toml
	Overlay            *overlay.File  // pre-loaded password overlay (nil = none)
	BrowseMode         string         // initial browse mode: merged | openssh | password
	AppConfig          *appcfg.Config // pointer for saving wizard flags
	ExportWizardNeeded bool           // show the setup wizard on startup (config.toml missing)
}

Options carries theme and editor preferences (from ~/.config/sshui/config.toml).

Jump to

Keyboard shortcuts

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