cli

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: MIT Imports: 31 Imported by: 0

Documentation

Overview

Package cli wires the installer's cobra commands. It is invoked by cmd/installer/main.go and works identically whether run as `installer ...` standalone or as `cub installer ...` via the cub plugin protocol — the only difference is cosmetic (the plugin sets CUB_PLUGIN=1 in the env, which we surface in `installer doc` output).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InvocationName

func InvocationName() string

InvocationName is the command name to print in user-facing follow-up instructions ("Next: ... upload <dir>"). It returns "cub installer" when the binary was launched via the cub plugin protocol so the operator can copy-paste the suggestion back into their shell; otherwise it returns os.Args[0] verbatim (e.g. "bin/installer", "installer", "/usr/local/bin/installer") so the suggestion matches what they actually typed. Falls back to "installer" if os.Args is empty.

func NewRoot

func NewRoot() *cobra.Command

NewRoot builds the root cobra command with all subcommands attached.

Types

This section is empty.

Jump to

Keyboard shortcuts

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