Help us shape the future of Go! Take the 2026 Go Developer Survey

tui

package
v1.3.98 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

Package tui cmd/skywire/tui/install.go

Package tui cmd/skywire/tui/tui.go

An interactive console over the skywire command line: a scrollback of everything run so far, a prompt to type the next command into, and the code rain falling behind both. `skywire --tui`, or `--tui` alongside any `--help`.

The console starts on the help for the command it was opened on and runs the real binary from there. A plain line is run captured — its output is folded into the scrollback. A line beginning with `!` is run in the real terminal: the TUI steps aside, hands the child the screen (so a pty exec, a live plot, anything streaming or full-screen works), and resumes when it exits.

Index

Constants

View Source
const FlagName = "tui"

FlagName is the flag that opens the browser.

Variables

This section is empty.

Functions

func Install

func Install(root *cobra.Command)

Install adds --tui to root and makes it open the browser instead of printing help.

Hooking help rather than adding a command covers both spellings for free: `skywire --tui` reaches it because the root command prints its help when it is run with no arguments, and `skywire cli visor --help --tui` reaches it because that is a help call too — and arrives with the command the user named, which is where the browser opens.

Call last, after anything else that wraps help. This decides whether help is shown interactively at all, so it belongs outside the wrappers that decide what shown help looks like.

func Run

func Run(root, focus *cobra.Command) error

Run opens the console on cmd and blocks until the user quits.

Types

This section is empty.

Jump to

Keyboard shortcuts

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